471,350 Members | 1,566 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 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 3062
> 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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by John Abel | last post: by
1 post views Thread by A. B., Khalid | last post: by
3 posts views Thread by Konrad Hinsen | last post: by
3 posts views Thread by Mathias Waack | last post: by
4 posts views Thread by Colin J. Williams | last post: by
2 posts views Thread by eliben | last post: by

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.