Opened 12 years ago

Closed 12 years ago

#573 closed defect (fixed)

extra dependency libs added in

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


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:  The following flags and libraries will be used:
configure:  +++++++++++++++++++++++++++++++++++++++++++++++
configure:   CPPFLAGS=
-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:  +++++++++++++++++++++++++++++++++++++++++++++++

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/ -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/ \
/usr/local/lib/ /usr/local/lib/ ./.libs/libyattest.a /usr/local \
/gsl-1.11_i686/lib/ /usr/local/gsl-1.11_i686/lib/ -lm \
-Wl,-rpath -Wl,/data/johanssp/local/lib -Wl,-rpath -Wl,/usr/local/gsl-1.11_i686/lib 
../yat/.libs/ undefined reference to `gsl_cdf_hypergeometric_P'

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

/usr/local/lib/ /usr/local/lib/

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.