Compile on SunOS?

Discussion in 'Python' started by Alex Zhang, Dec 31, 2010.

  1. Alex Zhang

    Alex Zhang Guest

    Hi All,
    I'm trying to build Python 2.7.1 on Sun Solaris 10 amd64, however end up
    with:

    Python build finished, but the necessary bits to build these modules
    were not found:
    _bsddb _tkinter bsddb185
    gdbm linuxaudiodev ossaudiodev
    To find the necessary bits, look in setup.py in detect_modules() for the
    module's name.


    Failed to build these modules:
    _bisect _codecs_cn _codecs_hk
    _codecs_iso2022 _codecs_jp _codecs_kr
    _codecs_tw _collections _csv
    _ctypes _ctypes_test _curses
    _curses_panel _elementtree _functools
    _hashlib _heapq _hotshot
    _io _json _locale
    _lsprof _multibytecodec _multiprocessing
    _random _socket _sqlite3
    _ssl _struct _testcapi
    array audioop binascii
    bz2 cmath cPickle
    crypt cStringIO datetime
    dbm dl fcntl
    future_builtins grp imageop
    itertools math mmap
    nis operator parser
    pyexpat resource select
    spwd strop sunaudiodev
    syslog termios time
    unicodedata zlib

    running build_scripts

    I am using cc provided in Solaris 10, readline downloaded from GNU and
    compiled in 32bit. Also, I added this entry:

    readline readline.c -I/local32/include -L/local32/lib -R/local32/lib
    -lreadline -ltermcap

    to Modules/Setup.local in order to get readline running.
    Currently:

    dns# /opt/python/bin/python
    Python 2.7.1 (r271:86832, Dec 31 2010, 07:21:22) [C] on sunos5
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import hashlib

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/opt/python/lib/python2.7/hashlib.py", line 136, in <module>
    globals()[__func_name] = __get_hash(__func_name)
    File "/opt/python/lib/python2.7/hashlib.py", line 71, in
    __get_builtin_constructor
    import _md5
    ImportError: No module named _md5

    I can not use hashlib and many other modules however I can use the rest
    modules.
    Thanks for all your kind reply.
    --
    OSQDU::Alex
    Alex Zhang, Dec 31, 2010
    #1
    1. Advertising

  2. Alex Zhang

    MrJean1 Guest

    These command lines used to build 32-bit Python 2.4 and 2.5 on Solaris
    10 Opteron using SUN's compilers:

    setenv LD_LIBRARY_PATH ....
    env CCSHARED="-KPIC" LDSHARED="cc -xtarget=native -G" LDFLAGS="-
    xtarget=native" CC="cc" \
    CPP="cc-xtarget=native -E" BASECFLAGS="-xtarget=native" OPT="-xO5"
    CFLAGS="-xtarget=native" \
    CXX="CC -xtarget=native" ./configure --enable-shared --without-gcc
    --disable-ipv6 --prefix=....
    make

    Replace the ....'s accordingly. Use BASECFLAGS="-xtarget=native -
    xlibmieee" for IEEE floating point.

    Disclaimer, I have not tried building Python 2.6 nor 2.7.

    /Jean


    On Dec 31, 8:34 am, Alex Zhang <> wrote:
    > Hi All,
    > I'm trying to build Python 2.7.1 on Sun Solaris 10 amd64, however end up
    > with:
    >
    > Python build finished, but the necessary bits to build these modules
    > were not found:
    > _bsddb             _tkinter           bsddb185
    > gdbm               linuxaudiodev      ossaudiodev
    > To find the necessary bits, look in setup.py in detect_modules() for the
    > module's name.
    >
    > Failed to build these modules:
    > _bisect            _codecs_cn         _codecs_hk
    > _codecs_iso2022    _codecs_jp         _codecs_kr
    > _codecs_tw         _collections       _csv
    > _ctypes            _ctypes_test       _curses
    > _curses_panel      _elementtree       _functools
    > _hashlib           _heapq             _hotshot
    > _io                _json              _locale
    > _lsprof            _multibytecodec    _multiprocessing
    > _random            _socket            _sqlite3
    > _ssl               _struct            _testcapi
    > array              audioop            binascii
    > bz2                cmath              cPickle
    > crypt              cStringIO          datetime
    > dbm                dl                 fcntl
    > future_builtins    grp                imageop
    > itertools          math               mmap
    > nis                operator           parser
    > pyexpat            resource           select
    > spwd               strop              sunaudiodev
    > syslog             termios            time
    > unicodedata        zlib
    >
    > running build_scripts
    >
    > I am using cc provided in Solaris 10, readline downloaded from GNU and
    > compiled in 32bit. Also, I added this entry:
    >
    > readline readline.c -I/local32/include -L/local32/lib -R/local32/lib
    > -lreadline -ltermcap
    >
    > to Modules/Setup.local in order to get readline running.
    > Currently:
    >
    > dns# /opt/python/bin/python
    > Python 2.7.1 (r271:86832, Dec 31 2010, 07:21:22) [C] on sunos5
    > Type "help", "copyright", "credits" or "license" for more information.
    >  >>> import hashlib
    > Traceback (most recent call last):
    >    File "<stdin>", line 1, in <module>
    >    File "/opt/python/lib/python2.7/hashlib.py", line 136, in <module>
    >      globals()[__func_name] = __get_hash(__func_name)
    >    File "/opt/python/lib/python2.7/hashlib.py", line 71, in
    > __get_builtin_constructor
    >      import _md5
    > ImportError: No module named _md5
    >
    > I can not use hashlib and many other modules however I can use the rest
    > modules.
    > Thanks for all your kind reply.
    > --
    > OSQDU::Alex
    MrJean1, Jan 1, 2011
    #2
    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. Nishi Bhonsle
    Replies:
    17
    Views:
    927
    Nishi Bhonsle
    Sep 27, 2004
  2. Billy Patton

    testing on 64/32 Linux/SunOS

    Billy Patton, Apr 26, 2005, in forum: C++
    Replies:
    0
    Views:
    472
    Billy Patton
    Apr 26, 2005
  3. Berthold =?iso-8859-15?q?H=F6llmann?=

    compiling _tkinter.so (2.3) on SunOS 5.8

    Berthold =?iso-8859-15?q?H=F6llmann?=, Aug 26, 2003, in forum: Python
    Replies:
    0
    Views:
    348
    Berthold =?iso-8859-15?q?H=F6llmann?=
    Aug 26, 2003
  4. Replies:
    2
    Views:
    1,732
    gaool
    Sep 16, 2004
  5. Nagaraj
    Replies:
    1
    Views:
    856
    Lionel B
    Mar 1, 2007
Loading...

Share This Page