UNIX_import pyplot:_path.so: symbol _ZNSs4_Rep20_S_empty_rep_storageE:referenced symbol not found

hello,

my message is related to this thread:

http://sourceforge.net/mailarchive/message.php?msg_id=26923108

because i encountered the same problem, and found a workaround, hope this help:

  • i’m using solaris/opensolaris/solaris11express (the name is changing often…), say sunos5

  • i compiled numpy and matplotlib with oracle studio (ex sunstudio), available for free

  • when i got these errors:

ldd -d ./build/lib.solaris-2.11-i86pc-2.6/matplotlib/_delaunay.so

libpython2.6.so.1.0 => /usr/lib/libpython2.6.so.1.0

libdl.so.1 => /lib/libdl.so.1

libm.so.2 => /lib/libm.so.2

libc.so.1 => /lib/libc.so.1

symbol not found: _1cDstdJbad_allocG__vtbl (./build/lib.solaris-2.11-i86pc-2.6/matplotlib/_delaunay.so)

symbol not found: _1cDstdJexceptionG__vtbl (./build/lib.solaris-2.11-i86pc-2.6/matplotlib/_delaunay.so)

symbol not found: 1cDstdZ__RTTI__1nDstdJbad_alloc (./build/lib.solaris-2.11-i86pc-2.6/matplotlib/_delaunay.so)

symbol not found: 1cDstdZ__RTTI__1nDstdJbad_alloc (./build/lib.solaris-2.11-i86pc-2.6/matplotlib/_delaunay.so)

i found that the problem is missing libs, so i re-start the compil line like this:

/usr/lib/python2.6/pyCC -G build/temp.solaris-2.11-i86pc-2.6/lib/matplotlib/delaunay/_delaunay.o build/temp.solaris-2.11-i86pc-2.6/lib/matplotlib/delaunay/VoronoiDiagramGenerator.o build/temp.solaris-2.11-i86pc-2.6/lib/matplotlib/delaunay/delaunay_utils.o build/temp.solaris-2.11-i86pc-2.6/lib/matplotlib/delaunay/natneighbors.o -L/opt/solstudio12.2/lib -lpython2.6 -o build/lib.solaris-2.11-i86pc-2.6/matplotlib/_delaunay.so -lCstd -lCrun

just adding -lCstd -lCrun, and everything is now ok!

i don’t understand why setupext.py forgot to do this, even after modified it:

— setupext.py-ori 2011-06-17 21:43:24.259641908 +0200

+++ setupext.py 2011-06-18 06:49:59.375481456 +0200

@@ -68,7 +68,7 @@

‘freebsd4’ : [’/usr/local’, ‘/usr’],

‘freebsd5’ : [’/usr/local’, ‘/usr’],

‘freebsd6’ : [’/usr/local’, ‘/usr’],

  • ‘sunos5’ : [os.getenv(‘MPLIB_BASE’) or ‘/usr/local’, ‘/usr/sfw’],
  • ‘sunos5’ : [os.getenv(‘MPLIB_BASE’) or ‘/usr/local’, ‘/opt/solstudio12.2’],

‘gnukfreebsd5’ : [’/usr/local’, ‘/usr’],

‘gnukfreebsd6’ : [’/usr/local’, ‘/usr’],

‘gnukfreebsd7’ : [’/usr/local’, ‘/usr’],

@@ -238,6 +238,8 @@

win32_compiler = get_win32_compiler()

if sys.platform == ‘win32’ and win32_compiler == ‘msvc’:

std_libs = []

+elif sys.platform == ‘sunos5’:

  •   std_libs = ['Cstd', 'Crun']
    

else:

std_libs = [‘stdc++’, ‘m’]

hope this help,

gerard