[ 
https://issues.apache.org/jira/browse/THRIFT-1143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jake Farrell updated THRIFT-1143:
---------------------------------

    Attachment: thrift-1143.patch

Apples Xcode4 removes the assembler for PPC, yet most applications where not 
recompiled against this. Example would be Python 

/usr/bin/python: Mach-O universal binary with 3 architectures
/usr/bin/python (for architecture x86_64):  Mach-O 64-bit executable x86_64
/usr/bin/python (for architecture i386):    Mach-O executable i386
/usr/bin/python (for architecture ppc7400): Mach-O executable ppc

Python compiles C extensions with the same compiler flags that Python itself 
was compiled with. The next version of OS X (Lion) will not have Python built 
with PPC, which resolves this issue. 

To help avoid this problem in the future the following patch changes the 
default GOARCH from older amd64 type to x86_64 and modifies the python client 
makefile to pass GOARCH as an -arch flag to setup.py. Tested on os x and 
centos. 

Can someone with windows test this please

> Build doesn't detect correct architecture type on 64bit osx
> -----------------------------------------------------------
>
>                 Key: THRIFT-1143
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1143
>             Project: Thrift
>          Issue Type: Bug
>          Components: Build Process
>    Affects Versions: 0.5
>         Environment: OSX Snow leopard 64 bit
>            Reporter: Jonathan Evans
>            Assignee: Jake Farrell
>              Labels: build, mac, osx, x86_64
>         Attachments: thrift-1143.patch
>
>
> python setup.py install
> running install
> running build
> running build_py
> running build_ext
> building 'thrift.protocol.fastbinary' extension
> gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os 
> -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 
> -pipe 
> -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 
> -c src/protocol/fastbinary.c -o 
> build/temp.macosx-10.6-universal-2.6/src/protocol/fastbinary.o
> /usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler 
> (/usr/bin/../libexec/gcc/darwin/ppc/as or 
> /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not 
> installed
> Installed assemblers are:
> /usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
> /usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
> src/protocol/fastbinary.c:1203: fatal error: error writing to -: Broken pipe
> compilation terminated.
> lipo: can't open input file: 
> /var/folders/t7/t7jaJ7IcGnKFNCMY3G37PU+++TI/-Tmp-//ccP7p7J0.out (No such file 
> or directory)
> error: command 'gcc-4.2' failed with exit status 1
> To fix:
> export ARCHFLAGS="-arch x86_64"

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to