Mantis - python
Viewing Issue Advanced Details
3510 regular use minor always 2009-03-28 09:22 2009-04-04 05:42
maciej  
mwatters  
normal  
closed  
fixed  
none    
none  
0003510: 'import curses' fails in currrent Python (2.6.1,REV=2009.03.02)
I'm unable to import 'curses' module in current Python. The same symptom is observed on x86 and sparc.

maciej@vsol01 ~ $ pkgparam CSWpython VERSION
2.6.1,REV=2009.03.02
maciej@vsol01 ~ $ python
Python 2.6.1 (r261:67515, Mar 2 2009, 15:07:22) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import curses
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/csw/lib/python2.6/curses/__init__.py", line 15, in <module>
    from _curses import *
ImportError: ld.so.1: python: fatal: relocation error: file /opt/csw/lib/python2.6/lib-dynload/_cursesmodule.so: symbol wchgat: referenced symbol not found

ncurses is installed:

maciej@vsol01 ~ $ pkgparam CSWncurses VERSION
5.7,REV=2009.01.23


On sparc, it looks like this:

maciej@netra ~ $ python
Python 2.6.1 (r261:67515, Mar 2 2009, 14:14:28) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import curses
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/csw/lib/python2.6/curses/__init__.py", line 15, in <module>
    from _curses import *
ImportError: ld.so.1: python: fatal: relocation error: file /opt/csw/lib/python2.6/lib-dynload/_cursesmodule.so: symbol mvwchgat: referenced symbol not found
>>>
Issue History
2009-03-28 09:22 maciej New Issue
2009-03-28 16:16 mwatters Note Added: 0005773
2009-03-28 16:16 mwatters Assigned To => mwatters
2009-03-28 16:16 mwatters Status new => confirmed
2009-04-01 23:49 mwatters Note Added: 0005812
2009-04-01 23:49 mwatters Status confirmed => feedback
2009-04-02 08:20 mwatters Note Added: 0005818
2009-04-02 08:20 mwatters Status feedback => resolved
2009-04-02 08:20 mwatters Resolution open => fixed
2009-04-02 16:34 mwatters Note Added: 0005820
2009-04-02 16:34 mwatters Status resolved => assigned
2009-04-03 22:04 mwatters Note Added: 0005830
2009-04-03 22:04 mwatters Status assigned => resolved
2009-04-04 05:42 mwatters Note Added: 0005844
2009-04-04 05:42 mwatters Status resolved => closed

Notes
(0005773)
mwatters   
2009-03-28 16:16   
$ ldd /opt/csw/lib/python2.6/lib-dynload/_cursesmodule.so
        libcurses.so.1 => /usr/lib/libcurses.so.1
        libc.so.1 => /usr/lib/libc.so.1
        libdl.so.1 => /usr/lib/libdl.so.1
        /usr/platform/SUNW,SPARC-Enterprise-T5220/lib/libc_psr.so.1
The error seems to be from the runtime linker path. as you can see _cursesmodule.so is linked against /usr/lib/libcurses.so.1 and not /opt/csw/lib/libcurses.so.1 I am not sure what happened here as the recipe has the correct runtime linker paths. I will investigate
(0005812)
mwatters   
2009-04-01 23:49   
I have relinked the curses module to the appropriate library.
Please check out the version in "testing" and let me know if
you have any issues with it.

-- Mike
(0005818)
mwatters   
2009-04-02 08:20   
resolved in the current version in testing.

will close when released.
(0005820)
mwatters   
2009-04-02 16:34   
Re-assigning back to myself to change status from resolved as the condition still applies.
(0005830)
mwatters   
2009-04-03 22:04   
fixed in the revision currently in testing.
will close when released.
(0005844)
mwatters   
2009-04-04 05:42   
fixed in current revision