ports/126960: math/py-numpy - setup fails to locate atlas libraries due to faulty path in site.cfg

Arjan Gijsberts arjan at liralab.it
Fri Aug 29 23:40:01 UTC 2008


>Number:         126960
>Category:       ports
>Synopsis:       math/py-numpy - setup fails to locate atlas libraries due to faulty path in site.cfg
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 29 23:40:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Arjan Gijsberts
>Release:        FreeBSD 7.0
>Organization:
>Environment:
FreeBSD fbsd 7.0-RELEASE-p3 FreeBSD 7.0-RELEASE-p3 #8: Thu Aug 28 00:13:32 CEST 2008     root at fbsd:/usr/obj/usr/src/sys/KCONFIG  i386
>Description:
The math/py-numpy port uses a supplied site.cfg that is used during setup for
the localization of libraries, such as atlas (math/atlas). If WITH_ATLAS is
specified, the port should be build using the atlas libraries.

The supplied site.cfg sets the 'library_dirs' search path for atlas to %%LOCALBASE%%, which defaults to /usr/local. The libraries, however, reside (by default) in /usr/local/lib (i.e. %%LOCALBASE%%/lib). In contrast, the 'library_dirs' search path for lapack is specified correctly.

This minor misconfiguration causes the setup to fail to locate the atlas libraries and to fall back to default blas. This may be tricky for some users, as the port seems to have installed properly at first sight.

>How-To-Repeat:
The problem can be repeated by building math/py-numpy with WITH_ATLAS=yes. Output of the build shows that numpy fails to locate the atlas libraries in %%LOCALBASE%%. Further, it can be verified by listing the dynamic object dependencies for lapack_lite.so (in default configurations: ldd /usr/local/lib/python2.5/site-packages/numpy/linalg/lapack_lite.so).
>Fix:
Substitute %%LOCALBASE%% for %%LOCALBASE%%/lib in the library_dirs variable of the atlas section of site.cfg.

Patch attached with submission follows:

--- site.cfg.original	2007-06-25 18:33:24.000000000 +0200
+++ site.cfg	2008-08-30 01:31:51.000000000 +0200
@@ -6,5 +6,5 @@
 # search static libraries (.a) in preference to shared ones (.so)
 search_static_first = 0
 [atlas]
-library_dirs = %%LOCALBASE%%:%%GCCLIBDIR%%
+library_dirs = %%LOCALBASE%%/lib:%%GCCLIBDIR%%
 atlas_libs = %%ATLASLIBS%%


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list