Snort mailing list archives

RE: QUERY:Building snort statically


From: "William Fitzgerald" <wfitzgerald () tssg org>
Date: Wed, 16 Feb 2005 09:57:19 -0000

Hi Senthil,

Again thanks for the speedy response.

I will take on board what you and Joshua have said.
I am running snort-2.1.1 and not snort-2.3.0 so the makefile in the src
directory is different.

(1)So first I will rename all the /usr/local/lib files temporarily.
(Senthil)
(2)make libraries static: LDFLAGS =  -static -L/usr/local/lib -lpcre
(Joshua)
(3)I reckon I must also as -static as follows: CFLAGS = -g -O2 -Wall
-DWIRELESS -static in the makefile also.
What do you think about (3)?

Regards,
Will



-----Original Message-----
From: Senthil Prabu.S [mailto:prabu333 () hotpop com] 
Sent: 16 February 2005 05:02
To: wfitzgerald () tssg org; 'Joshua Berry'
Cc: snort-users () lists sourceforge net
Subject: Re: [Snort-users] QUERY:Building snort statically


Hi William,
         As Joshnu said, plz make the following change in the
src/Makefile along with the changes that I mentioned in my first mail.
This would not only build snort with static dependent libraries, but
aslo a static version of snort 
binary.


I went to the snort-2.1.1/src/Makefile and done a search for 
snort_LDFLAGS and found one occurance of it in this section:
snort$(EXEEXT): $(snort_OBJECTS) $(snort_DEPENDENCIES)
@rm -f snort$(EXEEXT)
$(LINK) $(snort_LDFLAGS) $(snort_OBJECTS) $(snort_LDADD) $(LIBS)

I could not find what snort_LDFLAGS was assigned to inorder to change 
it to be static.

I then looked at the makefile one directory up, that is snort-2.1.1 
and no snort_LDFLAGS was found. However I did find a LDFLAGS 
parameter: LDFLAGS =  -L/usr/local/lib -lpcre

No, you are wrong, here LDFLAGS is defined to look for the path of
libprce library. Also in snort-2.1.1, under src/Makefile, I am able to
find the 
snort_LDFLAGS
The details and modificaton is given below. Also this flag is available
in 
snort-2.3.0.

File : src/Makefile
Line Number: 161

BEFORE:
        preprocessors/flow/libflow.a parser/libparser.a \
        preprocessors/HttpInspect/libhttp_inspect.a sfutil/libsfutil.a
snort_LDFLAGS =

      DEFS = -DHAVE_CONFIG_H
      DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)

AFTER:
        preprocessors/flow/libflow.a parser/libparser.a \
        preprocessors/HttpInspect/libhttp_inspect.a sfutil/libsfutil.a
snort_LDFLAGS = -lstatic

      DEFS = -DHAVE_CONFIG_H
      DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)

--
Senthil Prabu.S


If you are smart enough to know that you're not smart enough to be an
Engineer, then you're in Business.
_________________________________________________________________





-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
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: