How to build Universal Binary versions of Coin and SoQt ======================================================= Basically, the procedure is as simple as adding the --enable-universal configure option. So e.g. for a Universal Binary debug build of Coin, you would configure Coin as Coin-2.x.x/configure --enable-debug --enable-universal However, there are a number of things you should keep in mind. Please read the following carefully, it might (and will) save you some headaches when things don't work as they should: All or Nothing -------------- In order to be able to create Universal Binaries, all libraries and frameworks that you link against must also be Universal. So e.g. to be able to create a UB version of SoQt, you'll also need a UB version of Coin -- and of Qt. Sc21 ---- To build the UB version of Sc21, do the usual Xcode magick. Specifically, this means - bring up the Project Info dialog (Project -> Edit Project Settings) - choose the Build tab - change the Architectures setting from $(NATIE_ARCH) to "ppc i386". - rebuild If you are doing this on a PowerPC machine, you also need to do the following step: - choose the "General" tab - select "Mac OS 10.4 (Universal) for the "Cross-Develope Using Target SDK" setting - create symbolik links for Inventor.framework and Sc21.framework in the UB SDK (see next section) Creating Universal Binaries on PPC ---------------------------------- To create UBs on a PPC machine, the Universal Binary SDK needs to be specified by passing the -isysroot option to gcc. This is taken care of by our configure script, however there is one small issue: As this option changes the root directory of where system libraries and frameworks are expected to reside, any frameworks located in /Library/Frameworks will not be found! Consider this scenario: - You configure Coin as a Universal Binary, using the --enable-universal configure flag. - This flag causes "-isysroot /Developer/SDKs/MacOSX10.4u.sdk" to be added to the CFLAGS variable, which means that the instead of /System/Library/Frameworks/OpenGL.framework, the path /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework will be used instead. This is intentional, and alright. - Everything goes well, Coin ends up being installed in /Library/Frameworks/Inventor.framework - You configure SoQt as a Universal Binary, using the --enable-universal configure flag. - This flag causes "-isysroot /Developer/SDKs/MacOSX10.4u.sdk" to be added to the CFLAGS variable, which means that the instead of /System/Library/Frameworks/OpenGL.framework, the system looks for /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework instead. This is intentional, and alright. - However, it also means that instead of /Library/Frameworks/Inventor.framework, the system looks for /Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/Inventor.framework instead. This is obviously problem. The solution is simple: Create a symbolic link in the 10.4u SDK... sudo mkdir -p /Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks sudo ln -s /Library/Frameworks/Inventor.framework \ /Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/ ... after installing Coin (but before running SoQt-configure). If you are using the framework installation of Qt-4, you will need to do the same for the Qt frameworks. Something like this should do the trick: cd /Library/Frameworks for i in Qt*.framework; do sudo ln -s /Library/Frameworks/$i \ /Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/ ; done