make error: ./libclapf.so: undefined reference to `gsl_cdf_chisq_Q'

Issue #8 resolved
Marcel Evenson created an issue

My operating system is centos 6 x64.

gsl headers are installed:

rpm -qa | grep gsl
gsl-static-1.13-1.el6.x86_64
gsl-devel-1.13-1.el6.x86_64
gsl-1.13-1.el6.x86_64

When I run the configure command everything reports back fine:

./configure --localstatedir=/var --with-database=mysql --enable-clamd
checking gsl/gsl_cdf.h usability... yes
checking gsl/gsl_cdf.h presence... yes
checking for gsl/gsl_cdf.h... yes

But when I run make I get :

gcc -shared -o libclapf.so.0.1.1 dirs.o misc.o counters.o cfg.o sig.o decoder.o hash.o tokenizer.o parser.o parser_utils.o session.o tai.o digest.o chi.o antispam.o spam.o buffer.o zombie.o train.o users.o policy.o black.o smtp.o history.o rbl.o  avir.o clamd.o mysql.o
ln -sf libclapf.so.0.1.1 libclapf.so
ln -sf libclapf.so.0.1.1 libclapf.so.0
gcc -O2 -Wall -g -I/usr/include/mysql -I. -I..  -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC  -fPIC -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1 -DHAVE_GSL -D_GNU_SOURCE -DHAVE_ANTIVIRUS -DHAVE_TRE -DHAVE_CLAMD -DNEED_MYSQL -o clapf clapf.c -lclapf -lz -lm -ldl -lcrypto -lssl -ltre   -L/usr/lib64/mysql -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl -L.  -L/usr/lib -L/usr/lib 
./libclapf.so: undefined reference to `gsl_cdf_chisq_Q'
collect2: ld returned 1 exit status
make[1]: *** [clapf] Error 1

Any ideas ?

Comments (5)

  1. Marcel Evenson reporter

    Just a note that the only way I was able to get this working was to manually edit the file src/Makefile and add the flags -lgsl -lgslcblas.

    This:

    #!
    LIBS = -lz -lm -ldl -lcrypto -lssl -ltre  -L/usr/lib64/mysql -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl
    

    To this:

    #!
    LIBS = -lz -lm -ldl -lcrypto -lssl -ltre  -L/usr/lib64/mysql -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl -lgsl -lgslcblas
    
  2. Log in to comment