Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/mobile/cmd/gomobile: android build fails with 'linker' input unused #66048

Closed
jdicami opened this issue Mar 1, 2024 · 1 comment
Closed
Labels
mobile Android, iOS, and x/mobile
Milestone

Comments

@jdicami
Copy link

jdicami commented Mar 1, 2024

Go version

go version go1.22.0 darwin/arm64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/user/Library/Caches/go-build'
GOENV='/Users/user/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/user/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/user/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/Cellar/go/1.22.0/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.0'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/user/Desktop/android-test/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/go-build1900635786=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

go mod init golang.org/x/mobile/example/basic  
go get -d golang.org/x/mobile/example/basic 
gomobile build -target=android -x golang.org/x/mobile/example/basic

What did you see happen?

user@users-MacBook-Pro android-test % gomobile build -target=android -x golang.org/x/mobile/example/basic
GOMOBILE=/Users/user/go/pkg/gomobile
WORK=/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/gomobile-work-1061453575
mkdir -p $WORK/lib/armeabi-v7a
GOMODCACHE=$GOPATH/pkg/mod GOOS=android GOARCH=arm CC=$ANDROID_HOME/ndk/23.2.8568313/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi16-clang CXX=$ANDROID_HOME/ndk/23.2.8568313/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi16-clang++ CGO_ENABLED=1 GOARM=7 go build -x -buildmode=c-shared -o $WORK/lib/armeabi-v7a/libbasic.so golang.org/x/mobile/example/basic
mkdir -p $WORK/lib/arm64-v8a
GOMODCACHE=$GOPATH/pkg/mod GOOS=android GOARCH=arm64 CC=$ANDROID_HOME/ndk/23.2.8568313/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android21-clang CXX=$ANDROID_HOME/ndk/23.2.8568313/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android21-clang++ CGO_ENABLED=1 go build -x -buildmode=c-shared -o $WORK/lib/arm64-v8a/libbasic.so golang.org/x/mobile/example/basic
mkdir -p $WORK/lib/x86
GOMODCACHE=$GOPATH/pkg/mod GOOS=android GOARCH=386 CC=$ANDROID_HOME/ndk/23.2.8568313/toolchains/llvm/prebuilt/darwin-x86_64/bin/i686-linux-android16-clang CXX=$ANDROID_HOME/ndk/23.2.8568313/toolchains/llvm/prebuilt/darwin-x86_64/bin/i686-linux-android16-clang++ CGO_ENABLED=1 go build -x -buildmode=c-shared -o $WORK/lib/x86/libbasic.so golang.org/x/mobile/example/basic
rm -r -f "$WORK"
gomobile: go build -x -buildmode=c-shared -o /var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/gomobile-work-1061453575/lib/x86/libbasic.so golang.org/x/mobile/example/basic failed: exit status 1
WORK=/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/go-build1065354356
mkdir -p $WORK/b053/
mkdir -p $WORK/b059/
echo '# import config' > $WORK/b053/importcfg # internal
cd /Users/user/Desktop/android-test
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/compile -o $WORK/b053/_pkg_.a -trimpath "$WORK/b053=>" -p golang.org/x/mobile/event/paint -lang=go1.18 -complete -installsuffix shared -buildid gn457Y6Kpg2K_KAtUzNJ/gn457Y6Kpg2K_KAtUzNJ -goversion go1.22.0 -c=4 -shared -nolocalimports -importcfg $WORK/b053/importcfg -pack /Users/user/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240213143359-d1f7d3436075/event/paint/paint.go
echo '# import config' > $WORK/b059/importcfg # internal
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/compile -o $WORK/b059/_pkg_.a -trimpath "$WORK/b059=>" -p image/color -std -complete -installsuffix shared -buildid vcfyQvXiHlW0hnu3vszR/vcfyQvXiHlW0hnu3vszR -goversion go1.22.0 -c=4 -shared -nolocalimports -importcfg $WORK/b059/importcfg -pack /opt/homebrew/Cellar/go/1.22.0/libexec/src/image/color/color.go /opt/homebrew/Cellar/go/1.22.0/libexec/src/image/color/ycbcr.go
mkdir -p $WORK/b049/
echo -n > $WORK/b049/go_asm.h # internal
cd /Users/user/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240213143359-d1f7d3436075/app/internal/callfn
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/asm -p golang.org/x/mobile/app/internal/callfn -trimpath "$WORK/b049=>" -I $WORK/b049/ -I /opt/homebrew/Cellar/go/1.22.0/libexec/pkg/include -D GOOS_android -D GOARCH_386 -shared -D GO386_sse2 -gensymabis -o $WORK/b049/symabis ./callfn_386.s
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/buildid -w $WORK/b053/_pkg_.a # internal
echo '# import config' > $WORK/b049/importcfg # internal
cd /Users/user/Desktop/android-test
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/compile -o $WORK/b049/_pkg_.a -trimpath "$WORK/b049=>" -p golang.org/x/mobile/app/internal/callfn -lang=go1.18 -installsuffix shared -buildid JjPsdD9fc_qgrtwlATog/JjPsdD9fc_qgrtwlATog -goversion go1.22.0 -symabis $WORK/b049/symabis -c=4 -shared -nolocalimports -importcfg $WORK/b049/importcfg -pack -asmhdr $WORK/b049/go_asm.h /Users/user/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240213143359-d1f7d3436075/app/internal/callfn/callfn.go
cp $WORK/b053/_pkg_.a /Users/user/Library/Caches/go-build/5d/5d37638aad4f4295dcd5b9b1e5c83c22b3d147ed92329c7848267b17dddce3eb-d # internal
cd /Users/user/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240213143359-d1f7d3436075/app/internal/callfn
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/asm -p golang.org/x/mobile/app/internal/callfn -trimpath "$WORK/b049=>" -I $WORK/b049/ -I /opt/homebrew/Cellar/go/1.22.0/libexec/pkg/include -D GOOS_android -D GOARCH_386 -shared -D GO386_sse2 -o $WORK/b049/callfn_386.o ./callfn_386.s
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/buildid -w $WORK/b059/_pkg_.a # internal
cp $WORK/b059/_pkg_.a /Users/user/Library/Caches/go-build/46/4675ec75dc4610884b77f2da3ca963c1b174d732a8618ad6e9e723c0d4cbfd27-d # internal
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/pack r $WORK/b049/_pkg_.a $WORK/b049/callfn_386.o # internal
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/buildid -w $WORK/b049/_pkg_.a # internal
cp $WORK/b049/_pkg_.a /Users/user/Library/Caches/go-build/34/340fc0e60c03825d765266a18ac8bfbea00f37f30d5a201e09c1c4de0195160b-d # internal
mkdir -p $WORK/b056/
cat >/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/go-build1065354356/b056/importcfg << 'EOF' # internal
# import config
packagefile bufio=/Users/user/Library/Caches/go-build/db/db56874ffc957768f96b6b958cbd3f95c1f485c89f7d38445c2441f82dcc7e10-d
packagefile errors=/Users/user/Library/Caches/go-build/c4/c4e399b82f8fd340073a552c78e660b930fc599e2db87ed5ee3bed657b4aa8d8-d
packagefile image/color=/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/go-build1065354356/b059/_pkg_.a
packagefile io=/Users/user/Library/Caches/go-build/ab/aba6cc41cac03bc27ef808409513d0d33d9f6844c92bf7c987163641bac2f751-d
packagefile math/bits=/Users/user/Library/Caches/go-build/18/186297696f9b2e3fe0db46748827cc0bd2a9d42e3c4f93a2f0076cefa59ab114-d
packagefile strconv=/Users/user/Library/Caches/go-build/11/1195282da40111cfd837a8e0089a5f25d070597884ee57b437b32d04e754e81a-d
packagefile sync=/Users/user/Library/Caches/go-build/fb/fbccd75778921209565250506e28447309550f267ef94d600c1fac758f4bdab0-d
packagefile sync/atomic=/Users/user/Library/Caches/go-build/6b/6b1384d5ab3a75d3beac1d57385262c3893da143aeb2edd19cc887c249d33cfe-d
EOF
cd /Users/user/Desktop/android-test
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/compile -o $WORK/b056/_pkg_.a -trimpath "$WORK/b056=>" -p image -std -complete -installsuffix shared -buildid B60JHDgENCpH7jjngOZn/B60JHDgENCpH7jjngOZn -goversion go1.22.0 -c=4 -shared -nolocalimports -importcfg $WORK/b056/importcfg -pack /opt/homebrew/Cellar/go/1.22.0/libexec/src/image/format.go /opt/homebrew/Cellar/go/1.22.0/libexec/src/image/geom.go /opt/homebrew/Cellar/go/1.22.0/libexec/src/image/image.go /opt/homebrew/Cellar/go/1.22.0/libexec/src/image/names.go /opt/homebrew/Cellar/go/1.22.0/libexec/src/image/ycbcr.go
mkdir -p $WORK/b055/
mkdir -p $WORK/b060/
mkdir -p $WORK/b050/
cat >/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/go-build1065354356/b055/importcfg << 'EOF' # internal
# import config
packagefile fmt=/Users/user/Library/Caches/go-build/91/91e8c0dbbba528c4a70be568ebd1e89f79154fc969d3c46b762c17d9ae6619e0-d
EOF
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/compile -o $WORK/b055/_pkg_.a -trimpath "$WORK/b055=>" -p golang.org/x/mobile/geom -lang=go1.18 -complete -installsuffix shared -buildid HivUAiBl1Xs0oRTxlqRC/HivUAiBl1Xs0oRTxlqRC -goversion go1.22.0 -c=4 -shared -nolocalimports -importcfg $WORK/b055/importcfg -pack /Users/user/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240213143359-d1f7d3436075/geom/geom.go
mkdir -p $WORK/b052/
cat >/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/go-build1065354356/b060/importcfg << 'EOF' # internal
# import config
packagefile fmt=/Users/user/Library/Caches/go-build/91/91e8c0dbbba528c4a70be568ebd1e89f79154fc969d3c46b762c17d9ae6619e0-d
EOF
cat >/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/go-build1065354356/b050/importcfg << 'EOF' # internal
# import config
packagefile fmt=/Users/user/Library/Caches/go-build/91/91e8c0dbbba528c4a70be568ebd1e89f79154fc969d3c46b762c17d9ae6619e0-d
packagefile strings=/Users/user/Library/Caches/go-build/3d/3d98da2a0cc8f05fc867be48de47c6b70f4660dedb22dad167abd05143cc3aee-d
EOF
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/compile -o $WORK/b060/_pkg_.a -trimpath "$WORK/b060=>" -p golang.org/x/mobile/event/touch -lang=go1.18 -complete -installsuffix shared -buildid 3ZZQhnwAffNN7_gyt05e/3ZZQhnwAffNN7_gyt05e -goversion go1.22.0 -c=4 -shared -nolocalimports -importcfg $WORK/b060/importcfg -pack /Users/user/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240213143359-d1f7d3436075/event/touch/touch.go
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/compile -o $WORK/b050/_pkg_.a -trimpath "$WORK/b050=>" -p golang.org/x/mobile/event/key -lang=go1.18 -complete -installsuffix shared -buildid sQWWmcWTgbrbTj_M6Ups/sQWWmcWTgbrbTj_M6Ups -goversion go1.22.0 -c=4 -shared -nolocalimports -importcfg $WORK/b050/importcfg -pack /Users/user/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240213143359-d1f7d3436075/event/key/code_string.go /Users/user/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240213143359-d1f7d3436075/event/key/key.go
cat >/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/go-build1065354356/b052/importcfg << 'EOF' # internal
# import config
packagefile fmt=/Users/user/Library/Caches/go-build/91/91e8c0dbbba528c4a70be568ebd1e89f79154fc969d3c46b762c17d9ae6619e0-d
EOF
mkdir -p $WORK/b068/
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/compile -o $WORK/b052/_pkg_.a -trimpath "$WORK/b052=>" -p golang.org/x/mobile/event/lifecycle -lang=go1.18 -complete -installsuffix shared -buildid 8mozNUlstZuBXHIc_HW5/8mozNUlstZuBXHIc_HW5 -goversion go1.22.0 -c=4 -shared -nolocalimports -importcfg $WORK/b052/importcfg -pack /Users/user/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240213143359-d1f7d3436075/event/lifecycle/lifecycle.go
cat >/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/go-build1065354356/b068/importcfg << 'EOF' # internal
# import config
packagefile encoding/binary=/Users/user/Library/Caches/go-build/38/381030aea2a6b768a7d3b50dc1d2b7a94d84264c2eb6a6ebe33c6c1cf06b0ae4-d
packagefile fmt=/Users/user/Library/Caches/go-build/91/91e8c0dbbba528c4a70be568ebd1e89f79154fc969d3c46b762c17d9ae6619e0-d
packagefile math=/Users/user/Library/Caches/go-build/ce/ce65415bc1708bb3d54a60a4d4388bd1959defcebe0e09caee69454574449c28-d
EOF
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/compile -o $WORK/b068/_pkg_.a -trimpath "$WORK/b068=>" -p golang.org/x/mobile/exp/f32 -lang=go1.18 -complete -installsuffix shared -buildid cJgbWYos6Gf03GvQxYcf/cJgbWYos6Gf03GvQxYcf -goversion go1.22.0 -c=4 -shared -nolocalimports -importcfg $WORK/b068/importcfg -pack /Users/user/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240213143359-d1f7d3436075/exp/f32/affine.go /Users/user/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240213143359-d1f7d3436075/exp/f32/f32.go /Users/user/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240213143359-d1f7d3436075/exp/f32/mat3.go /Users/user/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240213143359-d1f7d3436075/exp/f32/mat4.go /Users/user/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240213143359-d1f7d3436075/exp/f32/table.go /Users/user/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240213143359-d1f7d3436075/exp/f32/vec3.go /Users/user/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240213143359-d1f7d3436075/exp/f32/vec4.go
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/buildid -w $WORK/b060/_pkg_.a # internal
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/buildid -w $WORK/b055/_pkg_.a # internal
cp $WORK/b060/_pkg_.a /Users/user/Library/Caches/go-build/fa/fa3e8fdea0af793201772356ced286828abc3602ce76a5fe09aa81262eec69dd-d # internal
cp $WORK/b055/_pkg_.a /Users/user/Library/Caches/go-build/10/10d16830d3215dc897529b168228391aa13ad4584d1cd6a5f864f9561741497d-d # internal
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/buildid -w $WORK/b052/_pkg_.a # internal
cp $WORK/b052/_pkg_.a /Users/user/Library/Caches/go-build/be/be8e6c0d11d182f4f1ba95084a914ed66f3f12fb2cfc072231def5c5fcff98e0-d # internal
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/buildid -w $WORK/b050/_pkg_.a # internal
cp $WORK/b050/_pkg_.a /Users/user/Library/Caches/go-build/61/615dc77dc9ac3fc07aa47821d2c74c3092f409e3b1e1d848b487b73fd3d09253-d # internal
mkdir -p $WORK/b062/
cd /opt/homebrew/Cellar/go/1.22.0/libexec/src/runtime/cgo
TERM='dumb' CGO_LDFLAGS='"-O2" "-g" "-llog"' /opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/cgo -objdir $WORK/b062/ -importpath runtime/cgo -import_runtime_cgo=false -import_syscall=false -exportheader=$WORK/b062/_cgo_install.h -- -I $WORK/b062/ -O2 -g -Wall -Werror -fno-stack-protector ./cgo.go
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/buildid -w $WORK/b068/_pkg_.a # internal
cp $WORK/b068/_pkg_.a /Users/user/Library/Caches/go-build/b2/b26e2db85db39a4b4e50cd6c6de825f02c23404a9fb721899ff7dcbc7c4014d3-d # internal
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/buildid -w $WORK/b056/_pkg_.a # internal
cp $WORK/b056/_pkg_.a /Users/user/Library/Caches/go-build/34/3424593d2c59d92c6c83da62242d1a5761c14854f8666c4b56f45a39d6be3df3-d # internal
cd $WORK/b062
TERM='dumb' /Users/user/Library/Android/sdk/ndk/23.2.8568313/toolchains/llvm/prebuilt/darwin-x86_64/bin/i686-linux-android16-clang -I /opt/homebrew/Cellar/go/1.22.0/libexec/src/runtime/cgo -fPIC -m32 -pthread -Wl,--no-gc-sections -fmessage-length=0 -I $WORK/b062/ -O2 -g -Wall -Werror -fno-stack-protector -o $WORK/b062/_x001.o -c _cgo_export.c
mkdir -p $WORK/b054/
mkdir -p $WORK/b070/
cat >/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/go-build1065354356/b054/importcfg << 'EOF' # internal
# import config
packagefile golang.org/x/mobile/geom=/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/go-build1065354356/b055/_pkg_.a
packagefile image=/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/go-build1065354356/b056/_pkg_.a
EOF
cat >/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/go-build1065354356/b070/importcfg << 'EOF' # internal
# import config
packagefile image=/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/go-build1065354356/b056/_pkg_.a
EOF
cd /Users/user/Desktop/android-test
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/compile -o $WORK/b054/_pkg_.a -trimpath "$WORK/b054=>" -p golang.org/x/mobile/event/size -lang=go1.18 -complete -installsuffix shared -buildid GQI1sC2LBSy5wKJlz9Qh/GQI1sC2LBSy5wKJlz9Qh -goversion go1.22.0 -c=4 -shared -nolocalimports -importcfg $WORK/b054/importcfg -pack /Users/user/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240213143359-d1f7d3436075/event/size/size.go
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/compile -o $WORK/b070/_pkg_.a -trimpath "$WORK/b070=>" -p image/internal/imageutil -std -complete -installsuffix shared -buildid 7i2rlmPW15XaP1ae7X4m/7i2rlmPW15XaP1ae7X4m -goversion go1.22.0 -c=4 -shared -nolocalimports -importcfg $WORK/b070/importcfg -pack /opt/homebrew/Cellar/go/1.22.0/libexec/src/image/internal/imageutil/imageutil.go /opt/homebrew/Cellar/go/1.22.0/libexec/src/image/internal/imageutil/impl.go
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/buildid -w $WORK/b054/_pkg_.a # internal
cp $WORK/b054/_pkg_.a /Users/user/Library/Caches/go-build/4a/4a55f99b822193d03f4386a4fb923e8f895883f75b5d4cf572e665ae5364aa29-d # internal
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/buildid -w $WORK/b070/_pkg_.a # internal
cp $WORK/b070/_pkg_.a /Users/user/Library/Caches/go-build/a4/a43de8a37c05ca87698964ae7937e65870cb9975706985bd879cc8fe0cc529c4-d # internal
mkdir -p $WORK/b069/
cat >/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/go-build1065354356/b069/importcfg << 'EOF' # internal
# import config
packagefile image=/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/go-build1065354356/b056/_pkg_.a
packagefile image/color=/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/go-build1065354356/b059/_pkg_.a
packagefile image/internal/imageutil=/var/folders/5p/lgn4zcxd0074h7kxczbh2qtm0000gn/T/go-build1065354356/b070/_pkg_.a
EOF
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/compile -o $WORK/b069/_pkg_.a -trimpath "$WORK/b069=>" -p image/draw -std -complete -installsuffix shared -buildid 0uZnsDy4MP_4yXVAiaKV/0uZnsDy4MP_4yXVAiaKV -goversion go1.22.0 -c=4 -shared -nolocalimports -importcfg $WORK/b069/importcfg -pack /opt/homebrew/Cellar/go/1.22.0/libexec/src/image/draw/draw.go
# runtime/cgo
clang-12: error: -Wl,--no-gc-sections: 'linker' input unused [-Werror,-Wunused-command-line-argument]
/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64/buildid -w $WORK/b069/_pkg_.a # internal
cp $WORK/b069/_pkg_.a /Users/user/Library/Caches/go-build/13/131f9d8386be1f030ba7f195ab4e5aef57baeb913593fdb761b5a4d9bda72ed9-d # internal


What did you expect to see?

build command to be successful

@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Mar 1, 2024
@gopherbot gopherbot added this to the Unreleased milestone Mar 1, 2024
@jdicami
Copy link
Author

jdicami commented Mar 1, 2024

I was able to resolve by using -androidapi 26

@jdicami jdicami closed this as completed Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Android, iOS, and x/mobile
Projects
None yet
Development

No branches or pull requests

2 participants