In FreeBSD, the atlas libraries have a slightly different naming convention than that expected by SciPy. In particular, the threaded versions of the libraries end in "_r", which SciPy does not expect. Thus, it links against the wrong libraries. When you use the SciPy libraries, they throw an ImportError reporting that they are unable to find symbols they need. I have seen two such errors: ImportError: /usr/local/lib/libptf77blas.so.1: Undefined symbol "ATL_cpttrsm" when using the optimize package, and then, after a fix was applied for the above, ImportError: /usr/local/lib/python2.3/site-packages/scipy/linalg/clapack.so: Undefined symbol "clapack_sgesv" when using the linear algebra package. Fix: Before building the port, change the file scipy_core/scipy_distutils/system_info.py so that lines 547-549, which formally read atlas_libs = self.get_libs('atlas_libs', self._lib_names + ['atlas']) lapack_libs = self.get_libs('lapack_libs',['lapack']) now read atlas_libs = self.get_libs('atlas_libs', self._lib_names + ['atlas_r']) lapack_libs = self.get_libs('lapack_libs',['alapack_r']) (I changed the names of the libraries slightly: 'atlas'->'atlas_r' and 'lapack'->'alapack_r'.) A patch has been included which does this automatically. It can just be dropped directly into the "files/" directory in the science/py-scipy port. How-To-Repeat: Build and install the science/scipy port. Run python and type in the commands: from scipy.optimize.optimize import * fmin_bfgs ImportError: /usr/local/lib/libptf77blas.so.1: Undefined symbol "ATL_cpttrsm"
The patch I had meant to include with the problem report is attached to this e-mail. My apologies. - Greg
Responsible Changed From-To: freebsd-ports-bugs->vs vs already owns two other scipy PRs
State Changed From-To: open->closed Committed, thanks!