Compiling 64 bit python - using wrong stdlibc++

Discussion in 'Python' started by John Ky, Nov 26, 2003.

  1. John Ky

    John Ky Guest

    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
    John Ky, Nov 26, 2003
    #1
    1. Advertising

  2. John Ky

    John Ky Guest

    > 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
    John Ky, Nov 26, 2003
    #2
    1. Advertising

  3. John Ky

    John Ky Guest

    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" <> wrote in message
    news:...
    > > 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
    John Ky, Nov 26, 2003
    #3
  4. "John Ky" <> 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
    Martin v. =?iso-8859-15?q?L=F6wis?=, Nov 26, 2003
    #4
  5. John Ky

    John Ky Guest

    > 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
    John Ky, Nov 28, 2003
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    1,720
    Timothy Bendfelt
    Jan 19, 2007
  2. Mathias Waack
    Replies:
    3
    Views:
    460
    Andrew MacIntyre
    May 27, 2007
  3. Replies:
    9
    Views:
    941
    Juha Nieminen
    Aug 22, 2007
  4. Mikko Ohtamaa
    Replies:
    2
    Views:
    2,080
  5. Jeff.M
    Replies:
    6
    Views:
    163
    Lasse Reichstein Nielsen
    May 4, 2009
Loading...

Share This Page