On Thu, Aug 18, 2011 at 10:08 PM, Allin Cottrell <cottrell(a)wfu.edu> wrote: > On Thu, 18 Aug 2011, Skipper Seabold wrote: > >> On Thu, Aug 18, 2011 at 7:13 PM, Allin Cottrell <cottrell(a)wfu.edu> wrote: >>> On Thu, 18 Aug 2011, Skipper Seabold wrote: >>> >>>> On Thu, Aug 18, 2011 at 5:32 PM, Allin Cottrell <cottrell(a)wfu.edu> wrote: >>>>> On Thu, 18 Aug 2011, Skipper Seabold wrote: >>>>> >>>>>> Trying to install gretl 1.9.5 from source due to the known seg faults >>>>>> in the downstream ubuntu 11.04 repositories. I have all the >>>>>> dependencies installed, except my lapack (3.2.2) was built with ATLAS >>>>>> (3.9.2) with the same version of gcc I have installed. The lapack >>>>>> stuff seems to be giving me troubles, though I'm not too sure why. >>>>> >>>>> No doubt this should be better documented, but if you want to build >>>>> gretl against atlas you should use the LAPACK_LIBS environment >>>>> variable. For example: >>>>> >>>>> LAPACK_LIBS='-L/your/atlas/lib -llapack -lf77blas -lcblas -latlas' \ >>>>> ./configure <options> >>>>> >>>>> You can't just replace -lblas with -lcblas, because more libraries >>>>> are needed with an atlas build, including crucially libatlas. >>>> >>>> Right, I neglected to mention that I also tried to edit configure to link >>>> against atlas, cblas, f77blas, etc. to the same effect about the hidden >>>> symbol. >>>> >>>> Are you saying that all I need to do is define LAPACK_LIBS as such and then >>>> run configure, or do I still need the with-lapack-prefix as well?? >>> >>> Just use LAPACK_LIBS; the lapack-prefix thing is only for use where >>> you have the standard "-llapack -lblas" linkage, but are using a >>> non-standard installation directory. >> >> That's what I thought. It doesn't look like the LAPACK_LIBS options >> are being passed to the compiler, but I haven't gone through the >> configure script in great detail. >> >>>> [...] it fails to build, saying it can't find lblas >>> >>> "lblas"? Looks like a typo? >> >> This is why I changed -lblas to -lcblas and tried to add the other >> libraries. I have libcblas.*, libf77blas.*, etc. but when I run >> configure, it just tries the -llapack -lblas options instead of the >> LAPACK_LIBS. > > I think that either your atlas installation is broken or you're not > passing the correct LAPACK_LIBS variable. >
All the tests passed when I installed it and I've been doing numpy/scipy development and using R against it for a while. > I just tried here on Ubuntu 10.04, using the latest stable lapack > (3.3.1) plus latest stable atlas (3.8.4), libraries installed into > /opt/atlas/lib. In configuring the gretl build I either pass > > LAPACK_LIBS='-L/opt/atlas/lib -llapack_atl -lf77blas \ > -lcblas -latlas' [...] > > as part of the invocation of gretl's configure script, or else put > the relevant variable into the environment via > > export LAPACK_LIBS='-L/opt/atlas/lib -llapack_atl \ > -lf77blas -lcblas -latlas' > > before invoking ./configure. Either way the gretl build works OK. > And 'grep lapack config.log' shows that what I specified for > LAPACK_LIBS is being respected. > > But note: if your atlas libs are built without the correct > dependencies being indicated to the linker, you may need to add > elements to the LAPACK_LIBS variable, for example -lgfortran and > -lgcc_s -- and in that case you may need to add symlinks to your > system to define libgfortran.so and libgcc_s.so. > Genius. Adding lgcc and lgcc_s worked, though I don't know if the former was necessary. I have never come across this before, though I saw one or two similar errors while searching. For posterity here's the error /usr/bin/ld: conftest: hidden symbol `__powidf2' in /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/libgcc.a(_powidf2.o) is referenced by DSO and an explanation why http://stackoverflow.com/questions/4547384/difference-between-lgcc-s-and-gcc Thanks for sanity checking me. Cheers, Skipper