scipy fblas.so functions not found
I'm hoping somebody could offer some advice. I've been stymied for a while trying to build/install a good working version of scipy-0.5.2 on a Saturn Cluster that's running Red Hat RHEL4-U4. I'm using gcc version 3.4.6 and python-2.5. I've tried to build the Atlas variation, but was unsuccessful, so I back-tracked and reverted to building and installing numpy and then scipy. Going this route, scipy at least built and installed OK, but now, the fblas.so library is missing functions and a user reported to me that they got the following error: ImportError: /usr/local/lib/python2.5/site-packages/scipy/linalg/fblas.so: undefined symbol: srotmg_ If anybody can offer some advice on a fix or work around for this, I'd appreciate it! Thanks in advance! Charlie Yanaitis
Received from Charlie Yanaitis on Thu, Jun 14, 2007 at 08:12:26AM EDT:
I'm hoping somebody could offer some advice. I've been stymied for a while trying to build/install a good working version of scipy-0.5.2 on a Saturn Cluster that's running Red Hat RHEL4-U4. I'm using gcc version 3.4.6 and python-2.5. I've tried to build the Atlas variation, but was unsuccessful, so I back-tracked and reverted to building and installing numpy and then scipy. Going this route, scipy at least built and installed OK, but now, the fblas.so library is missing functions and a user reported to me that they got the following error:
ImportError: /usr/local/lib/python2.5/site-packages/scipy/linalg/fblas.so: undefined symbol: srotmg_
If anybody can offer some advice on a fix or work around for this, I'd appreciate it!
Thanks in advance!
Charlie Yanaitis
The lapack libraries you are using probably were not compiled against the full blas source (the lapack source package from netlib includes an incomplete subset of the blas source files). You might want to try rebuilding the lapack rpm from Fedora 6 or 7 on your system; it appears to include a patch providing the missing blas routines. L.G.
Received from Lev Givon on Thu, Jun 14, 2007 at 09:41:22AM EDT:
Received from Charlie Yanaitis on Thu, Jun 14, 2007 at 08:12:26AM EDT:
I'm hoping somebody could offer some advice. I've been stymied for a while trying to build/install a good working version of scipy-0.5.2 on a Saturn Cluster that's running Red Hat RHEL4-U4. I'm using gcc version 3.4.6 and python-2.5. I've tried to build the Atlas variation, but was unsuccessful, so I back-tracked and reverted to building and installing numpy and then scipy. Going this route, scipy at least built and installed OK, but now, the fblas.so library is missing functions and a user reported to me that they got the following error:
ImportError: /usr/local/lib/python2.5/site-packages/scipy/linalg/fblas.so: undefined symbol: srotmg_
If anybody can offer some advice on a fix or work around for this, I'd appreciate it!
Thanks in advance!
Charlie Yanaitis
The lapack libraries you are using probably were not compiled against the full blas source (the lapack source package from netlib includes an incomplete subset of the blas source files). You might want to try rebuilding the lapack rpm from Fedora 6 or 7 on your system; it appears to include a patch providing the missing blas routines.
L.G.
I neglected to mention that Fedora also includes an atlas rpm that you might want to try rebuilding on RHEL instead of the lapack package. L.G.
Lev, Lev Givon <lev <at> columbia.edu> writes:
Received from Lev Givon on Thu, Jun 14, 2007 at 09:41:22AM EDT:
Received from Charlie Yanaitis on Thu, Jun 14, 2007 at 08:12:26AM EDT:
I'm hoping somebody could offer some advice. I've been stymied for a while trying to build/install a good working version of scipy-0.5.2 on a Saturn Cluster that's running Red Hat RHEL4-U4. I'm using gcc version 3.4.6 and python-2.5. I've tried to build the Atlas variation, but was unsuccessful, so I back-tracked and reverted to building and installing numpy and then scipy. Going this route, scipy at least built and installed OK, but now, the fblas.so library is missing functions and a user reported to me that they got the following error:
ImportError: /usr/local/lib/python2.5/site-packages/scipy/linalg/fblas.so: undefined symbol: srotmg_
If anybody can offer some advice on a fix or work around for this, I'd appreciate it!
Thanks in advance!
Charlie Yanaitis
The lapack libraries you are using probably were not compiled against the full blas source (the lapack source package from netlib includes an incomplete subset of the blas source files). You might want to try rebuilding the lapack rpm from Fedora 6 or 7 on your system; it appears to include a patch providing the missing blas routines.
L.G.
I neglected to mention that Fedora also includes an atlas rpm that you might want to try rebuilding on RHEL instead of the lapack package.
L.G.
Thanks for the advice. I went ahead and got the atlas libraries for Linux_HAMMER64SSE2, put the libraries in place and got the following error when building scipy-0.5.2: /usr/bin/ld: /usr/local/lib/libf77blas.a(dscal.o): relocation R_X86_64_PC32 against `atl_f77wrap_dscal__' can not be used when making a shared object; recompile with -fPIC The above error is what has stymied me with the Atlas version all along. I even got the source code for Atlas and tried to build it myself with gcc, with -fPIC. Here's the lines in the Makefile: SHELL = /bin/sh CC = gcc NM = -o OJ = -c F77 = /usr/bin/g77 F77FLAGS = -fomit-frame-pointer -O -m64 -fPIC FLINKER = $(F77) FLINKFLAGS = $(F77FLAGS) FCLINKFLAGS = $(FLINKFLAGS) It builds fine, but when I try to build scipy-0.5.2, I get the above error to "recompile with -fPIC", when I *did* build Atlas with -fPIC. It's been pretty frustrating. Thanks! Charlie
Received from Charlie Yanaitis on Thu, Jun 14, 2007 at 12:39:53PM EDT:
Lev,
(snip)
I neglected to mention that Fedora also includes an atlas rpm that you might want to try rebuilding on RHEL instead of the lapack package.
L.G.
Thanks for the advice. I went ahead and got the atlas libraries for Linux_HAMMER64SSE2, put the libraries in place and got the following error when building scipy-0.5.2:
/usr/bin/ld: /usr/local/lib/libf77blas.a(dscal.o): relocation R_X86_64_PC32 against `atl_f77wrap_dscal__' can not be used when making a shared object; recompile with -fPIC
The above error is what has stymied me with the Atlas version all along. I even got the source code for Atlas and tried to build it myself with gcc, with -fPIC. Here's the lines in the Makefile:
SHELL = /bin/sh CC = gcc NM = -o OJ = -c F77 = /usr/bin/g77 F77FLAGS = -fomit-frame-pointer -O -m64 -fPIC FLINKER = $(F77) FLINKFLAGS = $(F77FLAGS) FCLINKFLAGS = $(FLINKFLAGS)
It builds fine, but when I try to build scipy-0.5.2, I get the above error to "recompile with -fPIC", when I *did* build Atlas with -fPIC. It's been pretty frustrating.
Thanks!
Charlie
Being that the binary atlas rpm in Fedora is built with gfortran rather than g77, you should try using the former when you build scipy. L.G.
Lev Givon <lev <at> columbia.edu> writes:
Being that the binary atlas rpm in Fedora is built with gfortran rather than g77, you should try using the former when you build scipy.
Thanks again for your help! I tried gfortran and still got the "recompile with -fPIC" error. I'm going to set this aside and then revisit it. Maybe when I come back to try again, I'll notice something I may have missed. Thanks again and have a great weekend!
Lev Givon <lev <at> columbia.edu> writes:
Being that the binary atlas rpm in Fedora is built with gfortran rather than g77, you should try using the former when you build scipy.
There's another guy, Karl Elder, who's having the same problem as me except it's with Suse 10.2 . Check out the thread, Problems compiling scipy on SuSE 10.2. Regards!
I was trying the build on the same arch. I have managed to build scipy/numpy. Please read below of how I did it. frist I installed from the redhat cd gcc4, gcc4-fortran, and libgfortran. When I tried to build lapack-3.1.1-1.fc7.src.rpm I got the same relocation errors. I figured that something wasn't write, so I I built gcc4-4.1.1-53.EL4.src.rpm from src. I checked the Makefile before hand and it seemed to be configured to build the libraries shared. from the resulting rpms I installed gcc4-4.1.1-53.EL4.x86_64.rpm gcc4-c++-4.1.1-53.EL4.x86_64.rpm gcc4-gfortran-4.1.1-53.EL4.x86_64.rpm libgcj4-4.1.1-53.EL4.x86_64.rpm libgcj4-devel-4.1.1-53.EL4.x86_64.rpm libgfortran-4.1.1-53.EL4.x86_64.rpm libgomp-4.1.1-53.EL4.x86_64.rpm libmudflap-4.1.1-53.EL4.x86_64.rpm this time I was able to build lapack. I then installed both lapack and blas and their devel rpms. lapack-3.1.1-1.x86_64.rpm blas-3.1.1-1.x86_64.rpm I downloaded, built and install numpy-1.0.3-1.src.rpm. I found scipy-0.5.1-1.src.rpm on rpmfind, and fftw-3.1.2-3.fc6.src.rpm a prereq for scipy. fftw-3.1.2-3 fftw-devel-3.1.2-3 I had to alter the fc7 src rpm's spec files to change the gcc-gfortan prereq to gcc4-gfortran and before building scipy I had to export BLAS=/usr/lib64 and LAPACK=/usr/lib64 even though I had the dir in my lib path. after installing scipy I tested numpy and scipy with
import numpy, scipy numpy.test() scipy.test()
The numpy test passed however some (?) of the scipy test failed. I tried the examples on http://www.scipy.org/scipy_Example_List and they seemed to work. I've put the rpms I built (along with src rpms) up at http://www.sharova.com/scipy_rhas44x86_64/ good luck, Fahd build server: vmware virtual server redhat AS 4.4 Linux rhas44-x86-64.vm.fooie.net 2.6.9-42.EL #1 Wed Jul 12 23:15:20 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux Charlie Yanaitis wrote:
Lev Givon <lev <at> columbia.edu> writes:
Being that the binary atlas rpm in Fedora is built with gfortran rather than g77, you should try using the former when you build scipy.
Thanks again for your help! I tried gfortran and still got the "recompile with -fPIC" error. I'm going to set this aside and then revisit it. Maybe when I come back to try again, I'll notice something I may have missed.
Thanks again and have a great weekend!
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
Fahd Sultan wrote:
I was trying the build on the same arch. I have managed to build scipy/numpy. Please read below of how I did it.
The fpic error has nothing to do with the compiler you are using (assuming they are not buggy of course :) ), but all to do with the packaging of the blas/lapack you got. Please note that working rpm for numpy and scipy, as well as working blas/lapack are available there: http://software.opensuse.org/download/home:/ashigabou/ I added support for 64 bits arch and Fedora Core 7 a few days ago. If this does not work for you, I would like to hear it (I am the maintainer of this repository, but do not use fedora, so even if I try to produce good quality packages, there may be some errors). David
I had to recompile the rpms from your src rpms since the rpms dont install on Redhat AS 4.4. during the build of python-numpy I get this error: (any ideas?) I couldn't find an aborted install anywhere, not sure whats going on with this RPM. Charlie have you tried these src rpms yet? Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.45867 + umask 022 + cd /usr/src/redhat/BUILD + cd numpy-1.0.3 + LANG=C + export LANG + unset DISPLAY + /usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/numpy-1.0.3 0 blocks find: /var/tmp/python-numpy-1.0.3-build/usr/lib/debug: No such file or directory + /usr/lib/rpm/redhat/brp-compress + /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump Processing files: python-numpy-1.0.3-13.4 error: File not found by glob: /var/tmp/python-numpy-1.0.3-build/usr/bin/* error: File not found by glob: /var/tmp/python-numpy-1.0.3-build/usr/lib64/python*/site-packages/numpy error: File not found by glob: /var/tmp/python-numpy-1.0.3-build/usr/lib64/python*/site-packages/numpy*.egg-info error: File not found by glob: /var/tmp/python-numpy-1.0.3-build/usr/lib64/python*/site-packages/COMPATIBILITY error: File not found by glob: /var/tmp/python-numpy-1.0.3-build/usr/lib64/python*/site-packages/scipy_compatibility error: File not found by glob: /var/tmp/python-numpy-1.0.3-build/usr/lib64/python*/site-packages/site.cfg.example Processing files: python-numpy-debuginfo-1.0.3-13.4 RPM build errors: File not found by glob: /var/tmp/python-numpy-1.0.3-build/usr/bin/* File not found by glob: /var/tmp/python-numpy-1.0.3-build/usr/lib64/python*/site-packages/numpy File not found by glob: /var/tmp/python-numpy-1.0.3-build/usr/lib64/python*/site-packages/numpy*.egg-info File not found by glob: /var/tmp/python-numpy-1.0.3-build/usr/lib64/python*/site-packages/COMPATIBILITY File not found by glob: /var/tmp/python-numpy-1.0.3-build/usr/lib64/python*/site-packages/scipy_compatibility File not found by glob: /var/tmp/python-numpy-1.0.3-build/usr/lib64/python*/site-packages/site.cfg.example David Cournapeau wrote:
Fahd Sultan wrote:
I was trying the build on the same arch. I have managed to build scipy/numpy. Please read below of how I did it.
The fpic error has nothing to do with the compiler you are using (assuming they are not buggy of course :) ), but all to do with the packaging of the blas/lapack you got.
Please note that working rpm for numpy and scipy, as well as working blas/lapack are available there:
http://software.opensuse.org/download/home:/ashigabou/
I added support for 64 bits arch and Fedora Core 7 a few days ago. If this does not work for you, I would like to hear it (I am the maintainer of this repository, but do not use fedora, so even if I try to produce good quality packages, there may be some errors).
David _______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
I had to recompile the rpms from your src rpms since the rpms dont install on Redhat AS 4.4. Mmmh, this distribution is not supported by the build system, so if
Fahd Sultan wrote: package convention differ, it may cause problems I see unnoticed, since every rpm distribution decides it is a good idea to change conventions. I assumed wrongly that you used fedora core, not the official RH thing. The distribution I am supporting for now are FC (5, 6, and 7) on x86 and x86_64 and opensuse (both x86 and x86_64). That does not mean I am not interested in improving the rpm for AS support, of course; it will just be trickier because I do not have access to such a distribution, and packaging is highly distribution dependent.
during the build of python-numpy I get this error: (any ideas?) I couldn't find an aborted install anywhere, not sure whats going on with this RPM.
Do you use 32 or 64 bits arch ? The problem seems to be related to the library location. What would be useful for me is a complete log of the rpm building (rpmbuild -ba python-numpy.spec &> build.log). Below are a more detailed explanation on the problem: If you do not know anything about rpm packaging, here is the problem: build rpm from sources involve a series of steps, the last one being install, where you list the files to be installed. For example, all python2.4 files are installed in /usr/lib/python2.4/site-packages/ (/usr/lib64/python2.4/site-packages for 64 bits arch). You can see in the python-numpy.spec file: %files %defattr(-,root,root,-) %{_bindir}/* # the following does not work on 64 bits arch. #%{py_sitedir}/* # I shamelessly copied the install from official fedora core numeric. %{_libdir}/python*/site-packages/numpy/ # the egg is not produced on fedora 7 (something to do with different # configuration wrt setuptools on the build farm ?) %if 0%{?fedora_version} %define NUMPY_EGG 0 %else %define NUMPY_EGG 1 %endif %if %{NUMPY_EGG} %{_libdir}/python*/site-packages/numpy*.egg-info %endif # Why the following are installed ??? %{_libdir}/python*/site-packages/COMPATIBILITY %{_libdir}/python*/site-packages/scipy_compatibility %{_libdir}/python*/site-packages/site.cfg.example Now, in your case, it seems like there is nothing in /var/tmp/python-numpy-1.0.3-build/usr/lib64/python*/site-packages/numpy which is a bit strange... As I don't have access to redhat AS, it would be useful for me to know which files are where, to see if the fs layout is different. David
Hi, I figured out the issues. I had to alter the spec files for redhat 4 AS. for instance I had to add to each spec file: %define is_redhat %(test -e /etc/redhat-release && echo 1 || echo 0) I had to add a condition BuildRequires and requires to use gcc4-gfortan and lapack as opposed to gcc-fortran and lapack3 --from python-numpy.spec %if %is_redhat BuildRequires: gcc4-gfortran python python-devel lapack-devel > 3.0 refblas3-devel requires: gcc4-gfortran lapack > 3.0 refblas3 %endif "--record=INSTALLED_FILES" gave me an error when I tested manually so I also added: %if %is_redhat python setup.py install --root=$RPM_BUILD_ROOT \ --prefix=/usr %endif and %if %is_redhat %define NUMPY_EGG 0 %endif David Cournapeau wrote:
Fahd Sultan wrote:
I had to recompile the rpms from your src rpms since the rpms dont install on Redhat AS 4.4.
Mmmh, this distribution is not supported by the build system, so if package convention differ, it may cause problems I see unnoticed, since every rpm distribution decides it is a good idea to change conventions. I assumed wrongly that you used fedora core, not the official RH thing.
The distribution I am supporting for now are FC (5, 6, and 7) on x86 and x86_64 and opensuse (both x86 and x86_64). That does not mean I am not interested in improving the rpm for AS support, of course; it will just be trickier because I do not have access to such a distribution, and packaging is highly distribution dependent.
during the build of python-numpy I get this error: (any ideas?) I couldn't find an aborted install anywhere, not sure whats going on with this RPM.
Do you use 32 or 64 bits arch ? The problem seems to be related to the library location. What would be useful for me is a complete log of the rpm building (rpmbuild -ba python-numpy.spec &> build.log). Below are a more detailed explanation on the problem:
If you do not know anything about rpm packaging, here is the problem: build rpm from sources involve a series of steps, the last one being install, where you list the files to be installed. For example, all python2.4 files are installed in /usr/lib/python2.4/site-packages/ (/usr/lib64/python2.4/site-packages for 64 bits arch). You can see in the python-numpy.spec file:
%files %defattr(-,root,root,-) %{_bindir}/* # the following does not work on 64 bits arch. #%{py_sitedir}/* # I shamelessly copied the install from official fedora core numeric. %{_libdir}/python*/site-packages/numpy/ # the egg is not produced on fedora 7 (something to do with different # configuration wrt setuptools on the build farm ?) %if 0%{?fedora_version} %define NUMPY_EGG 0 %else %define NUMPY_EGG 1 %endif
%if %{NUMPY_EGG} %{_libdir}/python*/site-packages/numpy*.egg-info %endif # Why the following are installed ??? %{_libdir}/python*/site-packages/COMPATIBILITY %{_libdir}/python*/site-packages/scipy_compatibility %{_libdir}/python*/site-packages/site.cfg.example
Now, in your case, it seems like there is nothing in
/var/tmp/python-numpy-1.0.3-build/usr/lib64/python*/site-packages/numpy
which is a bit strange... As I don't have access to redhat AS, it would be useful for me to know which files are where, to see if the fs layout is different.
David
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
participants (4)
-
Charlie Yanaitis -
David Cournapeau -
Fahd Sultan -
Lev Givon