realm-swift: "visibility settings" error in core when building via CocoaPods

Hi Guys,

After updating to Realm 2.3.0 (was 2.1.2), I get the following warning in Xcode:

direct access in function 'realm::SharedGroup::SharedGroup(realm::Replication&, realm::SharedGroupOptions)' from file '/Users/xxxx/Documents/Projects/ImageScape/Pods/Realm/core/librealm-ios.a(client_file_access_cache-iphonesimulator.o)' to global weak symbol 'realm::util::InterprocessMutex::initialize_statics()' from file '/Users/xxxx/Library/Developer/Xcode/DerivedData/ImageScape-hetxuiirverpbbdrqeqlutdnufdo/Build/Products/Debug-iphonesimulator/Realm/libRealm.a(shared_realm.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

As far as I can check everything works as expected, but the warning isn’t nice of course. Thanks!

Script info:

ProductName:	Mac OS X
ProductVersion:	10.12.2
BuildVersion:	16C67

/Applications/Xcode.app/Contents/Developer
Xcode 8.2.1
Build version 8C1002

/usr/local/bin/pod
1.0.0
Realm (2.3.0)

/bin/bash
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)

/usr/local/bin/carthage
0.18.1
(not in use here)

/usr/bin/git
git version 2.10.1 (Apple Git-78)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Hi! Same problem on 2.4.2

The problem still exists in 2.10.0. Thanks!

Mark. The problem still exists in 2.8.0. (Xcode 8.2.1 CocoaPods 1.2.1)

The same warning in the version 2.7.0.

I have the same warning since several versions before.

No need to send us a repro case @yuggieg, we can see this too. This is a similar linker warning as realm/realm-object-store/issues/281 and https://github.com/realm/realm-cocoa/issues/4438. I thought we had updated our upstream projects to use the same visibility settings, but evidently that’s not the case. I’m looking into this.