[Snort-users] snort 2 / mysql / static/ undefined reference to uncompress

Mike Caughran mike_caughran at ...8955...
Tue Apr 22 08:51:06 EDT 2003

./configure --with-mysql   (make works)
 LDFLAGS="-static" ./configure --with-mysql (does not make)

/usr/bin/gcc  -g -O2 -Wall  -static -L/usr/lib/mysql -o snort  codes.o 
debug.o decode.o log.o mstring.o parser.o plugbase.o snort.o snprintf.o 
strlcatu.o strlcpyu.o tag.o ubi_BinTree.o ubi_SplayTree.o util.o 
detect.o signature.o mempool.o sf_sdlist.o threshold.o fpcreate.o 
fpdetect.o mwm.o mpse.o acsmx.o pcrm.o sfksearch.o 
output-plugins/libspo.a detection-plugins/libspd.a 
preprocessors/libspp.a parser/libparser.a -lz -lpcap -lm -lnsl  
/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_uncompress':
my_compress.o(.text+0x9a): undefined reference to `uncompress'
/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function 
my_compress.o(.text+0x12a): undefined reference to `compress'
collect2: ld returned 1 exit status
make[3]: *** [snort] Error 1
make[3]: Leaving directory `/junkfs2/snort2/snort-2.0.0/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/junkfs2/snort2/snort-2.0.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/junkfs2/snort2/snort-2.0.0'
make: *** [all] Error 2

These lines are from the configure
checking for mysql... yes
checking for compress in -lz... yes

I have seen others with similar questions...

RedHat 7.2
snort 2.0.0

I would like to compile snort static with mysql.
I was able to do this with older versions of snort
(I believe I was able to static compile snort 1.9.0 Build 223)

I have not been able to statically link in more recent versions.

More information about the Snort-users mailing list