I am trying to build this extension on CentOS 6.
I've installed LAPACK 3.4.2 from the upstream lapack and lapack-devel packages.
These packages place the shared libraries in /usr/lib64:
$ ls -la /usr/lib64/liblapack*
lrwxrwxrwx 1 root root 20 Jul 21 13:25 /usr/lib64/liblapack64.so -> liblapack64.so.3.4.2
lrwxrwxrwx 1 root root 20 Jul 21 13:25 /usr/lib64/liblapack64.so.3 -> liblapack64.so.3.4.2
lrwxrwxrwx 1 root root 20 Jul 21 13:25 /usr/lib64/liblapack64.so.3.4 -> liblapack64.so.3.4.2
-rwxr-xr-x 1 root root 5694736 Jul 21 13:18 /usr/lib64/liblapack64.so.3.4.2
lrwxrwxrwx 1 root root 19 Jul 21 13:25 /usr/lib64/liblapacke.so -> liblapacke.so.3.4.2
lrwxrwxrwx 1 root root 19 Jul 21 13:25 /usr/lib64/liblapacke.so.3 -> liblapacke.so.3.4.2
lrwxrwxrwx 1 root root 19 Jul 21 13:25 /usr/lib64/liblapacke.so.3.4 -> liblapacke.so.3.4.2
-rwxr-xr-x 1 root root 2257632 Jul 21 13:18 /usr/lib64/liblapacke.so.3.4.2
lrwxrwxrwx 1 root root 18 Jul 21 13:25 /usr/lib64/liblapack.so -> liblapack.so.3.4.2
lrwxrwxrwx 1 root root 18 Jul 21 13:25 /usr/lib64/liblapack.so.3 -> liblapack.so.3.4.2
lrwxrwxrwx 1 root root 18 Jul 21 13:25 /usr/lib64/liblapack.so.3.4 -> liblapack.so.3.4.2
-rwxr-xr-x 1 root root 5663656 Jul 21 13:18 /usr/lib64/liblapack.so.3.4.2
and the headers at /usr/include/lapacke:
$ ls -la /usr/include/lapacke*
total 1096
drwxr-xr-x 2 root root 4096 Jul 21 13:25 .
drwxr-xr-x. 49 root root 4096 Jul 21 15:28 ..
-rw-r--r-- 1 root root 4236 Apr 12 2012 lapacke_config.h
-rw-r--r-- 1 root root 1059092 Sep 20 2012 lapacke.h
-rw-r--r-- 1 root root 474 Jul 21 13:12 lapacke_mangling.h
-rw-r--r-- 1 root root 474 Feb 17 2012 lapacke_mangling_with_flags.h
-rw-r--r-- 1 root root 33047 Mar 22 2012 lapacke_utils.h
I have attempted to modify the configure script to reference these new paths:
diff --git a/config.m4 b/config.m4
index ed440c7..cbfbf9f 100644
--- a/config.m4
+++ b/config.m4
@@ -26,9 +26,9 @@ dnl Get PHP version depending on shared/static build
fi
AC_MSG_CHECKING([for lapacke.h header])
- for i in $PHP_LAPACK /usr/local /usr;
+ for i in $PHP_LAPACK/include /usr/include/lapacke;
do
- test -r $i/include/lapacke.h && LAPACK_PREFIX=$i && LAPACK_INC_DIR=$i/include && LAPACK_OK=1
+ test -r $i/lapacke.h && LAPACK_PREFIX=/usr/lib64 && LAPACK_INC_DIR=$i && LAPACK_OK=1
done
if test "$LAPACK_OK" != "1"; then
@@ -39,7 +39,7 @@ dnl Get PHP version depending on shared/static build
AC_MSG_CHECKING([for lapacke shared libraries])
PHP_CHECK_LIBRARY(lapacke, LAPACKE_dgesv, [
- PHP_ADD_LIBRARY_WITH_PATH(lapacke, $LAPACK_PREFIX/lib, LAPACK_SHARED_LIBADD)
+ PHP_ADD_LIBRARY_WITH_PATH(lapacke, $LAPACK_PREFIX, LAPACK_SHARED_LIBADD)
PHP_ADD_INCLUDE($LAPACK_INC_DIR)
],[
AC_MSG_ERROR([not found. Make sure that lapacke is installed])
but the configure script fails to locate LAPACKE_dgesv.
checking for lapacke.h header... found in /usr/include/lapacke
checking for lapacke shared libraries... checking for LAPACKE_dgesv in -llapacke... no
configure: error: not found. Make sure that lapacke is installed
This symbol exists, of course:
$ readelf -Ws /usr/lib64/liblapacke.so | grep LAPACKE_dgesv
1530: 00000000000a24a0 275 FUNC GLOBAL DEFAULT 11 LAPACKE_dgesv
1575: 00000000000a3ca0 2020 FUNC GLOBAL DEFAULT 11 LAPACKE_dgesvx_work
1668: 00000000000a25c0 716 FUNC GLOBAL DEFAULT 11 LAPACKE_dgesv_work
2055: 00000000000a2ac0 1766 FUNC GLOBAL DEFAULT 11 LAPACKE_dgesvd_work
2592: 00000000000a3410 1241 FUNC GLOBAL DEFAULT 11 LAPACKE_dgesvj_work
2925: 00000000000a2890 551 FUNC GLOBAL DEFAULT 11 LAPACKE_dgesvd
2935: 00000000000a31b0 597 FUNC GLOBAL DEFAULT 11 LAPACKE_dgesvj
2953: 00000000000a38f0 936 FUNC GLOBAL DEFAULT 11 LAPACKE_dgesvx
Any hints on how to get this up and running using the paths above?
I am trying to build this extension on CentOS 6.
I've installed LAPACK 3.4.2 from the upstream
lapackandlapack-develpackages.These packages place the shared libraries in
/usr/lib64:and the headers at
/usr/include/lapacke:I have attempted to modify the configure script to reference these new paths:
but the configure script fails to locate
LAPACKE_dgesv.This symbol exists, of course:
Any hints on how to get this up and running using the paths above?