Page 1 sur 1

lapack et atlas

Publié : mer. janv. 25, 2012 1:35 pm
par frederic han
avec une version de lapack qui utilise atlas j'ai des problemes de compilations:
(Ex pour faire un spkg).
giac0.9.6

libtool: link: ranlib .libs/libxcas.a
libtool: link: ( cd ".libs" && rm -f "libxcas.la" && ln -s "../libxcas.la" "libxcas.la" )
g++ -DHAVE_CONFIG_H -I. -I.. -DIN_GIAC -I. -I.. -I. -I.. -I/usr/local/sage-4.8/local/include -I/usr/local/sage-4.8/local/include -fno-strict-aliasing -DGIAC_GENERIC_CONSTANTS -MT icas.o -MD -MP -MF .deps/icas.Tpo -c -o icas.o icas.cc
icas.cc: In function ‘int main(int, char**)’:
icas.cc:336:50: attention : deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
mv -f .deps/icas.Tpo .deps/icas.Po
/bin/bash ../libtool --tag=CXX --mode=link g++ -I/usr/local/sage-4.8/local/include -fno-strict-aliasing -DGIAC_GENERIC_CONSTANTS -L/usr/local/sage-4.8/local/lib/ -o icas icas.o libxcas.la -lreadline -lncurses -llapack -lblas -lgfortran -ldl -lpng -lm -lmpfr -lgmp -lgsl -lgslcblas -lrt -lpthread -llapack -lblas -lgfortran -ldl -lpng -lm -lmpfr -lgmp
libtool: link: g++ -I/usr/local/sage-4.8/local/include -fno-strict-aliasing -DGIAC_GENERIC_CONSTANTS -o .libs/icas icas.o -L/usr/local/sage-4.8/local/lib/ ./.libs/libxcas.a /usr/local/sage-4.8/spkg/build/giac-0.9.6/src/src/.libs/libgiac.so -lntl -lpari /usr/lib/x86_64-linux-gnu/libjpeg.so -lz -lXext -lXft -lfontconfig -lGL -lreadline -lncurses -L/usr/local/sage-4.8/local/lib /usr/local/sage-4.8/local/lib/libgsl.so /usr/local/sage-4.8/local/lib/libgslcblas.so -lrt -lpthread -llapack -lblas -lgfortran -ldl -lpng -lm /usr/local/sage-4.8/local/lib/libmpfr.so /usr/local/sage-4.8/local/lib/libgmp.so -Wl,-rpath -Wl,/usr/local/sage-4.8/local/lib
/usr/local/sage-4.8/local/lib//liblapack.so: undefined reference to `ATL_sscal'
/usr/local/sage-4.8/local/lib//liblapack.so: undefined reference to `ATL_sGetNB'
/usr/local/sage-4.8/local/lib//liblapack.so: undefined reference to `ATL_cGetNB'
/usr/local/sage-4.8/local/lib//liblapack.so: undefined reference to `ATL_dscal'
/usr/local/sage-4.8/local/lib//liblapack.so: undefined reference to `ATL_xerbla'
/usr/local/sage-4.8/local/lib//liblapack.so: undefined reference to `ATL_dGetNB'
/usr/local/sage-4.8/local/lib//liblapack.so: undefined reference to `ATL_ccplxinvert'
/usr/local/sage-4.8/local/lib//liblapack.so: undefined reference to `ATL_zcplxinvert'
/usr/local/sage-4.8/local/lib//liblapack.so: undefined reference to `ATL_zGetNB'
collect2: ld returned 1 exit status

Re: lapack et atlas

Publié : mer. janv. 25, 2012 2:41 pm
par parisse
Salut,

Je pense qu'il manque le link avec la libatlas, est-ce qu'en ajoutant
export LDFLAGS='-latlas'
avant d'appeler ./configure
ou en ajoutant dans configure.in ligne 144
AC_CHECK_LIB(atlas, main)
ce qui donne
...
AC_CHECK_LIB(gfortran, main)
AC_CHECK_LIB(atlas, main)
AC_CHECK_LIB(blas, main)
AC_CHECK_LIB(lapack, main, [], [CONFIG_LAPACK="no"])
...
puis autoconf et rebuild ca marche?

Re: lapack et atlas

Publié : mer. janv. 25, 2012 4:32 pm
par frederic han
Ok, il y a ensuite le meme probleme avec cblas.

J'ai donc ajoute dans configure.in les entrees pour cblas et atlas



ce qui donne vers la ligne 144:

AC_CHECK_LIB(gfortran, main)
AC_CHECK_LIB(blas, main)
AC_CHECK_LIB(cblas, main)
AC_CHECK_LIB(atlas, main)
AC_CHECK_LIB(lapack, main, [], [CONFIG_LAPACK="no"])


puis

autoreconf

merci

Fred

Re: lapack et atlas

Publié : mer. janv. 25, 2012 5:32 pm
par parisse
je crois que malheureusement je ne peux pas intégrer ça car ça dépend comment atlas est installé, visiblement chez toi il est compilé avec gcc et pas avec gfortran par exemple. Je me demande même si chez moi je n'avais pas compilé blas directement en statique avec support atlas ce qui permettait de ne pas avoir à linker avec.

Re: lapack et atlas

Publié : mer. janv. 25, 2012 8:26 pm
par frederic han
Ah d'accord,

pour l'instant ca ne me l'a fait qu'avec les librairies de sage, c'est peut etre preferable d'utiliser la variable LDFLAGS.

Par exemple pour le port freebsd ca compile le tout sans Pb, je n'ai eu qu'a rajouter la dependance vers lapack.

Fred