4

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:

  1. Changing Symbols Hidden by Default to YES - in all targets
  2. Changing Symbols Hidden by Default to NO - in all targets
  3. Essentially everything here (though not fully related)
  4. Cleaning/Deleting derived data/etc
  5. 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.

Community
  • 1
  • 1
Warblr
  • 1,188
  • 1
  • 13
  • 27
  • might help: http://stackoverflow.com/questions/9894961/strange-warnings-from-the-linker-ld – NathanOliver Apr 10 '17 at 19:07
  • Thanks, @NathanOliver I actually saw this post as well. I've gone through every target (including the cocoapod targets), and added `-fvisibility=hidden` to other c++ linker flags. This warning still persists. – Warblr Apr 10 '17 at 20:07

1 Answers1

2

Response from New Relic support:

We reviewed these warning messages with our Mobile Engineering team. They advised these warnings are related to a difference introduced in Xcode 8.3 - which isn't applied to the latest version of the New Relic iOS Agent built in Xcode 8.2.

They also stressed that these warnings don't appear to have any negative effects - but please let us know if you notice any other issues.

It's likely this issue will be resolved in the next release of the agent, when it will be built with Xcode 8.3.

Community
  • 1
  • 1
Warblr
  • 1,188
  • 1
  • 13
  • 27