Snort mailing list archives

Re: static compilation


From: Andreas Krennmair <ak () tcp-ip at>
Date: Wed, 24 Jul 2002 10:02:25 +0200

funky wrote:
I already tried that but nothing has changed. I've
made the CFLAGS "-static" in "Makefile" but the size
of the file is still 1053882 bytes . When i control
with "file snort" , it still says "dynamically
compiled" :((((

Where can be the mistake!??!?!

You cannot "statically compile" a program, you compile it and then statically _link_ it. So, first you have to use LDFLAGS instead of CFLAGS, and another good trick with autoconf based source trees is setting this already during the configure process, e.g.:

LDFLAGS="-static" ./configure

and then go on just as before, i.e. make && make install. Before make install, you can check the binary with ldd and file whether it is really statically linked, but it should be anyway (I tried it out right now).

HTH,
Andreas Krennmair



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users


Current thread: