You are not logged in.

#1 2008-03-28 12:15:15

ccchris
Member
Registered: 2006-09-25
Posts: 16

python-numpy broken

Ok, my first pacman upgrade error ever I haven't been able to solve by a search in this forum, I'm afraid it might not be so straight forward.

Last night doing a pacman -Syu gave me an error that said gcc-fortran was missing, found this http://bbs.archlinux.org/viewtopic.php?id=45642 thread and made a change in the PKGBUILD dependecy list from "gcc-fortran" to "gcc-libs". After that pacman -Su worked.

However, today trying to work on a school project requiring python-numpy I got this error while trying to run my code:

  ...
File "/usr/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 25, in <module>
    from numpy.linalg import lapack_lite
ImportError: libgfortran.so.2: cannot open shared object file: No such file or directory

A quick look in /usr/lib/ showed no libgfortran.so.2 file but a libgfortran.so.3 file. Hoping for a quick fix so I could continue my work I made a symlink libgfortran.so.2 -> libgfortran.so.3. But it gave me this error:

  ...
File "/usr/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 25, in <module>
    from numpy.linalg import lapack_lite
ImportError: /usr/lib/libblas.so.3: undefined symbol: scabs1_

I would guess that the python-numpy package isn't updated to use the new fortran libs? If anyone have any idea how to fix this I would be greatful.

Last edited by ccchris (2008-03-28 12:17:00)

Offline

#2 2008-03-28 12:22:57

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 9,939
Website

Re: python-numpy broken

Rebuilding python-numpy against the new fortran library is the best option.  Look at ABS and makepkg in the wiki.

Offline

#3 2008-03-28 13:10:32

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,515
Website

Re: python-numpy broken

I have seen the problem before with a number of .so files, and usually this will fix it:
1. as root go to /usr/lib
2. make a symlink to libgfortran.so, like this: ln -s libgfortran.so libgfortran.so.2

Hope this helps.

R.

Offline

#4 2008-03-28 16:08:12

ToLo
Member
From: Flensburg/Germany
Registered: 2006-02-12
Posts: 33

Re: python-numpy broken

The problem is inside the package blas.

There is already a bugreport with a description how to solve it. Take a look here:
http://bugs.archlinux.org/task/9905?pro … &pagenum=2
ToLo

Offline

#5 2008-03-28 16:23:07

ccchris
Member
Registered: 2006-09-25
Posts: 16

Re: python-numpy broken

ToLo wrote:

The problem is inside the package blas.

There is already a bugreport with a description how to solve it. Take a look here:
http://bugs.archlinux.org/task/9905?pro … &pagenum=2
ToLo

Ah, thanks. I actually visited that page before I posted but must have missed the comments (duh!).

To update my progress, I was about to do my own package as Allan suggested but doing an pacman -Syu revealed a new python-numpy update which now seems to use the right libgfortran files.

Will post back if I manage to solve it.

Offline

#6 2008-03-29 10:31:27

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: python-numpy broken

ralvez wrote:

I have seen the problem before with a number of .so files, and usually this will fix it:
1. as root go to /usr/lib
2. make a symlink to libgfortran.so, like this: ln -s libgfortran.so libgfortran.so.2

Hope this helps.

R.

Bad bad bad advice.

The _correct_ way of fixing this is:

if it's a repo package, file a bug then rebuild yourself in the meantime.

Offline

#7 2008-03-29 13:03:16

ccchris
Member
Registered: 2006-09-25
Posts: 16

Re: python-numpy broken

Ok, I finally had time to fix this, and learned a bit about Arch/ABS too smile

For inexperienced users with the same problem as me this is what i did:

1. Installed ABS and ran 'abs' as root (more info here http://wiki.archlinux.org/index.php/ABS … ild_System )
2. Copied the files in /var/abs/extra/science/blas/ to a folder in my ~
3. nano Makefile -> add 'scabs1.o' to the end of the OBJS list, save & quit. (info from here: http://bugs.archlinux.org/task/9905?pro … &pagenum=2 )
4. md5sum Makefile -> replace old md5 in PKGBUILD, save & quit.
5. as user, 'makepkg'
6. as root, pacman -U blas-19980702-4-i686.pkg.tar.gz

Now it seems to work, thanks for the help!

Offline

Board footer

Powered by FluxBB