Skip to content

misc/cgo/testcarchive: test consistently failing on ios-arm64-corellium #58172

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

Closed
bcmills opened this issue Jan 31, 2023 · 3 comments
Closed
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile NeedsFix The path to resolution is known, but the work has not been done. OS-Darwin
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Jan 31, 2023

https://build.golang.org/log/b8d0bb75469e93ca77b9c60715c376ef30dd920d:

##### ../misc/cgo/testcarchive
--- FAIL: TestInstall (4.10s)
    carchive_test.go:463: [go tool cgo -objdir /tmp/workdir-host-ios-arm64-corellium-ios/tmp/carchive_test3668726628/_obj3085089307 -exportheader p.h p/p.go]
    carchive_test.go:465: [go install -buildmode=c-archive ./libgo]
    carchive_test.go:465: [/var/root/bin/clangwrap -fPIC -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/workdir-host-ios-arm64-corellium-ios/tmp/go-build3731191633=/tmp/go-build -gno-record-gcc-switches -fno-common -I /tmp/workdir-host-ios-arm64-corellium-ios/tmp/carchive_test3668726628/pkg/ios_arm64_shared/testcarchive -o ./testp1 main.c main_unix.c /tmp/workdir-host-ios-arm64-corellium-ios/tmp/carchive_test3668726628/pkg/ios_arm64_shared/testcarchive/libgo.a]
    carchive_test.go:465: Undefined symbols for architecture arm64:
          "_CFBundleCopyResourceURL", referenced from:
              _x_cgo_init in libgo.a(000005.o)
          "_CFBundleGetMainBundle", referenced from:
              _x_cgo_init in libgo.a(000005.o)
          "_CFBundleGetValueForInfoDictionaryKey", referenced from:
              _x_cgo_init in libgo.a(000005.o)
          "_CFRelease", referenced from:
              _x_cgo_init in libgo.a(000005.o)
          "_CFStringGetCString", referenced from:
              _x_cgo_init in libgo.a(000005.o)
          "_CFURLGetString", referenced from:
              _x_cgo_init in libgo.a(000005.o)
          "___CFConstantStringClassReference", referenced from:
              CFString in libgo.a(000005.o)
              CFString in libgo.a(000005.o)
              CFString in libgo.a(000005.o)
        ld: symbol(s) not found for architecture arm64
        Not signing file
        clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
    carchive_test.go:465: exit status 1
@bcmills
Copy link
Contributor Author

bcmills commented Jan 31, 2023

I suspect that this regressed as of CL 463992.

Prior to that CL, (*cmd/dist.tester).extLink reported false for ios-arm64, which caused c-archive mode to appear to be unsupported (https://cs.opensource.google/go/go/+/master:src/cmd/dist/test.go;l=1142-1144;drc=55a33d8877d1bdb8f1b7fb62efe3e38e969f40b1).

The rest of the toolchain did claim to support it (a discrepancy fixed in CL 463992), but apparently it didn't actually work after all.

(attn @ianlancetaylor @golang/ios)

@bcmills bcmills added OS-Darwin NeedsFix The path to resolution is known, but the work has not been done. mobile Android, iOS, and x/mobile labels Jan 31, 2023
@bcmills bcmills added this to the Go1.21 milestone Jan 31, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/464339 mentions this issue: cmd/dist, internal/platform: remove some target modes that fail

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/463752 mentions this issue: cmd/dist,internal/platform: reenable the c-archive build mode on ios

gopherbot pushed a commit that referenced this issue Feb 1, 2023
Also fix misc/cgo/testcarchive to provide a missing CoreFoundation
dependency at link time.

Fixes #58221.
Updates #58172.
Updates #58225.

Change-Id: Ib8b6e52ed2914596615da4c427df2fe984722de6
Reviewed-on: https://go-review.googlesource.com/c/go/+/463752
Run-TryBot: Bryan Mills <[email protected]>
Auto-Submit: Bryan Mills <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
johanbrandhorst pushed a commit to Pryz/go that referenced this issue Feb 12, 2023
Before CL 463992 there were some cases that cmd/dist did not test
but that platform.BuildModeSupport permitted. In CL 463992 those
conflicts were resolved in favor of platform.BuildModeSupport.
However, further testing has uncovered some cases that do not in
fact work. Adjust those in both cmd/dist and internal/platform.

In particular, mark android-arm and android-arm64 as not supporting
plugin mode.  Sample failure:
    https://build.golang.org/log/ebba858ea9f94f076966d8cfd42348a0e9345095

Mark ios as not supporting c-archive mode.  Sample failure:
    https://build.golang.org/log/e78a58189d94b90dc6d4b2e01a1b4a0b35d63792

Fixes golang#58170
Fixes golang#58172

Change-Id: Ic1bd18e36382cac0779aad48cb6e7b1de8eeb10d
Reviewed-on: https://go-review.googlesource.com/c/go/+/464339
Reviewed-by: Bryan Mills <[email protected]>
Run-TryBot: Ian Lance Taylor <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
Run-TryBot: Ian Lance Taylor <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
johanbrandhorst pushed a commit to Pryz/go that referenced this issue Feb 12, 2023
Also fix misc/cgo/testcarchive to provide a missing CoreFoundation
dependency at link time.

Fixes golang#58221.
Updates golang#58172.
Updates golang#58225.

Change-Id: Ib8b6e52ed2914596615da4c427df2fe984722de6
Reviewed-on: https://go-review.googlesource.com/c/go/+/463752
Run-TryBot: Bryan Mills <[email protected]>
Auto-Submit: Bryan Mills <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
@golang golang locked and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile NeedsFix The path to resolution is known, but the work has not been done. OS-Darwin
Projects
None yet
Development

No branches or pull requests

2 participants