472,958 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Compiling 64 bit python - using wrong stdlibc++

How do get python to build with the 64-bit version of stdlibc++?

For instance, I tried this:

export CC="gcc -mcpu=v9 -m64 -D_LARGEFILE64_SOURCE=1"
export LDFLAGS='-mcpu=v9 -m64'
export LDDFLAGS='-mcpu=v9 -m64 -G'
../configure --disable-ipv6 --prefix="$PWD/../local"
make

And it compiles, but fails to link with /usr/local/lib/stdlibc++.so.5
because it is the 32-bit version.

The 64-bit version, I believe is at /usr/local/lib/sparcv9/stdlibc++.so.5

Thanks

-John
Jul 18 '05 #1
4 3092
> And it compiles, but fails to link with /usr/local/lib/stdlibc++.so.5
because it is the 32-bit version.


The exact error message is:

ld.so.1: ./python: fatal: /usr/local/lib//libstdc++.so.5: wrong ELF class:
ELFCLASS32

Thanks

-John
Jul 18 '05 #2
I just released that it isn't the linking process that's throwing the
error message. It's that near the end of the build process, the
build tries to run python and it can't because my
$LD_LIBRARY_PATH is pointing to the 32-bit libraries.

The solution can't be to change this environment variable right?

How do you run 32-bit and 64-bit python side by side?

"John Ky" <jo***@aurema.commercial> wrote in message
news:10**************@cousin.sw.oz.au...
And it compiles, but fails to link with /usr/local/lib/stdlibc++.so.5
because it is the 32-bit version.


The exact error message is:

ld.so.1: ./python: fatal: /usr/local/lib//libstdc++.so.5: wrong ELF class:
ELFCLASS32

Thanks

-John

Jul 18 '05 #3
"John Ky" <jo***@aurema.commercial> writes:
The solution can't be to change this environment variable right?
If it helps, why not?
How do you run 32-bit and 64-bit python side by side?


Running them side-by-side is possible by giving different --prefix
options to configure. However, that is not your problem: you have
problems *building* them side-by-side.

I recommend that you don't compile Python with a C++ compiler, i.e. by
giving --without-cxx to configure. Then the problem of linking
libstdc++ goes away.

Regards,
Martin
Jul 18 '05 #4
> I recommend that you don't compile Python with a C++ compiler, i.e.
by giving --without-cxx to configure. Then the problem of linking
libstdc++ goes away.


I still need to setup LD_LIBRARY_PATH because it needs other
libraries besides libstdc++. People are telling me I shouldn't need to
do this. Maybe my box has a perculiar setup.

I'm taking your advice anyway because g++ is hopelessly slow and
anything that speeds up the build process is welcome.

Thanks

-John
Jul 18 '05 #5

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

Similar topics

4
by: John Abel | last post by:
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...
1
by: A. B., Khalid | last post by:
Hello all. After a search on Google it would seem that the users of Mingw have not had good results in compiling the python sources natively. See at least: ...
6
by: Martin Bless | last post by:
The good news: Along with Python-2.4 comes really good news to Windows users. Yes, you now CAN build extension modules yourself using the SAME C++ compiler and linker Python is built with...
0
by: Martin Bless | last post by:
I need to access a MSSQL database (MS-Sql, not MySQL!)and would very much like to use mssql-0.09.tar.gz which is available from http://www.object-craft.com.au/projects/mssql/download.html ...
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,- ...
3
by: Mathias Waack | last post by:
After switching my development environment to 64 bit I've got a problem with a python extension for a 32 bit application. Compiling the app under Linux results in the following error: g++ -m32...
6
by: grbgooglefan | last post by:
I am compiling CPP program which uses CPython API functions from Python 2.5.1 source code First I compiled with this commanline, that time I got "pyconfig.h" not found. g++ -Os -I../../Include...
4
by: Colin J. Williams | last post by:
1.I have both 2.5 and 2.6 but both appear, under Recent Projects, as pcbuild. It would be helpful if the Python Version could be indicated. 2.With 2.6, Python compiles and executes OK but...
2
by: eliben | last post by:
On Jun 27, 3:10 pm, eliben <eli...@gmail.comwrote: Problem solved: http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
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...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.