473,796 Members | 2,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_S OURCE=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 2057
John Abel <jo*******@pa.p ress.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. Löwis wrote:
John Abel <jo*******@pa.p ress.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_S OURCE=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.p ress.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_S OURCE=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. Löwis wrote:
John Abel <jo*******@pa.p ress.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_S OURCE=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_S OURCE=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
2210
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 python as Macosx already has python. I had no problem with compiling SIP and also no problem with compiling PyQt nor did I have any error message during make install.
1
3725
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 attach this script files and inq files. I cant understand this error. Please suggest me. You can talk with my yahoo id b_sahoo1@yahoo.com. Now i am online. Plz....Plz..Plz...
0
1387
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 on pickle, that the different machines have to run the same Python (major) version: that is, it did not work after I just upgraded ONE machine from Py2.2 to Py2.4. How will this be when all machines run Python2.4, but one will be compiled as a...
8
6151
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 ways I have thought detecting 64bit are: 1. struct.calcsize("P") == 8 2. '64' in os.uname() I'm not convinced that either one of these is really adequate. Does
3
1513
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,- export-dynamic" ./configure --without-cxx I finally managed to obtain an executable that would start and work, but it fails a couple of test cases: 1) test_coercion reports wrong results for operations with complex
5
10943
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 no exceptions. Even it does not execute the test code we wrote: Dim pd As New PrintDialog pd.ShowDialog()
8
5955
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 is. I thought platform.uname() or just platform.processor() would have done it, but python returns an empty string on windows. Any ideas? Thanks, Ken
0
851
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 the code. On Linux you should be able to uname -m and get a pretty good idea. See man uname. something like: #contents of t.py #----------- import os
5
8792
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 re-save the files in Excel, the program works, but when I use the xls files as they were created by Spss, the program returns an error message (see below). Some details: Python 2.4, xlwt version 0.7.0, xlrd version 0.5.2, Win NT. Any ideas? ...
0
9683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9529
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10231
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9054
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7550
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5443
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4119
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3733
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.