AW: [Snort-devel] Snort compilation

Daniel Walther daniel.walther at ...2567...
Tue Jun 22 07:50:29 EDT 2004


Hi William,

Hi list,

 

Thank you for this hint. With MySQL the static linking is working. But it
still won't work with PostgreSQL.

Does anyone have another hint for me? It would be great.

 

Thanks in advance for your help.

 

Best regards

Daniel

 

  _____  

Von: William Metcalf [mailto:William_Metcalf at ...2528...] 
Gesendet: Freitag, 18. Juni 2004 18:11
An: daniel.walther at ...2567...
Betreff: Re: [Snort-devel] Snort compilation

 

I got snort to compile statically with mysql support by changing the binding
order of the library linking. I moved linking of the lz library to after the
linking of -lmysqlclient

so in your makefile

change

LIBS = -lz -lpcre -lpcap -lm -lnsl  -lmysqlclient

to

LIBS= -lpcre -lpcap -lm -lnsl -lmysqlclient -lz

Regards,

Will
Inactive hide details for "Daniel Walther"
<daniel.walther at ...2567...>"Daniel Walther" <daniel.walther at ...2567...>




"Daniel Walther" <daniel.walther at ...2567...> 
Sent by: snort-devel-admin at lists.sourceforge.net 

06/18/2004 09:39 AM 


Please respond to
daniel.walther at ...2567...




To


<snort-devel at lists.sourceforge.net>




cc






Subject


[Snort-devel] Snort compilation

 







Hi list

I've tried to compile snort with LDFLAGS=-static. I wanted to compile snort
with database support.
But unfortunately I won't work.
I've tired it with --with-postgresql and --with-mysql.
If I try it without LDFLAGS=-static, then it works.

I receive the following errors when I call make:
- with mysql

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< BEGIN >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
gcc  -g -O2 -Wall  -static -L/usr/lib -lpcre
-L/home/daenu/wims/mysql-standard-4.0.20-pc-linux-i686/lib -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 fpcreate.o fpdetect.o pcrm.o
byte_extract.o sfthreshold.o packet_time.o event_wrapper.o wifi_statetable.o
output-plugins/libspo.a detection-plugins/libspd.a preprocessors/libspp.a
preprocessors/flow/portscan/libportscan.a preprocessors/flow/libflow.a
parser/libparser.a preprocessors/HttpInspect/libhttp_inspect.a
sfutil/libsfutil.a -lz -lpcre -lpcap -lm -lnsl  -lmysqlclient
/home/daenu/wims/mysql-standard-4.0.20-pc-linux-i686/lib/libmysqlclient.a(my
_compress.o)(.text+0xb4): In function `my_compress_alloc':
: undefined reference to `compress'
/home/daenu/wims/mysql-standard-4.0.20-pc-linux-i686/lib/libmysqlclient.a(my
_compress.o)(.text+0x12a): In function `my_uncompress':
: undefined reference to `uncompress'
collect2: ld returned 1 exit status
make[3]: *** [snort] Error 1
make[3]: Leaving directory `/home/daenu/wims/snort-2.1.1/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/daenu/wims/snort-2.1.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/daenu/wims/snort-2.1.1'
make: *** [all] Error 2
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< END >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

- with postgresql
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< BEGIN >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
gcc  -g -O2 -Wall  -static -L/usr/lib -lpcre -L/usr/local/pgsql/lib -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 fpcreate.o fpdetect.o pcrm.o
byte_extract.o sfthreshold.o packet_time.o event_wrapper.o wifi_statetable.o
output-plugins/libspo.a detection-plugins/libspd.a preprocessors/libspp.a
preprocessors/flow/portscan/libportscan.a preprocessors/flow/libflow.a
parser/libparser.a preprocessors/HttpInspect/libhttp_inspect.a
sfutil/libsfutil.a -lpcre -lpcap -lm -lnsl  -lpq
/usr/local/pgsql/lib/libpq.a(fe-auth.o)(.text+0x1e1): In function
`pg_password_sendauth':
: undefined reference to `crypt'
collect2: ld returned 1 exit status
make[3]: *** [snort] Error 1
make[3]: Leaving directory `/home/daenu/wims/snort-2.1.1/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/daenu/wims/snort-2.1.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/daenu/wims/snort-2.1.1'
make: *** [all] Error 2
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< END >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Is there any chance to compile it with this LDFLAGS and database support? I
need to compile it this way, because it will run on a mini Linux.

I tried it with snort-2.1.1 with the wireless patch.

I hope anyone can help me.

Thanks in advance for your help.

Regards
Daniel





-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Snort-devel mailing list
Snort-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/snort-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.snort.org/pipermail/snort-devel/attachments/20040622/5f638407/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <https://lists.snort.org/pipermail/snort-devel/attachments/20040622/5f638407/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 73 bytes
Desc: not available
URL: <https://lists.snort.org/pipermail/snort-devel/attachments/20040622/5f638407/attachment-0001.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.gif
Type: image/gif
Size: 73 bytes
Desc: not available
URL: <https://lists.snort.org/pipermail/snort-devel/attachments/20040622/5f638407/attachment-0002.gif>


More information about the Snort-devel mailing list