Compiling 64 bit python - using wrong stdlibc++

J

John Ky

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
 
J

John Ky

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
 
J

John Ky

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?
 
M

Martin v. =?iso-8859-15?q?L=F6wis?=

John Ky said:
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
 
J

John Ky

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top