Compiling 64 bit python - using wrong stdlibc++

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Ky

    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_S OURCE=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

    #2
    Re: Compiling 64 bit python - using wrong stdlibc++

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

    The exact error message is:

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

    Thanks

    -John


    Comment

    • John Ky

      #3
      Re: Compiling 64 bit python - using wrong stdlibc++

      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_PAT H 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" <johnk@aurema.c ommercial> wrote in message
      news:1069813707 .78669@cousin.s w.oz.au...[color=blue][color=green]
      > > And it compiles, but fails to link with /usr/local/lib/stdlibc++.so.5
      > > because it is the 32-bit version.[/color]
      >
      > The exact error message is:
      >
      > ld.so.1: ./python: fatal: /usr/local/lib//libstdc++.so.5: wrong ELF class:
      > ELFCLASS32
      >
      > Thanks
      >
      > -John[/color]


      Comment

      • Martin v. Löwis

        #4
        Re: Compiling 64 bit python - using wrong stdlibc++

        "John Ky" <johnk@aurema.c ommercial> writes:
        [color=blue]
        > The solution can't be to change this environment variable right?[/color]

        If it helps, why not?
        [color=blue]
        > How do you run 32-bit and 64-bit python side by side?[/color]

        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

        Comment

        • John Ky

          #5
          Re: Compiling 64 bit python - using wrong stdlibc++

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

          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


          Comment

          Working...