Bug 2430 - Linker warning for ignored static libraries filtered out if no linker errors are present
Summary: Linker warning for ignored static libraries filtered out if no linker errors ...
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: 5.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2011-12-08 18:59 UTC by Adam Kemp
Modified: 2012-02-24 15:20 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Adam Kemp 2011-12-08 18:59:55 UTC
I was linking against some static libraries which I was calling via P/Invoke wrappers. Since the P/Invoke calls are dynamic calls (i.e., not resolved until runtime) there were no references to those symbols at link time. It turns out that these libraries were compiled for armv7, and my app was using armv6. That produced linker warnings that the static libs were being ignored (they were the wrong architecture), but it did not produce any linker errors (because there were no actual references to those symbols). Since there were no errors the linker output was filtered out, and thus I couldn't see that those files were being ignored. All I knew is that for some reason I couldn't call those functions at runtime.

Oddly, a release build did fail due to missing symbols, but not during the link. It failed instead while stripping symbols because those symbols were listed in a file that was passed to the "strip" command, and those symbols didn't actually exist in the binary. As a result the strip command complained about those symbols not being there, and that caused the release build to fail. If it weren't for that I probably never would have figured out that these libraries weren't even being linked at all.

The build tools should not filter out linker warnings. It turns out some of them are very important.
Comment 1 Sebastien Pouliot 2012-02-24 15:20:37 UTC
fixed in master (for 5.3+)