pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/44107: math/py-numpy build fails when using gfortran



>Number:         44107
>Category:       pkg
>Synopsis:       math/py-numpy build fails when using gfortran
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 17 20:15:00 +0000 2010
>Originator:     Fazlul Shahriar
>Release:        pkgsrc-current
>Organization:
>Environment:
Linux fermi.localdomain 2.6.18-194.3.1.el5 #1 SMP Sun May 2 04:17:42 EDT 2010 
x86_64 x86_64 x86_64 GNU/Linux
>Description:
Building math/py-numpy fails when linking lapack_lite.so using gfortran, as 
shown in the error below. My mk.conf has the following:

PKGSRC_FORTRAN=         gfortran
FC=             gfortran


$ bmake
...
gcc: numpy/linalg/python_xerbla.c
gcc: numpy/linalg/lapack_litemodule.c
/home1/fhs/pkg/src/math/py-numpy/work/.wrapper/bin/gfortran -Wall -L/usr/lib64 
-Wl,-R/usr/lib64 -L/home1/fhs/pkg/root/lib/python2.6/config 
-Wl,-R/home1/fhs/pkg/root/lib/python2.6/config -Wl,-R/home1/fhs/pkg/root/lib 
build/temp.linux-x86_64-2.6/numpy/linalg/lapack_litemodule.o 
build/temp.linux-x86_64-2.6/numpy/linalg/python_xerbla.o 
-L/home1/fhs/pkg/root/lib -L/home1/fhs/pkg/root/lib 
-Lbuild/temp.linux-x86_64-2.6 -llapack -lblas -lpython2.6 -lgfortran -o 
build/lib.linux-x86_64-2.6/numpy/linalg/lapack_lite.so
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(posixmodule.o):
 In function `posix_tmpnam':
posixmodule.c:(.text+0x54b3): warning: the use of `tmpnam_r' is dangerous, 
better use `mkstemp'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(posixmodule.o):
 In function `posix_tempnam':
posixmodule.c:(.text+0x53e1): warning: the use of `tempnam' is dangerous, 
better use `mkstemp'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o: In function 
`_start':
(.text+0x20): undefined reference to `main'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(dynload_shlib.o):
 In function `_PyImport_GetDynLoadFunc':
dynload_shlib.c:(.text+0x154): undefined reference to `dlsym'
dynload_shlib.c:(.text+0x229): undefined reference to `dlopen'
dynload_shlib.c:(.text+0x239): undefined reference to `dlerror'
dynload_shlib.c:(.text+0x2c6): undefined reference to `dlsym'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(thread.o):
 In function `PyThread_start_new_thread':
thread.c:(.text+0x79): undefined reference to `pthread_attr_setstacksize'
thread.c:(.text+0xb3): undefined reference to `pthread_create'
thread.c:(.text+0xd8): undefined reference to `pthread_detach'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(thread.o):
 In function `PyThread_allocate_lock':
thread.c:(.text+0x1a3): undefined reference to `sem_init'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(thread.o):
 In function `PyThread_free_lock':
thread.c:(.text+0x207): undefined reference to `sem_destroy'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(thread.o):
 In function `PyThread_acquire_lock':
thread.c:(.text+0x283): undefined reference to `sem_wait'
thread.c:(.text+0x298): undefined reference to `sem_trywait'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(thread.o):
 In function `PyThread_release_lock':
thread.c:(.text+0x31e): undefined reference to `sem_post'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(thread.o):
 In function `_pythread_pthread_set_stacksize':
thread.c:(.text+0x396): undefined reference to `pthread_attr_setstacksize'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(posixmodule.o):
 In function `posix_openpty':
posixmodule.c:(.text+0x24b7): undefined reference to `openpty'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(posixmodule.o):
 In function `posix_forkpty':
posixmodule.c:(.text+0x2523): undefined reference to `forkpty'
collect2: ld returned 1 exit status
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(posixmodule.o):
 In function `posix_tmpnam':
posixmodule.c:(.text+0x54b3): warning: the use of `tmpnam_r' is dangerous, 
better use `mkstemp'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(posixmodule.o):
 In function `posix_tempnam':
posixmodule.c:(.text+0x53e1): warning: the use of `tempnam' is dangerous, 
better use `mkstemp'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o: In function 
`_start':
(.text+0x20): undefined reference to `main'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(dynload_shlib.o):
 In function `_PyImport_GetDynLoadFunc':
dynload_shlib.c:(.text+0x154): undefined reference to `dlsym'
dynload_shlib.c:(.text+0x229): undefined reference to `dlopen'
dynload_shlib.c:(.text+0x239): undefined reference to `dlerror'
dynload_shlib.c:(.text+0x2c6): undefined reference to `dlsym'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(thread.o):
 In function `PyThread_start_new_thread':
thread.c:(.text+0x79): undefined reference to `pthread_attr_setstacksize'
thread.c:(.text+0xb3): undefined reference to `pthread_create'
thread.c:(.text+0xd8): undefined reference to `pthread_detach'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(thread.o):
 In function `PyThread_allocate_lock':
thread.c:(.text+0x1a3): undefined reference to `sem_init'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(thread.o):
 In function `PyThread_free_lock':
thread.c:(.text+0x207): undefined reference to `sem_destroy'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(thread.o):
 In function `PyThread_acquire_lock':
thread.c:(.text+0x283): undefined reference to `sem_wait'
thread.c:(.text+0x298): undefined reference to `sem_trywait'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(thread.o):
 In function `PyThread_release_lock':
thread.c:(.text+0x31e): undefined reference to `sem_post'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(thread.o):
 In function `_pythread_pthread_set_stacksize':
thread.c:(.text+0x396): undefined reference to `pthread_attr_setstacksize'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(posixmodule.o):
 In function `posix_openpty':
posixmodule.c:(.text+0x24b7): undefined reference to `openpty'
/home1/fhs/pkg/src/math/py-numpy/work/.buildlink/lib/python2.6/config/libpython2.6.a(posixmodule.o):
 In function `posix_forkpty':
posixmodule.c:(.text+0x2523): undefined reference to `forkpty'
collect2: ld returned 1 exit status
error: Command "/home1/fhs/pkg/src/math/py-numpy/work/.wrapper/bin/gfortran 
-Wall -L/usr/lib64 -Wl,-R/usr/lib64 -L/home1/fhs/pkg/root/lib/python2.6/config 
-Wl,-R/home1/fhs/pkg/root/lib/python2.6/config -Wl,-R/home1/fhs/pkg/root/lib 
build/temp.linux-x86_64-2.6/numpy/linalg/lapack_litemodule.o 
build/temp.linux-x86_64-2.6/numpy/linalg/python_xerbla.o 
-L/home1/fhs/pkg/root/lib -L/home1/fhs/pkg/root/lib 
-Lbuild/temp.linux-x86_64-2.6 -llapack -lblas -lpython2.6 -lgfortran -o 
build/lib.linux-x86_64-2.6/numpy/linalg/lapack_lite.so" failed with exit status 
1
*** Error code 1

Stop.
bmake: stopped in /home1/fhs/pkg/src/math/py-numpy
*** Error code 1

Stop.
bmake: stopped in /home1/fhs/pkg/src/math/py-numpy


>How-To-Repeat:
$ cd math/py-numpy
$ bmake
>Fix:
Here's a work around:

$ cd work/numpy-1.4.1/
$ /home1/fhs/pkg/src/math/py-numpy/work/.wrapper/bin/gfortran  -shared 
...lapack_lite.so # the same command as above, with the -shared flag added
$ cd ../..
$ bmake
$ bmake install

This installs math/py-numpy successfully.



Home | Main Index | Thread Index | Old Index