473,222 Members | 1,809 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,222 software developers and data experts.

Help Compiling 64bit Python

I'm having a bit of hassle, trying to compile Python in 64bit mode on
Solaris8, using GCC 3.1/3.3 (tried both). I've set the relevant
settings ( export CC="gcc -mcpu=v9 -m64 -D_LARGEFILE64_SOURCE=1" -
hopefully) before ./configure, which seems to work OK. The problem
happens halfway through the make. It produces the following output:

c++ -o python \
Modules/python.o \
libpython2.3.a -lresolv -lsocket -lnsl -lrt -ldl
-lpthread -lm
ld: fatal: file Modules/python.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to python
collect2: ld returned 1 exit status
make: *** [python] Error 1

I'd be very grateful for any pointers.

Regards

John
Jul 18 '05 #1
4 2041
John Abel <jo*******@pa.press.net> writes:
c++ -o python \
Modules/python.o \
libpython2.3.a -lresolv -lsocket -lnsl -lrt -ldl
-lpthread -lm
ld: fatal: file Modules/python.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to python
collect2: ld returned 1 exit status
make: *** [python] Error 1

I'd be very grateful for any pointers.


You need to arrange to use the -m options in the linker line as well.

Looking at the generated Makefile will tell you where to best insert
these options.

Regards,
Martin
Jul 18 '05 #2
Martin v. Lwis wrote:
John Abel <jo*******@pa.press.net> writes:
c++ -o python \
Modules/python.o \
libpython2.3.a -lresolv -lsocket -lnsl -lrt -ldl
-lpthread -lm
ld: fatal: file Modules/python.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to python
collect2: ld returned 1 exit status
make: *** [python] Error 1

I'd be very grateful for any pointers.


You need to arrange to use the -m options in the linker line as well.

Looking at the generated Makefile will tell you where to best insert
these options.

Regards,
Martin

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'
'LDFLAGS=-mcpu=v9 -m64'

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.

Regards

John
Jul 18 '05 #3
John Abel <jo*******@pa.press.net> writes:
c++ -o python \
Modules/python.o \
libpython2.3.a -lresolv -lsocket -lnsl -lrt -ldl
-lpthread -lm
[...] 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'
'LDFLAGS=-mcpu=v9 -m64'

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.

Regards,
Martin
Jul 18 '05 #4
Martin v. Lwis wrote:
John Abel <jo*******@pa.press.net> writes:
c++ -o python \
Modules/python.o \
libpython2.3.a -lresolv -lsocket -lnsl -lrt -ldl
-lpthread -lm

[...]

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'
'LDFLAGS=-mcpu=v9 -m64'

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.

Regards,
Martin

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.

Regards

John

Jul 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: svenn.are | last post by:
Hi, I wanted to run a program that is written in PyQt on my mac, and went over to Riverbank to get PyQ 3.13 and SIP 4.1.1 sources. I followed the installation guide except for the compiling...
1
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am...
0
by: seb.haase | last post by:
Hi, I have ordered a new Athlon64 PC running linux x86_64. I'm using Pyro to communicate between python programs running on different machines. I know that, because Pyro's communication is based...
8
by: dwelch91 | last post by:
I need to detect whether the operating system I am running on (not the Python version) is 64bit or 32bit. One requirement is that I need to include support for non-Intel/AMD architectures. The 2...
3
by: Konrad Hinsen | last post by:
I am trying to install Python 2.4.3 on an AMD Opteron system using the Portland Group's compiler (pgcc). Using CC="pgcc -DNCURSES_ENABLE_STDBOOL_H=0" OPT="-O0" LINKFORSHARED="-Wl,- ...
5
by: Neetu | last post by:
Hi Everybody, Our reports works well on every machine but not on 64bit systems. We can view the report but when we press print button it does nothing, it just stay there and prompt nothing, even...
8
by: kjhishere | last post by:
I need to know if I'm running on 32bit or 64bit ... so far I haven't come up with how to get this info via python. sys.platform returns what python was built on ... but not what the current system...
0
by: norseman | last post by:
=========================================== From what I'm reading I think the answer lies in being able to see Microsoft's OS 'About' statement. One of the Python guru's should be able to supply...
5
by: Albert-jan Roskam | last post by:
Hi, I wrote the program below to merge all xls files in a given directory into one multisheet xls file. It uses xlwt and xlrd. The xls files I use for input are generated by Spss. When I open and...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.