[Snort-users] QUERY:Building snort statically

Senthil Prabu.S prabu333 at ...8908...
Tue Feb 15 20:20:37 EST 2005

Hi William,
          My replies are given below;

> First, let me tell you some more. I am currently compiling snort-2.1.1
> on an Linux i686. I will eventually be copying the snort binary to a
> Linux i386 machine running uClibc compiler (embedded Linux system).

I dont know much about the uClibc compiler. Anyway building snort
with gcc and moving to another machine should work.
This is not a problem at all.............

> Since snort requires  libpcre and  libpcap I will need to statically
> compile them into snort.
> I believe the other libraries snort uses are provided by uClibc.

Yes,only libpcre and libpcap static library will do. Other libraries
like linux-gate.so.1, libc.so.6 are system library. In every machine,
you could find such libraries. So you no  need to care about them,
instead you can use the shared version of these system libraries.

> I install libpcre and libpcap based on this.
> I ran the snort configure as follows with the host option:
> ./configure --prefix=/home/j0n/apdevel/cqureap/rootfs/usr/idsdev/snort
> --host=i386 --enable-wireless
> Then I did:
> Make

This should give you, snort build from static dependency libraries. And
you can ship this binary to any other m/c of linux, it should work.

> Do I just temporarily rename all the files in /usr/local/lib and re-run
> the above commands? Wont it not complain about finding those libraries?
> Must I also edit the configure file? Senthil sorry about this, I am just
> not sure what you meant in step [1] from previous mail.
I have been doing this for long time. And I could build it successfully.
Also, just now I tried similar build on a Redhat Linux server. It was

> I wonder should I have installed libpcre, libpcap and snort on a
> different compiler. That is:
> Export PATH=/uClibc:$PATH
> Then ./configure, make, make install for both libpcre, libpcap
> And for snort:
> ./configure --prefix=/home/j0n/apdevel/cqureap/rootfs/usr/idsdev/snort
> --host=i386 --enable-wireless

Well, I am not sure about this. You better try with GCC, complete the
build, move the binary to the target m/c. It should work.

Hope this helps,if you are in trouble plz write to me.

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.

More information about the Snort-users mailing list