Re: Building "universal" binaries for MacOS


Andrea Mantler <man...@...>
 

Trying this method, and not using the flag -DCMAKE_OSX_ARCHITECTURES=x86_64;i386 compiled (etc) with no errors, however, when I look at the .a and .dylib files using lipo -info, I get:
    Non-fat file: <filename> is architecture: x86_64
(So this didn't work either.)


On Wednesday, May 28, 2014 1:01:55 PM UTC-5, rmi...@... wrote:
I am working on a patch right now but it looks like you may be able to use CMAKE_TOOLCHAIN_FILE in the meantime.  You would make a file Toolchain-osx-fat.cmake with:
SET(CMAKE_OSX_ARCHITECTURES x86_64 i386)

Then use the flag -DCMAKE_TOOLCHAIN_FILE=<path to file>/Toolchain-osx-fat.cmake where <path to file> is the full path to Toolchain-osx-fat.cmake

I am currently not in a position to test this.  Please tell me if it works.

On Monday, May 26, 2014 2:12:58 PM UTC-7, Andrea Mantler wrote:
I would like to build fat binaries with x86_64 and i386 architecture support.  I've tried passing the flag
    -DCMAKE_OSX_ARCHITECTURES=x86_64;i386
to cmake, but it appears that flag isn't being carried down to the building of libtinyxml.a and libyaml-cpp.a:

    ld: warning: in ../../ext/dist/lib/libtinyxml.a, file was built for unsupported file format which is not the architecture being linked (i386)
    ld: warning: in ../../ext/dist/lib/libyaml-cpp.a, file was built for unsupported file format which is not the architecture being linked (i386)

(Note:  I get the same errors if I try to build for just i386.)

Does anyone have any suggestions for what I can try?  Thanks! 

Join {ocio-dev@lists.aswf.io to automatically receive all group messages.