Compile python on Solaris 64bit

Discussion in 'Python' started by Martijn de Munnik, Oct 12, 2006.

  1. Hi,

    I want to compile python on my solaris 10 system (amd 64 bit).

    I did the following:

    ../configure --prefix=/opt/64/python
    make

    which resulted in this error:
    "Include/pyport.h", line 730: #error: "LONG_BIT definition appears wrong
    for platform (bad gcc/glibc config?)."

    so I edited the file and removed the error line and did a configure and
    make again after a make distclean.

    after a new make I get this error complaining about 32 and 64 bit.

    ld: fatal: file Parser/acceler.o: wrong ELF class: ELFCLASS32

    when I look to the cc statements none of my CFLAGS are passed while these
    are in my environment;

    CC=cc
    CFLAGS=-xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil
    -xlibmopt -xtarget=opteron -xarch=amd64 -xregs=no%frameptr
    CXX=CC
    CXXFLAGS=-xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all
    -xlibmil -xlibmopt -xtarget=opteron -xarch=amd64 -xregs=no%frameptr
    LDFLAGS=-xtarget=opteron -xarch=amd64


    anybody succesfully compiled python on solaris?

    thanks,
    martijn
     
    Martijn de Munnik, Oct 12, 2006
    #1
    1. Advertisements

  2. Martijn de Munnik

    Guest

    Martijn de Munnik wrote:
    > Hi,
    >
    > I want to compile python on my solaris 10 system (amd 64 bit).
    >
    > I did the following:
    >
    > ./configure --prefix=/opt/64/python
    > make
    >
    > which resulted in this error:
    > "Include/pyport.h", line 730: #error: "LONG_BIT definition appears wrong
    > for platform (bad gcc/glibc config?)."
    >
    > so I edited the file and removed the error line and did a configure and
    > make again after a make distclean.
    >
    > after a new make I get this error complaining about 32 and 64 bit.
    >
    > ld: fatal: file Parser/acceler.o: wrong ELF class: ELFCLASS32
    >
    > when I look to the cc statements none of my CFLAGS are passed while these
    > are in my environment;
    >
    > CC=cc
    > CFLAGS=-xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil
    > -xlibmopt -xtarget=opteron -xarch=amd64 -xregs=no%frameptr
    > CXX=CC
    > CXXFLAGS=-xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all
    > -xlibmil -xlibmopt -xtarget=opteron -xarch=amd64 -xregs=no%frameptr
    > LDFLAGS=-xtarget=opteron -xarch=amd64
    >
    >
    > anybody succesfully compiled python on solaris?


    I have compiled Python 2.5 successfully on 32-bit Intel platform. After
    running configure, I had to manually edit the generated Makefile to add
    the contents of CFLAGS.

    I've had difficulties with ctypes, too. To get a successful compile, I
    had to edit ffitarget.h (I think) and also use the Sun Studio Express 2
    compiler suite. Or use gcc.

    >
    > thanks,
    > martijn


    casevh
     
    , Oct 12, 2006
    #2
    1. Advertisements

  3. Il Thu, 12 Oct 2006 16:46:19 +0200 (CEST), Martijn de Munnik ha scritto:

    > Hi,
    >
    > I want to compile python on my solaris 10 system (amd 64 bit).


    Just a question... AFAIK, Solaris 10 64 bit includes binaries & kernels for
    both 64 bit and 32 bit machines. Which binaries are you actually using? I
    think there could be some configuration mismatch between running binaries
    and environment variables that could confuse the compiler.

    --
    Alan Franzoni <>
    -
    Togli .xyz dalla mia email per contattarmi.
    Rremove .xyz from my address in order to contact me.
    -
    GPG Key Fingerprint:
    5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E
    -
    Blog: http://laterradeglieroi.verdiperronchi.com
     
    Alan Franzoni, Oct 12, 2006
    #3
  4. Martijn de Munnik

    MrJean1 Guest

    I did build Python 2.5 on a Solaris 10 Ultra 20 machine (Opteron) but
    using the SUN compilers. Two changes were needed in the Makefile:
    CXX=CC and CCSHARED=-KPIC.

    There are a few issues which I have not investigated further (like Tcl
    and ffitarget.h), but the tests pass except for 3 unexpected skips.
    Other than that, Python 2.5 seems to be running fine, so far.

    Also, I am using the Python 2.4 build for Solaris build from
    ActiveState as well as Python 2.3.3 which is distributed with Solaris
    in /usr/sfw/bin.

    /Jean Brouwers


    Martijn de Munnik wrote:
    > Hi,
    >
    > I want to compile python on my solaris 10 system (amd 64 bit).
    >
    > I did the following:
    >
    > ./configure --prefix=/opt/64/python
    > make
    >
    > which resulted in this error:
    > "Include/pyport.h", line 730: #error: "LONG_BIT definition appears wrong
    > for platform (bad gcc/glibc config?)."
    >
    > so I edited the file and removed the error line and did a configure and
    > make again after a make distclean.
    >
    > after a new make I get this error complaining about 32 and 64 bit.
    >
    > ld: fatal: file Parser/acceler.o: wrong ELF class: ELFCLASS32
    >
    > when I look to the cc statements none of my CFLAGS are passed while these
    > are in my environment;
    >
    > CC=cc
    > CFLAGS=-xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil
    > -xlibmopt -xtarget=opteron -xarch=amd64 -xregs=no%frameptr
    > CXX=CC
    > CXXFLAGS=-xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all
    > -xlibmil -xlibmopt -xtarget=opteron -xarch=amd64 -xregs=no%frameptr
    > LDFLAGS=-xtarget=opteron -xarch=amd64
    >
    >
    > anybody succesfully compiled python on solaris?
    >
    > thanks,
    > martijn
     
    MrJean1, Oct 12, 2006
    #4
  5. Martijn de Munnik schrieb:
    > anybody succesfully compiled python on solaris?


    If that's really all you want to know: yes, I did.
    It works for me on 32-bit SPARC, and 64-bit SPARC.

    If you want to know more, you have to be *a lot*
    more precise as to what precisely you are trying
    to achieve, and how precisely it fails.

    E.g.
    - what Python version?
    - what compiler? If gcc, what precise release?
    - are you attempting to produce 32-bit binaries
    or 64-bit binaries?


    Regards,
    Martin
     
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=, Oct 12, 2006
    #5
    1. Advertisements

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. Nishant Deshpande
    Replies:
    1
    Views:
    384
    Erik de Castro Lopo
    Jul 19, 2003
  2. Jhy-Chun Wang

    build 64bit python on Solaris

    Jhy-Chun Wang, Sep 21, 2004, in forum: Python
    Replies:
    3
    Views:
    675
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Sep 21, 2004
  3. Nagaraj
    Replies:
    1
    Views:
    1,008
    Lionel B
    Mar 1, 2007
  4. miamia
    Replies:
    1
    Views:
    396
    Andrew Berg
    Jun 24, 2011
  5. Rich

    64bit perl for Solaris

    Rich, Nov 23, 2005, in forum: Perl Misc
    Replies:
    2
    Views:
    271
Loading...

Share This Page