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

[Xcode 12] ld: warning: direct access in function to global weak symbol means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings. #6812

Closed
reggian opened this issue Sep 28, 2020 · 1 comment

Comments

@reggian
Copy link

reggian commented Sep 28, 2020

Building Realm 5.4.4 on Xcode 12 produces 32 warnings of such sort:

ld: warning: direct access in function 'auto realm::sync::Instruction::visit<(anonymous namespace)::RecoverLocalChangesetsHandler&>((anonymous namespace)::RecoverLocalChangesetsHandler&)' from file '/.../Pods/Realm/core/librealmcore-ios.a(client_reset.o)' to global weak symbol 'typeinfo for realm::Lst<realm::Timestamp>' from file '/.../Pods/Realm/core/librealmcore-ios.a(list.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'realm::sync::InstructionApplier::operator()(realm::sync::Instruction::ArraySet const&)' from file '/.../Pods/Realm/core/librealmcore-ios.a(instruction_applier.o)' to global weak symbol 'typeinfo for realm::Lst<realm::Timestamp>' from file '/.../Pods/Realm/core/librealmcore-ios.a(list.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'realm::sync::InstructionApplier::operator()(realm::sync::Instruction::ArrayInsert const&)' from file '/.../Pods/Realm/core/librealmcore-ios.a(instruction_applier.o)' to global weak symbol 'typeinfo for realm::Lst<realm::Timestamp>' from file '/.../Pods/Realm/core/librealmcore-ios.a(list.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
...

Tested with Realm 5.2.0 on the same system and there are no such problems.

Version of Realm and Tooling

Mac OS X 10.15.5 (19F101)
Xcode 12.0 (12A7209)
CocoaPods 1.9.3
Realm 5.4.4

@tgoyne
Copy link
Member

tgoyne commented Sep 28, 2020

Duplicate of #6688.

@tgoyne tgoyne closed this as completed Sep 28, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants