[CMake] universal binary problems on mac

Bill Hoffman bill.hoffman at kitware.com
Tue Feb 6 10:39:21 EST 2007


Hi,

So, the mac we run our cmake dashboards was "updated".  This caused the 
cmake dashboard to start to fail. The problem seems to be a change in 
the behavior of the lipo command.  Note, Xcode was not updated

I think that this bug may have been fixed:

http://lists.apple.com/archives/xcode-users/2006/Mar/msg00630.html

Basically, the Xcode projects that cmake generates creates universal 
binaries by building all the code twice, then it combines static 
libraries into one "fat" library.  The error is as follows :
http://www.cmake.org/Testing/Sites/dashmacmini2.kitware/Darwin-Tiger-Xcode21-univ/20070206-0100-Nightly/BuildError.html

/usr/bin/ld: warning -F: directory name (/.../CMake-Xcode/bin/Release) does not exist
/usr/bin/ld: table of contents for archive: /.../CMake-Xcode/Source/Release/libCMakeLib.a is out of date; rerun ranlib(1) (can't load from it)
/usr/bin/ld: table of contents for archive: /.../CMake-Xcode/Source/kwsys/Release/libcmsys.a is out of date; rerun ranlib(1) (can't load from it)
*collect2: ld returned 1 exit status*


I can add a build phase that runs ranlib after each library is created 
if universal binaries are requested, but this will slow the build. This 
seems like an Xcode bug.

Have any of you OSX users out there seen this?

The /usr/bin/lipo has a date of Aug 9 18:05 and is 149408 in size.
The Xcode is 2.2.


-Bill




More information about the CMake mailing list