sync.(*Map).Load: relocation target sync/atomic.(*Value).Load not defined when building for ios_arm

50 views
Skip to first unread message

Steeve Morin

unread,
Aug 27, 2018, 10:37:37 AM8/27/18
to golang-nuts
Hey folks,

I'm trying to build a project with Bazel on with buildmode=c-archive, and I'm running into the following issue on ios_arm and Go 1.11 only:

sync.(*Map).Load: relocation target sync/atomic.(*Value).Load not defined
sync.(*Map).Store: relocation target sync/atomic.(*Value).Load not defined
sync.(*Map).LoadOrStore: relocation target sync/atomic.(*Value).Load not defined
sync.(*Map).dirtyLocked: relocation target sync/atomic.(*Value).Load not defined
internal/testlog.Logger: relocation target sync/atomic.(*Value).Load not defined

Go 1.10 works fine.

Now I know this is probably something that rules_go is doing wrong, because gomobile is working as expected.
That said, I am not sure where to look on how to pinpoint the issue, so I would gladly appreciate pointers.


There was a similar problem with ios_386 which was solved by not building the stdlib with -shared.

Thanks!

Steeve Morin

unread,
Aug 28, 2018, 7:00:19 AM8/28/18
to golang-nuts
Actually, the problem happens also without c-archive.

I've put out a repro repo at: https://github.com/steeve/rules_go_ios_arm

You'll need to run this on macOS (because iOS...).
Reply all
Reply to author
Forward
0 new messages