473,383 Members | 1,919 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,383 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 3098
> 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/
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.