Skip to content

go get fails with "ld: symbol(s) not found for architecture x86_64" with go1.17.2 darwin/amd64 #48902

Closed
@tschaub

Description

@tschaub

What version of Go are you using (go version)?

$ go version
go version go1.17.2 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/tschaub/Library/Caches/go-build"
GOENV="/Users/tschaub/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/tschaub/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/tschaub/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.17.2"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/tschaub/projects/godal-test/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/ct/jqy2463935j10d2t3_v21nf00000gn/T/go-build3476249808=/tmp/go-build -gno-record-gcc-switches -fno-common"
GOROOT/bin/go version: go version go1.17.2 darwin/amd64
GOROOT/bin/go tool compile -V: compile version go1.17.2
uname -v: Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:27 PDT 2021; root:xnu-7195.141.2~5/RELEASE_ARM64_T8101
ProductName:	macOS
ProductVersion:	11.5.1
BuildVersion:	20G80
lldb --version: lldb-1300.0.32.2
Swift version 5.5-dev

What did you do?

mkdir test && cd test
go mod init example.com/test
go get -x -v github.com/airbusgeo/godal

What did you expect to see?

Success.

What did you see instead?

ld: symbol(s) not found for architecture x86_64

I think it is unexpected to see -arch x86_64 is passed to clang. See below for the full output.

go get -x -v github.com/airbusgeo/godal Output
# get https://proxy.golang.org/github.com/@v/list
# get https://proxy.golang.org/github.com/airbusgeo/@v/list
# get https://proxy.golang.org/github.com/airbusgeo/godal/@v/list
# get https://proxy.golang.org/github.com/airbusgeo/godal/@v/list: 200 OK (0.412s)
# get https://proxy.golang.org/github.com/@v/list: 410 Gone (0.415s)
# get https://proxy.golang.org/github.com/airbusgeo/@v/list: 410 Gone (0.418s)
WORK=/var/folders/ct/jqy2463935j10d2t3_v21nf00000gn/T/go-build3534027081
github.com/airbusgeo/godal
mkdir -p $WORK/b001/
cd /Users/tschaub/go/pkg/mod/github.com/airbusgeo/godal@v0.0.5
pkg-config --cflags -- gdal
pkg-config --libs -- gdal
TERM='dumb' CGO_LDFLAGS='"-g" "-O2" "-ldl" "-L/opt/homebrew/Cellar/gdal/3.3.2_3/lib" "-lgdal"' /usr/local/go/pkg/tool/darwin_amd64/cgo -objdir $WORK/b001/ -importpath github.com/airbusgeo/godal -- -I/opt/homebrew/Cellar/gdal/3.3.2_3/include -I $WORK/b001/ -g -O2 ./godal.go
cd $WORK
clang -fno-caret-diagnostics -c -x c - -o /dev/null || true
clang -Qunused-arguments -c -x c - -o /dev/null || true
clang -fdebug-prefix-map=a=b -c -x c - -o /dev/null || true
clang -gno-record-gcc-switches -c -x c - -o /dev/null || true
cd $WORK/b001
TERM='dumb' clang -I /Users/tschaub/go/pkg/mod/github.com/airbusgeo/godal@v0.0.5 -fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=$WORK/b001=/tmp/go-build -gno-record-gcc-switches -fno-common -I/opt/homebrew/Cellar/gdal/3.3.2_3/include -I ./ -g -O2 -o ./_x001.o -c _cgo_export.c
TERM='dumb' clang -I /Users/tschaub/go/pkg/mod/github.com/airbusgeo/godal@v0.0.5 -fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=$WORK/b001=/tmp/go-build -gno-record-gcc-switches -fno-common -I/opt/homebrew/Cellar/gdal/3.3.2_3/include -I ./ -g -O2 -o ./_x002.o -c godal.cgo2.c
cd $WORK
clang++ -fno-caret-diagnostics -c -x c - -o /dev/null || true
clang++ -Qunused-arguments -c -x c - -o /dev/null || true
clang++ -fdebug-prefix-map=a=b -c -x c - -o /dev/null || true
clang++ -gno-record-gcc-switches -c -x c - -o /dev/null || true
cd /Users/tschaub/go/pkg/mod/github.com/airbusgeo/godal@v0.0.5
TERM='dumb' clang++ -I . -fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=$WORK/b001=/tmp/go-build -gno-record-gcc-switches -fno-common -I/opt/homebrew/Cellar/gdal/3.3.2_3/include -I $WORK/b001/ -g -O2 -std=c++11 -o $WORK/b001/_x003.o -c godal.cpp
cd $WORK/b001
TERM='dumb' clang -I /Users/tschaub/go/pkg/mod/github.com/airbusgeo/godal@v0.0.5 -fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=$WORK/b001=/tmp/go-build -gno-record-gcc-switches -fno-common -I/opt/homebrew/Cellar/gdal/3.3.2_3/include -I ./ -g -O2 -o ./_cgo_main.o -c _cgo_main.c
cd /Users/tschaub/projects/test
TERM='dumb' clang++ -I /Users/tschaub/go/pkg/mod/github.com/airbusgeo/godal@v0.0.5 -fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=$WORK/b001=/tmp/go-build -gno-record-gcc-switches -fno-common -o $WORK/b001/_cgo_.o $WORK/b001/_cgo_main.o $WORK/b001/_x001.o $WORK/b001/_x002.o $WORK/b001/_x003.o -g -O2 -ldl -L/opt/homebrew/Cellar/gdal/3.3.2_3/lib -lgdal
# github.com/airbusgeo/godal
ld: warning: ignoring file /opt/homebrew/Cellar/gdal/3.3.2_3/lib/libgdal.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_CPLDebug", referenced from:
      _test_godal_error_handling in _x003.o
  "_CPLError", referenced from:
      _godalSetMetadataItem in _x003.o
      _godalSetRasterColorInterpretation in _x003.o
      _godalOpen in _x003.o
      _godalCreate in _x003.o
      _godalDatasetSetSpatialRef in _x003.o
      _godalSetProjection in _x003.o
      _godalExportToWKT in _x003.o
      ...
  "_CPLGetErrorHandlerUserData", referenced from:
      _godalSetMetadataItem in _x003.o
      _godalSetRasterColorInterpretation in _x003.o
      _godalOpen in _x003.o
      _godalClose in _x003.o
      _godalCreate in _x003.o
      _godalDatasetSetSpatialRef in _x003.o
      _godalSetProjection in _x003.o
      ...
  "_CPLPopErrorHandler", referenced from:
      _godalSetMetadataItem in _x003.o
      _godalSetRasterColorInterpretation in _x003.o
      _godalOpen in _x003.o
      _godalClose in _x003.o
      _godalCreate in _x003.o
      _godalDatasetSetSpatialRef in _x003.o
      _godalSetProjection in _x003.o
      ...
  "_CPLPushErrorHandlerEx", referenced from:
      _godalSetMetadataItem in _x003.o
      _godalSetRasterColorInterpretation in _x003.o
      _godalOpen in _x003.o
      _godalClose in _x003.o
      _godalCreate in _x003.o
      _godalDatasetSetSpatialRef in _x003.o
      _godalSetProjection in _x003.o
      ...
  "_CPLSetThreadLocalConfigOption", referenced from:
      _godalSetMetadataItem in _x003.o
      _godalSetRasterColorInterpretation in _x003.o
      _godalOpen in _x003.o
      _godalClose in _x003.o
      _godalCreate in _x003.o
      _godalDatasetSetSpatialRef in _x003.o
      _godalSetProjection in _x003.o
      ...
  "_GDALAllRegister", referenced from:
      __cgo_29ab00cbff11_Cfunc_GDALAllRegister in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_GDALAllRegister)
  "_GDALBuildOverviews", referenced from:
      _godalClearOverviews in _x003.o
      _godalBuildOverviews in _x003.o
  "_GDALBuildVRT", referenced from:
      _godalBuildVRT in _x003.o
  "_GDALBuildVRTOptionsFree", referenced from:
      _godalBuildVRT in _x003.o
  "_GDALBuildVRTOptionsNew", referenced from:
      _godalBuildVRT in _x003.o
  "_GDALClose", referenced from:
      _godalClose in _x003.o
  "_GDALCreate", referenced from:
      _godalCreate in _x003.o
  "_GDALCreateColorTable", referenced from:
      _godalSetColorTable in _x003.o
  "_GDALCreateDatasetMaskBand", referenced from:
      _godalCreateDatasetMaskBand in _x003.o
  "_GDALCreateMaskBand", referenced from:
      _godalCreateMaskBand in _x003.o
  "_GDALDatasetGetLayer", referenced from:
      _godalVectorLayers in _x003.o
  "_GDALDatasetGetLayerCount", referenced from:
      _godalVectorLayers in _x003.o
  "_GDALDatasetRasterIOEx", referenced from:
      _godalDatasetRasterIO in _x003.o
  "_GDALDeleteRasterNoDataValue", referenced from:
      _godalDeleteRasterNoDataValue in _x003.o
  "_GDALDestroyColorTable", referenced from:
      _godalSetColorTable in _x003.o
  "_GDALFillNodata", referenced from:
      _godalFillNoData in _x003.o
  "_GDALFillRaster", referenced from:
      _godalFillRaster in _x003.o
  "_GDALGetBlockSize", referenced from:
      _godalDatasetStructure in _x003.o
      _godalBandStructure in _x003.o
  "_GDALGetColorEntry", referenced from:
      _godalGetColorTable in _x003.o
  "_GDALGetColorEntryCount", referenced from:
      _godalGetColorTable in _x003.o
  "_GDALGetColorInterpretationName", referenced from:
      __cgo_29ab00cbff11_Cfunc_GDALGetColorInterpretationName in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_GDALGetColorInterpretationName)
  "_GDALGetDataTypeName", referenced from:
      __cgo_29ab00cbff11_Cfunc_GDALGetDataTypeName in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_GDALGetDataTypeName)
  "_GDALGetDefaultHistogramEx", referenced from:
      _godalRasterHistogram in _x003.o
  "_GDALGetDriverByName", referenced from:
      __cgo_29ab00cbff11_Cfunc_GDALGetDriverByName in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_GDALGetDriverByName)
  "_GDALGetGeoTransform", referenced from:
      _godalGetGeoTransform in _x003.o
  "_GDALGetMaskBand", referenced from:
      __cgo_29ab00cbff11_Cfunc_GDALGetMaskBand in _x002.o
      _godalCreateMaskBand in _x003.o
      _godalCreateDatasetMaskBand in _x003.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_GDALGetMaskBand)
  "_GDALGetMaskFlags", referenced from:
      __cgo_29ab00cbff11_Cfunc_GDALGetMaskFlags in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_GDALGetMaskFlags)
  "_GDALGetMetadata", referenced from:
      __cgo_29ab00cbff11_Cfunc_GDALGetMetadata in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_GDALGetMetadataItem, __cgo_29ab00cbff11_Cfunc_GDALGetMetadata , __cgo_29ab00cbff11_Cfunc_GDALGetMetadataDomainList )
  "_GDALGetMetadataDomainList", referenced from:
      __cgo_29ab00cbff11_Cfunc_GDALGetMetadataDomainList in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_GDALGetMetadataDomainList)
  "_GDALGetMetadataItem", referenced from:
      __cgo_29ab00cbff11_Cfunc_GDALGetMetadataItem in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_GDALGetMetadataItem)
  "_GDALGetOverview", referenced from:
      _godalBandOverviews in _x003.o
  "_GDALGetOverviewCount", referenced from:
      _godalBandOverviews in _x003.o
  "_GDALGetPaletteInterpretation", referenced from:
      _godalGetColorTable in _x003.o
  "_GDALGetProjectionRef", referenced from:
      __cgo_29ab00cbff11_Cfunc_GDALGetProjectionRef in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_GDALGetProjectionRef)
  "_GDALGetRasterBand", referenced from:
      _godalRasterBands in _x003.o
      _godalSetDatasetNoDataValue in _x003.o
      _godalCreateDatasetMaskBand in _x003.o
      _godalDatasetStructure in _x003.o
  "_GDALGetRasterBandXSize", referenced from:
      _godalBandStructure in _x003.o
  "_GDALGetRasterBandYSize", referenced from:
      _godalBandStructure in _x003.o
  "_GDALGetRasterColorInterpretation", referenced from:
      __cgo_29ab00cbff11_Cfunc_GDALGetRasterColorInterpretation in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_GDALGetRasterColorInterpretation)
  "_GDALGetRasterColorTable", referenced from:
      _godalGetColorTable in _x003.o
  "_GDALGetRasterCount", referenced from:
      _godalRasterBands in _x003.o
      _godalSetDatasetNoDataValue in _x003.o
      _godalCreateDatasetMaskBand in _x003.o
      _godalDatasetStructure in _x003.o
  "_GDALGetRasterDataType", referenced from:
      _godalDatasetStructure in _x003.o
      _godalBandStructure in _x003.o
  "_GDALGetRasterHistogramEx", referenced from:
      _godalRasterHistogram in _x003.o
  "_GDALGetRasterNoDataValue", referenced from:
      __cgo_29ab00cbff11_Cfunc_GDALGetRasterNoDataValue in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_GDALGetRasterNoDataValue)
  "_GDALGetRasterXSize", referenced from:
      _godalRasterSize in _x003.o
      _godalDatasetStructure in _x003.o
  "_GDALGetRasterYSize", referenced from:
      _godalRasterSize in _x003.o
      _godalDatasetStructure in _x003.o
  "_GDALGetSpatialRef", referenced from:
      __cgo_29ab00cbff11_Cfunc_GDALGetSpatialRef in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_GDALGetSpatialRef)
  "_GDALOpenEx", referenced from:
      _godalOpen in _x003.o
  "_GDALPolygonize", referenced from:
      _godalPolygonize in _x003.o
  "_GDALRasterIOEx", referenced from:
      _godalBandRasterIO in _x003.o
  "_GDALRasterize", referenced from:
      _godalRasterize in _x003.o
  "_GDALRasterizeGeometries", referenced from:
      _godalRasterizeGeometry in _x003.o
  "_GDALRasterizeOptionsFree", referenced from:
      _godalRasterize in _x003.o
  "_GDALRasterizeOptionsNew", referenced from:
      _godalRasterize in _x003.o
  "_GDALRegister_GTiff", referenced from:
      __cgo_29ab00cbff11_Cfunc_GDALRegister_GTiff in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_GDALRegister_GTiff)
  "_GDALRegister_HFA", referenced from:
      __cgo_29ab00cbff11_Cfunc_GDALRegister_HFA in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_GDALRegister_HFA)
  "_GDALRegister_MEM", referenced from:
      __cgo_29ab00cbff11_Cfunc_GDALRegister_MEM in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_GDALRegister_MEM)
  "_GDALRegister_VRT", referenced from:
      __cgo_29ab00cbff11_Cfunc_GDALRegister_VRT in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_GDALRegister_VRT)
  "_GDALSetColorEntry", referenced from:
      _godalSetColorTable in _x003.o
  "_GDALSetGeoTransform", referenced from:
      _godalSetGeoTransform in _x003.o
  "_GDALSetMetadataItem", referenced from:
      _godalSetMetadataItem in _x003.o
  "_GDALSetProjection", referenced from:
      _godalSetProjection in _x003.o
  "_GDALSetRasterColorInterpretation", referenced from:
      _godalSetRasterColorInterpretation in _x003.o
  "_GDALSetRasterColorTable", referenced from:
      _godalSetColorTable in _x003.o
  "_GDALSetRasterNoDataValue", referenced from:
      _godalSetDatasetNoDataValue in _x003.o
      _godalSetRasterNoDataValue in _x003.o
  "_GDALSetSpatialRef", referenced from:
      _godalDatasetSetSpatialRef in _x003.o
  "_GDALSieveFilter", referenced from:
      _godalSieveFilter in _x003.o
  "_GDALTranslate", referenced from:
      _godalTranslate in _x003.o
  "_GDALTranslateOptionsFree", referenced from:
      _godalTranslate in _x003.o
  "_GDALTranslateOptionsNew", referenced from:
      _godalTranslate in _x003.o
  "_GDALVectorTranslate", referenced from:
      _godalDatasetVectorTranslate in _x003.o
  "_GDALVectorTranslateOptionsFree", referenced from:
      _godalDatasetVectorTranslate in _x003.o
  "_GDALVectorTranslateOptionsNew", referenced from:
      _godalDatasetVectorTranslate in _x003.o
  "_GDALVersionInfo", referenced from:
      __cgo_29ab00cbff11_Cfunc_GDALVersionInfo in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_GDALVersionInfo)
  "_GDALWarp", referenced from:
      _godalDatasetWarp in _x003.o
      _godalDatasetWarpInto in _x003.o
  "_GDALWarpAppOptionsFree", referenced from:
      _godalDatasetWarp in _x003.o
      _godalDatasetWarpInto in _x003.o
  "_GDALWarpAppOptionsNew", referenced from:
      _godalDatasetWarp in _x003.o
      _godalDatasetWarpInto in _x003.o
  "_OCTDestroyCoordinateTransformation", referenced from:
      __cgo_29ab00cbff11_Cfunc_OCTDestroyCoordinateTransformation in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OCTDestroyCoordinateTransformation)
  "_OCTNewCoordinateTransformation", referenced from:
      _godalNewCoordinateTransformation in _x003.o
  "_OCTTransformEx", referenced from:
      __cgo_29ab00cbff11_Cfunc_OCTTransformEx in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OCTTransformEx)
  "_OGR_DS_CreateLayer", referenced from:
      _godalCreateLayer in _x003.o
  "_OGR_FD_GetFieldCount", referenced from:
      _godalPolygonize in _x003.o
  "_OGR_F_Create", referenced from:
      _godalLayerNewFeature in _x003.o
  "_OGR_F_Destroy", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_F_Destroy in _x002.o
      _godalLayerNewFeature in _x003.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_F_Destroy)
  "_OGR_F_GetFID", referenced from:
      _godalLayerDeleteFeature in _x003.o
  "_OGR_F_GetFieldAsDouble", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_F_GetFieldAsDouble in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_F_GetFieldAsDouble)
  "_OGR_F_GetFieldAsInteger64", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_F_GetFieldAsInteger64 in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_F_GetFieldAsInteger64)
  "_OGR_F_GetFieldAsString", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_F_GetFieldAsString in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_F_GetFieldAsString)
  "_OGR_F_GetFieldCount", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_F_GetFieldCount in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_F_GetFieldCount)
  "_OGR_F_GetFieldDefnRef", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_F_GetFieldDefnRef in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_F_GetFieldDefnRef)
  "_OGR_F_GetGeometryRef", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_F_GetGeometryRef in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_F_GetGeometryRef)
  "_OGR_F_SetGeometry", referenced from:
      _godalFeatureSetGeometry in _x003.o
      _godalLayerNewFeature in _x003.o
  "_OGR_Fld_Create", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_Fld_Create in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_Fld_Create)
  "_OGR_Fld_Destroy", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_Fld_Destroy in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_Fld_Destroy)
  "_OGR_Fld_GetNameRef", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_Fld_GetNameRef in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_Fld_GetNameRef)
  "_OGR_Fld_GetType", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_Fld_GetType in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_Fld_GetType)
  "_OGR_G_AssignSpatialReference", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_G_AssignSpatialReference in _x002.o
      _godalGeometryTransformTo in _x003.o
      _godalGeometryTransform in _x003.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_G_AssignSpatialReference)
  "_OGR_G_Buffer", referenced from:
      _godal_OGR_G_Buffer in _x003.o
     (maybe you meant: _godal_OGR_G_Buffer, __cgo_29ab00cbff11_Cfunc_godal_OGR_G_Buffer )
  "_OGR_G_CreateFromWkb", referenced from:
      _godalNewGeometryFromWKB in _x003.o
  "_OGR_G_CreateFromWkt", referenced from:
      _godalNewGeometryFromWKT in _x003.o
  "_OGR_G_DestroyGeometry", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_G_DestroyGeometry in _x002.o
      _godalNewGeometryFromWKT in _x003.o
      _godalNewGeometryFromWKB in _x003.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_G_DestroyGeometry)
  "_OGR_G_ExportToIsoWkb", referenced from:
      _godalExportGeometryWKB in _x003.o
  "_OGR_G_ExportToJsonEx", referenced from:
      _godalExportGeometryGeoJSON in _x003.o
  "_OGR_G_ExportToWkt", referenced from:
      _godalExportGeometryWKT in _x003.o
  "_OGR_G_GetEnvelope", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_G_GetEnvelope in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_G_GetEnvelope)
  "_OGR_G_GetSpatialReference", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_G_GetSpatialReference in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_G_GetSpatialReference)
  "_OGR_G_IsEmpty", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_G_IsEmpty in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_G_IsEmpty)
  "_OGR_G_Simplify", referenced from:
      _godal_OGR_G_Simplify in _x003.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_godal_OGR_G_Simplify, _godal_OGR_G_Simplify )
  "_OGR_G_Transform", referenced from:
      _godalGeometryTransform in _x003.o
  "_OGR_G_TransformTo", referenced from:
      _godalGeometryTransformTo in _x003.o
  "_OGR_G_WkbSize", referenced from:
      _godalExportGeometryWKB in _x003.o
  "_OGR_L_CreateField", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_L_CreateField in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_L_CreateField)
  "_OGR_L_DeleteFeature", referenced from:
      _godalLayerDeleteFeature in _x003.o
  "_OGR_L_GetFeatureCount", referenced from:
      _godalLayerFeatureCount in _x003.o
  "_OGR_L_GetLayerDefn", referenced from:
      _godalPolygonize in _x003.o
      _godalLayerNewFeature in _x003.o
  "_OGR_L_GetNextFeature", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_L_GetNextFeature in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_L_GetNextFeature)
  "_OGR_L_GetSpatialRef", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_L_GetSpatialRef in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_L_GetSpatialRef)
  "_OGR_L_ResetReading", referenced from:
      __cgo_29ab00cbff11_Cfunc_OGR_L_ResetReading in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OGR_L_ResetReading)
  "_OGR_L_SetFeature", referenced from:
      _godalLayerSetFeature in _x003.o
      _godalLayerNewFeature in _x003.o
  "_OSRAutoIdentifyEPSG", referenced from:
      __cgo_29ab00cbff11_Cfunc_OSRAutoIdentifyEPSG in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OSRAutoIdentifyEPSG)
  "_OSRDestroySpatialReference", referenced from:
      _godalCreateWKTSpatialRef in _x003.o
      _godalCreateProj4SpatialRef in _x003.o
      _godalCreateEPSGSpatialRef in _x003.o
  "_OSRExportToWkt", referenced from:
      _godalExportToWKT in _x003.o
  "_OSRGetAuthorityCode", referenced from:
      __cgo_29ab00cbff11_Cfunc_OSRGetAuthorityCode in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OSRGetAuthorityCode)
  "_OSRGetAuthorityName", referenced from:
      __cgo_29ab00cbff11_Cfunc_OSRGetAuthorityName in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OSRGetAuthorityName)
  "_OSRGetSemiMajor", referenced from:
      __cgo_29ab00cbff11_Cfunc_OSRGetSemiMajor in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OSRGetSemiMajor)
  "_OSRGetSemiMinor", referenced from:
      __cgo_29ab00cbff11_Cfunc_OSRGetSemiMinor in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OSRGetSemiMinor)
  "_OSRImportFromEPSG", referenced from:
      _godalCreateEPSGSpatialRef in _x003.o
  "_OSRImportFromProj4", referenced from:
      _godalCreateProj4SpatialRef in _x003.o
  "_OSRImportFromWkt", referenced from:
      _godalCreateWKTSpatialRef in _x003.o
  "_OSRIsGeographic", referenced from:
      __cgo_29ab00cbff11_Cfunc_OSRIsGeographic in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OSRIsGeographic)
  "_OSRIsSame", referenced from:
      __cgo_29ab00cbff11_Cfunc_OSRIsSame in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OSRIsSame)
  "_OSRNewSpatialReference", referenced from:
      _godalCreateWKTSpatialRef in _x003.o
      _godalCreateProj4SpatialRef in _x003.o
      _godalCreateEPSGSpatialRef in _x003.o
  "_OSRRelease", referenced from:
      __cgo_29ab00cbff11_Cfunc_OSRRelease in _x002.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_OSRRelease)
  "_OSRSetAxisMappingStrategy", referenced from:
      _godalCreateWKTSpatialRef in _x003.o
      _godalCreateProj4SpatialRef in _x003.o
      _godalCreateEPSGSpatialRef in _x003.o
  "_VSIError", referenced from:
      cpl::VSIGoFilesystemHandler::Open(char const*, char const*, bool, char const* const*) in _x003.o
  "_VSIFCloseL", referenced from:
      _godalVSIOpen in _x003.o
      _godalVSIClose in _x003.o
  "_VSIFOpenExL", referenced from:
      _godalVSIOpen in _x003.o
  "_VSIFReadL", referenced from:
      _godalVSIRead in _x003.o
  "_VSIFree", referenced from:
      __cgo_29ab00cbff11_Cfunc_CPLFree in _x002.o
      __cgo_29ab00cbff11_Cfunc_VSIFree in _x002.o
      _godalExportGeometryWKT in _x003.o
      _godalExportGeometryGeoJSON in _x003.o
     (maybe you meant: __cgo_29ab00cbff11_Cfunc_VSIFree)
  "_VSIMalloc", referenced from:
      _godalRasterHistogram in _x003.o
  "_VSIUnlink", referenced from:
      _godalVSIUnlink in _x003.o
  "VSICreateCachedFile(VSIVirtualHandle*, unsigned long, unsigned long)", referenced from:
      cpl::VSIGoFilesystemHandler::Open(char const*, char const*, bool, char const* const*) in _x003.o
  "VSIFileManager::GetPrefixes()", referenced from:
      _VSIInstallGoHandler in _x003.o
  "VSIFileManager::InstallHandler(std::__1::basic_string, std::__1::allocator > const&, VSIFilesystemHandler*)", referenced from:
      _VSIInstallGoHandler in _x003.o
  "VSIFilesystemHandler::UnlinkBatch(char const* const*)", referenced from:
      vtable for cpl::VSIGoFilesystemHandler in _x003.o
  "VSIFilesystemHandler::RmdirRecursive(char const*)", referenced from:
      vtable for cpl::VSIGoFilesystemHandler in _x003.o
  "VSIFilesystemHandler::GetFileMetadata(char const*, char const*, char const* const*)", referenced from:
      vtable for cpl::VSIGoFilesystemHandler in _x003.o
  "VSIFilesystemHandler::SetFileMetadata(char const*, char const* const*, char const*, char const* const*)", referenced from:
      vtable for cpl::VSIGoFilesystemHandler in _x003.o
  "VSIFilesystemHandler::Sync(char const*, char const*, char const* const*, int (*)(double, char const*, void*), void*, char***)", referenced from:
      vtable for cpl::VSIGoFilesystemHandler in _x003.o
  "VSIFilesystemHandler::OpenDir(char const*, int, char const* const*)", referenced from:
      vtable for cpl::VSIGoFilesystemHandler in _x003.o
  "typeinfo for VSIVirtualHandle", referenced from:
      typeinfo for cpl::VSIGoHandle in _x003.o
  "typeinfo for VSIFilesystemHandler", referenced from:
      typeinfo for cpl::VSIGoFilesystemHandler in _x003.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I know this is complicated by the dependency on GDAL. As seen above, I have a brew based installation of GDAL that is working properly.

gdalinfo --version
GDAL 3.3.2, released 2021/09/01

I also understand that this could be an issue that needs to be solved in the godal project.

Please let me know if I can help narrow this down. I saw #43692, which made me think it might be an issue with go itself.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions