[SciPy-dev] still getting undefined symbols on scipy builds on SunOS

eric jones eric at enthought.com
Fri Jan 24 00:56:30 CST 2003


Hey Pearu,

I've added the mvec library to the SunOS compiler, and that, along with
your additions, solved my build problems on an f90 project that we
discussed a week or so ago.

But, I just noticed scipy doesn't all link correctly on sun now -- at
least the linalg library doesn't on my machine when building with Forte
f90.  I get undefined symbols for s_stop and s_copy on calc_lwork and
_flinalg.  I expect the others have similar problems.

bash-2.05$ nm calc_lwork.so | grep s_copy
[236]   |         0|       0|NOTY |GLOB |0    |UNDEF  |s_copy

When looking at the object file, I don't see this symbol anywhere, which
means it is coming from some other library?

bash-2.05$ nm -A calc_lwork.o | grep s_copy
bash-2.05$

I added f77_compat which has:

bash-2.05$ cd /opt/SUNWspro/lib
bash-2.05$ nm -A *.so | grep s_copy
libf77compat.so: [1800] | 109760| 292|FUNC |GLOB |0  |9   |__s_copy
libf77compat.so: [900]  |      0|   0|FILE |LOCL |0  |ABS |s_copy.c
libfsu.so: [3657]       | 121972| 492|FUNC |GLOB |0  |9   |__f90_s_copy
libfsu.so: [1168]       |      0|   0|FILE |LOCL |0  |ABS |f90s_copy.c

Do you think there is some name mangling issues occurring here, or is it
that I need to add a different library?

Oooo.  I think I figured it out.  I bet my version of atlas was built
with g77.  Yep:

bash-2.05$ cd /usr/lib
bash-2.05$ nm liblapack.a | grep s_copy
[6]     |         0|       0|NOTY |GLOB |0    |UNDEF  |s_copy

So, adding 

-L/opt/sfw/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3 -lg2c

to the link line gets everything to compile.

So, should atlas_info try and go a step further and check what compiler
was used to build lapack and friends?  If it sees g77, it could add the
library g2c and the appropriate library directory to the path.  The
combinations are endless, but, since ATLAS is usually built with gcc,
the given case is probably pretty common.

I'd like to hear your ideas (or anyone elses), as I might have missed an
easier approach.

Thanks,
eric



----------------------------------------------
eric jones                    515 Congress Ave
www.enthought.com             Suite 1614
512 536-1057                  Austin, Tx 78701 







More information about the Scipy-dev mailing list