[SciPy-user] Undefined symbol "ATL_cpttrsm"

Pearu Peterson pearu at scipy.org
Sun Oct 31 13:22:01 EST 2004



On Sun, 31 Oct 2004, Lee Harr wrote:

>>> ImportError: /usr/local/lib/libptf77blas.so.1: Undefined symbol 
>>> "ATL_cpttrsm"
>>> 
>>> 
>>> Any hints on how to fix this are appreciated ...
>> 
>> Symbol "ATL_cpttrsm" should be defined in atlas library, try `nm 
>> /usr/local/lib/libatlas.* | grep ATL_cpttrsm`.
>
> $nm /usr/local/lib/libatlas.so.1 | grep ATL_cpttrsm
> $nm /usr/local/lib/libatlas.a | grep ATL_cpttrsm
> $nm /usr/local/lib/libatlas_r.so.1 | grep ATL_cpttrsm
> 005cfeb8 T ATL_cpttrsm
> 005cfc48 T ATL_cpttrsm0
> 005cfca8 T ATL_cpttrsm_nt
> $nm /usr/local/lib/libatlas_r.a | grep ATL_cpttrsm
>        U ATL_cpttrsm0
> ATL_cpttrsm.o:
> 00000244 T ATL_cpttrsm
> 00000000 T ATL_cpttrsm0
> 00000054 T ATL_cpttrsm_nt
>
>
>> So it looks like atlas library was not used during the linking of flapack 
>> extension module or -lptf77blas was specified after -latlas.
>> 
>> What is the output (both stdout and stderr) of
>> 
>>>>> from scipy_distutils.system_info import get_info
>>>>> get_info('lapack_opt')
>> 
>
>
>
>>>> get_info('lapack_opt')

<snip>

> build/lib.freebsd-4.10-STABLE-i386-2.3/atlas_version.so
> FOUND:
>   libraries = ['lapack', 'ptf77blas', 'ptcblas', 'atlas']
>   library_dirs = ['/usr/local/lib']
>   language = f77
>   define_macros = [('ATLAS_INFO', '"\\"3.6.0\\""')]
>   include_dirs = ['/usr/local/include']
>
> {'libraries': ['lapack', 'ptf77blas', 'ptcblas', 'atlas'], 'library_dirs': 
> ['/usr/local/lib'], 'language': 'f77', 'define_macros': [('ATLAS_INFO', 
> '"\\"3.6.0\\""')], 'include_dirs': ['/usr/local/include']}
>
>
>
> so... it looks like the threaded (_r) libs have the symbol, but not
> the unthreaded, but the threaded libs were not linked in ...

Hmm, it looks like there are other _r libs as well in freebsd version of 
atlas:

   http://www.freebsd.org/cgi/cvsweb.cgi/ports/math/atlas-devel/pkg-plist?rev=1.1&content-type=text/x-cvsweb-markup

Do you know where the usage of atlas _r-libraries is documented? I am 
pretty sure that official atlas does not build such libraries.

> I am looking around (through ...Lib/linalg/...)  but I do not see where
> I might point the build to the correct lib.

This should be done in scipy_distutils/system_info.py. Look for
the definition of *atlas_threads* classes. If freebsd uses for 
_r-libraries for threaded linking then pt{f77,c}blas should be replaced
with {f77,c}blas_r but I am not sure, the usage of _r-libraries looks odd 
to me. Could anyone explain why freebsd introduces _r-libraries?

And thanks for your feedback! We have had reports from freebsd users 
having also trouble building scipy but yours one is a step forward for 
resolving this issue.

Pearu




More information about the SciPy-User mailing list