Xcode7-beta4 (7A165t): libtool does not support -ios_version_min link editor flag

Originator:benchatelain
Number:rdar://22104678 Date Originated:01-Aug-2015 10:02 AM
Status:Behaves correctly Resolved:
Product:Developer Tools Product Version:Xcode7-beta4 (7A165t)
Classification:Enhancement Reproducible:Always
 
Attempting to use libtool to build an iOS library generates the following error:

     building for OSX, but linking in object file built for iOS, for architecture i386

The ld “linker” command has both -macosx_version_min and -ios_version_min flags, attempting to pass the latter of these generates a different error:

    $ libtool -dynamic -ios_version_min 8.0 …

    error: /Applications/Xcode7-beta4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: 8.0 (No such file or directory)

Comments

Apple Developer Relations

This issue behaves as intended based on the following:

libtool is used to package up .o files into a static archive. It is not the linker. You cannot specify a platform and min version at libtool time. The min OS version needs to be specified at compile time.

The linker error message “building for OSX, but linking in object file built for iOS” means the linker thinks you are trying to create a OSX program (based on the command line arguments).

Also, xcode has two settings: “Other Linker Flags” which are passed to the linker, and “Other Librarian Flags” which are passed to libtool.

Please update your bug report to let us know if this is still an issue for you.

By benchatelain at May 25, 2016, 2:37 p.m. (reply...)

Still there in Xcode 7.1.1 (rdar://23663451)


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!