Opened 12 years ago

Closed 12 years ago

#573 closed defect (fixed)

extra dependency libs added in libyat.la

Reported by: Peter Owned by: Peter
Priority: major Milestone: yat 0.5.6
Component: build Version: 0.5.5
Keywords: Cc:

Description

This is a follow-up on ticket:558

I have a system with gsl installed in /usr/local/gsl-x86_64/ and boost installed in /usr/local/boost-gcc4. There is also an old version of gsl installed in /usr/local, which complicates things a bit.

I run configure as

./configure --with-boost=/usr/local/boost-gcc4 --with-gsl-prefix=/usr/local/gsl-i686

which results in

configure: 
configure:  The following flags and libraries will be used:
configure:  +++++++++++++++++++++++++++++++++++++++++++++++
configure:   CPPFLAGS=
configure:   AM_CPPFLAGS=-I$(top_srcdir)  -DHAVE_INLINE=1 -DGSL_RANGE_CHECK_OFF -DNDEBUG  \
-I/usr/local/gsl-1.11_i686/include -I/usr/local/boost-gcc4/include/boost-1_34
configure:   CXXFLAGS=
configure:   AM_CXXFLAGS= -Wall -pedantic -O3  -I/usr/local/gsl-1.11_i686/include
configure:   LDFLAGS=
configure:   AM_LDFLAGS=  -L/usr/local/gsl-1.11_i686/lib
configure:   LIBS=-lgsl -lgslcblas -lm 
configure:  +++++++++++++++++++++++++++++++++++++++++++++++
configure: 

which looks fine except that '-I/usr/local/gsl-1.11_i686/include' should be removed from AM_CXXFLAGS.

Surprisingly I get problems linking test programs

/bin/sh ../libtool --tag=CXX   --mode=link g++ -Wall -pedantic -O3  \
-I/usr/local/gsl-1.11_i686/include  -L/usr/local/gsl-1.11_i686/lib  -o alignment_test \
alignment_test.o ../yat/libyat.la libyattest.la -lgsl -lgslcblas -lm 
libtool: link: g++ -Wall -pedantic -O3 -I/usr/local/gsl-1.11_i686/include -o \
.libs/alignment_test alignment_test.o  -L/usr/local/gsl-1.11_i686/lib ../yat/.libs/libyat.so \
/usr/local/lib/libgsl.so /usr/local/lib/libgslcblas.so ./.libs/libyattest.a /usr/local \
/gsl-1.11_i686/lib/libgsl.so /usr/local/gsl-1.11_i686/lib/libgslcblas.so -lm \
-Wl,-rpath -Wl,/data/johanssp/local/lib -Wl,-rpath -Wl,/usr/local/gsl-1.11_i686/lib 
../yat/.libs/libyat.so: undefined reference to `gsl_cdf_hypergeometric_P'

My guess is that the root of the problem is that libtool is adding

/usr/local/lib/libgsl.so /usr/local/lib/libgslcblas.so

Is that our fault or is it a bug in libtool?

Change History (2)

comment:1 Changed 12 years ago by Peter

(In [2101]) refs #573. do not append GSL_CFLAGS to AM_CXXFLAGS

comment:2 Changed 12 years ago by Peter

Resolution: fixed
Status: newclosed

(In [2102]) fixes #573. tested on the system where the problem was found.

Note: See TracTickets for help on using tickets.