I updated to Xcode 8.3 last week. I cannot seem to get rid of this compiler warning:
ld: warning: direct access in function 'std::__1::basic_filebuf<char, std::__1::char_traits<char> >::open(char const*, unsigned int)' from file '/Path/To/Derived/Data/Xcode/DerivedData/myapp/Build/Intermediates/myapp.build/Debug-iphoneos/myapp.build/Objects-normal/arm64/myapp_lto.o' to global weak symbol 'std::__1::basic_filebuf<char, std::__1::char_traits<char> >::open(char const*, unsigned int)' from file '/Path/To/Derived/Data/Xcode/DerivedData/myapp/Build/Intermediates/myapp.build/Debug-iphoneos/myapp.build/Objects-normal/arm64/myapp_lto.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
What I've tried to resolve this warning:
- Changing
Symbols Hidden by Default
to YES - in all targets - Changing
Symbols Hidden by Default
to NO - in all targets - Essentially everything here (though not fully related)
- Cleaning/Deleting derived data/etc
- Added
-fvisibility=hidden
to my target, as well as all cocoapod targets. (described here)
Any insight is greatly appreciated. Thanks in advance.
UPDATE 2017-04-10:
This appears to be an issue generated by NewRelicAgent. Removing the cocoapod from my project eliminates the warning. Looking into this further.