[ https://issues.apache.org/jira/browse/THRIFT-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13177749#comment-13177749 ]
Peace C commented on THRIFT-1476: --------------------------------- As a side note, building for ppc on OSX 10.7.1 (Lion) and XCode 4.1 fails. i386 and x86_64 build successfully. Output from configure: ---------------------- checking whether the C compiler works... no configure: error: in `/Users/affinegy/dev/thrift/thrift-0.8': configure: error: C compiler cannot create executables See `config.log' for more details config.log: ----------- Target: i686-apple-darwin11 Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/src/configure --disable-checking --enable-werror --prefix=/D eveloper/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transfor m-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/l lvmgcc42-2335.15~25/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --tar get=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1 Thread model: posix gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00) configure:3964: $? = 0 configure:3953: gcc -V >&5 llvm-gcc-4.2: argument to `-V' is missing configure:3964: $? = 1 configure:3953: gcc -qversion >&5 i686-apple-darwin11-llvm-gcc-4.2: no input files configure:3964: $? = 1 configure:3984: checking whether the C compiler works configure:4006: gcc -arch ppc -arch ppc conftest.c >&5 llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory configure:4010: $? = 255 configure:4048: result: no configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "thrift" | #define PACKAGE_TARNAME "thrift" | #define PACKAGE_VERSION "0.8.0" | #define PACKAGE_STRING "thrift 0.8.0" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define PACKAGE "thrift" | #define VERSION "0.8.0" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:4053: error: in `/Users/affinegy/dev/thrift/thrift-0.8': configure:4055: error: C compiler cannot create executables See `config.log' for more details > Build universal library binaries on Mac OSX > ------------------------------------------- > > Key: THRIFT-1476 > URL: https://issues.apache.org/jira/browse/THRIFT-1476 > Project: Thrift > Issue Type: Improvement > Components: C++ - Library > Affects Versions: 0.7, 0.8, 0.9 > Environment: Mac OS X > Reporter: Peace C > Assignee: Jake Farrell > Priority: Minor > Labels: build, mac, osx, thrift, universal, universal_binary > Fix For: 0.9 > > > I would like to request a build option to create universal binaries on Mac > OSX. The resulting library would support i386, x86_64 and ppc platforms. > For reference, Jake F. posted a work-around to target different platforms - > > The thrift build is not setup to create a universal binary currently. if > > you would like to create a ticket for this we can take a look at making > > this a global configure option. To set the arch you can pass > > CPPFLAGS='-arch i386' to configure. > [edit: additionally pass LDFLAGS and CXXFLAGS with the same architecture] > > You should be able to use this for each arch you want to create and then > > use lipo to combine them into a universal binary. > > > > -Jake -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira