Direct access in function warning with NewRelicAgent 6.13 and XCode 11.6

Hello,
We recently updated our apps to NewRelicAgent 6.13 and XCode 11.6. We have been getting the following warning every time we build.

direct access in function 'NewRelic::FileBackedStore<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, NewRelic::BaseValue>::FileBackedStore(char const*, char const*, std::__1::shared_ptr<NewRelic::BaseValue> (*)(std::__1::basic_istream<char, std::__1::char_traits<char> >&))' from file '/Users/<user>/Library/Developer/Xcode/DerivedData/<App>/Build/Intermediates.noindex/<app>.build/Debug-iphoneos/<App>/Objects-normal/arm64/<App>_lto.o' to global weak symbol 'NewRelic::FileBackedStore<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, NewRelic::BaseValue>::FileBackedStore(char const*, char const*, std::__1::shared_ptr<NewRelic::BaseValue> (*)(std::__1::basic_istream<char, std::__1::char_traits<char> >&))::'lambda'(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<NewRelic::BaseValue>)::__invoke(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<NewRelic::BaseValue>)' from file '/Users/<user>/Documents/<App>/Pods/NewRelicAgent/NewRelicAgent/NewRelicAgent.framework/NewRelicAgent(NRMAAnalytics.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

We found a similar error in NewRelic last year which basically needed a release update from New Relic to fix this: Direct access linker warnings

Note: The app builds correctly and reports the data correctly. This is just a warning. This is a new warning which we did not see in our apps before when we were on the version 6.11.0.

Is there something we can do to get rid of the warnings on our end? We did try setting the gcc flag and toggling the ‘Symbols hidden by default’ flag. Will we have to wait for a new release for these warnings to go away?

3 Likes

On a separate application, it looks like we actually get 6 of those types of warnings, per target.

Hoping just a recompile and re-release will resolve the warnings (just trying to eliminate all warnings from our code, so that warnings that might have a negative impact don’t get masked).

-Thanks!

Just to confirm, these warnings are produced when using the iOS agent (not the tvOS agent)?

I will check with our engineering team for any other possible remedies; otherwise, this may need to be investigated and removing the warnings will likely be a feature in a new agent release.

Yup, it is produced while using the NewRelicAgent 6.13.0.