Help Compiling 64bit Python
john.abel at pa.press.net
Sat Sep 20 17:28:54 CEST 2003
Martin v. Löwis wrote:
>John Abel <john.abel at pa.press.net> writes:
>>>>c++ -o python \
>>>> Modules/python.o \
>>>> libpython2.3.a -lresolv -lsocket -lnsl -lrt -ldl
>>I seem to be missing something really obvious here. I've modified the
>>Makefile so it looks like this:
>>CONFIG_ARGS= 'CC=gcc -mcpu=v9 -m64 -D_LARGEFILE64_SOURCE=1'
>>ran the make, and it still comes up with the same error. I've even
>>tried running it with LDFLAGS=-64, with the same result.
>The really obvious thing you are missing is that "c++" is used to link
>python, so setting "CC" has no effect.
>I really encourage you to read the Makefile.
Sorted. I ended up setting the following:
export CC="gcc -mcpu=v9 -m64 -D_LARGEFILE64_SOURCE=1"
export LDFLAGS='-mcpu=v9 -m64'
export LDDFLAGS='-mcpu=v9 -m64 -G'
Thanks to Martin for the pointers.
More information about the Python-list