Snort mailing list archives

installing 2.1.0 on Solaris 8 - problems & solutions


From: "Subramanikandan Somasundaram (Mani)" <subrama () lucent com>
Date: Thu, 08 Jan 2004 16:14:17 +0530

Hi

I am a newbie to Snort and was trying to make 2.1.0 on Solaris.
I landed into 3 problems while doing make and got solutions for them (mostly by browsing the archives).
Compiled below are all the errors I got and how I resolved them.

--
Thanks,
« Mani »


1. Following compilation error was thrown for a few files.

        In file included from util_net.c:16:
        util_net.h:14:20: stdint.h: No such file or directory
        make[3]: *** [util_net.o] Error 1
        make[3]: Leaving directory `/home/subrama/sdi/snort-2.1.0/src/sfutil'
        make[2]: *** [all-recursive] Error 1
        make[2]: Leaving directory `/home/subrama/sdi/snort-2.1.0/src'
        make[1]: *** [all-recursive] Error 1
        make[1]: Leaving directory `/home/subrama/sdi/snort-2.1.0'
        make: *** [all] Error 2

The compiler was unable to locate the header file stdint.
Solaris doesn't have this file in the include directories under /usr.
On searching via google, I came to know that we can use sys/int_types.h file instead.
So, I edited the following files and replaced the inclusions of <stdint.h> with <sys/int_types.h>.
  src/event_wrapper.h
  src/preprocessors/flow/flow.h
  src/preprocessors/flow/flow_stat.h
  src/preprocessors/flow/portscan/flowps.h
  src/sfutil/util_net.h
  src/win32/WIN32-Includes/rpc/auth.h
  src/win32/WIN32-Includes/rpc/types.h
  src/win32/WIN32-Includes/config.h
After this, the error doesn't occur.


2. The following linker error was thrown :

        make[3]: Entering directory `/home/subrama/sdi/snort-2.1.0/src'
        gcc  -g -O2 -Wall  -L/home/subrama/lib -lpcre -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 
output-plugins/libspo.a detection-plugins/libspd.a preprocessors/libspp.a preprocessors/flow/portscan/libportscan.a 
preprocessors/flow/int-snort/libintsnort.a preprocessors/flow/libflow.a parser/libparser.a 
preprocessors/HttpInspect/libhttp_inspect.a sfutil/libsfutil.a -lpcre -lpcap -lm -lsocket -lnsl
        ld: elf error: file preprocessors/flow/int-snort/libintsnort.a: elf_getarsym
        ld: fatal: File processing errors. No output written to snort
        collect2: ld returned 1 exit status
        make[3]: *** [snort] Error 1
        make[3]: Leaving directory `/home/subrama/sdi/snort-2.1.0/src'
        make[2]: *** [all-recursive] Error 1
        make[2]: Leaving directory `/home/subrama/sdi/snort-2.1.0/src'
        make[1]: *** [all-recursive] Error 1
        make[1]: Leaving directory `/home/subrama/sdi/snort-2.1.0'
        make: *** [all] Error 2

I applied the following solution which I got from http://marc.theaimsgroup.com/?l=snort-devel&m=107200448326026&w=2

    % /usr/ccs/bin/ar -ts src/preprocessors/flow/int-snort/libintsnort.a
    flow_packet.o
    %

After this, the error vanished.


3. Next, I encountered the following linker error:

        make[3]: Entering directory `/home/subrama/sdi/snort-2.1.0/src'
        gcc  -g -O2 -Wall  -L/home/subrama/lib -lpcre -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 
output-plugins/libspo.a detection-plugins/libspd.a preprocessors/libspp.a preprocessors/flow/portscan/libportscan.a 
preprocessors/flow/int-snort/libintsnort.a preprocessors/flow/libflow.a parser/libparser.a 
preprocessors/HttpInspect/libhttp_inspect.a sfutil/libsfutil.a -lpcre -lpcap -lm -lsocket -lnsl
        Undefined                       first referenced
         symbol                             in file
        inet_aton                           sfutil/libsfutil.a(ipobj.o)
        ld: fatal: Symbol referencing errors. No output written to snort
        collect2: ld returned 1 exit status
        make[3]: *** [snort] Error 1
        make[3]: Leaving directory `/home/subrama/sdi/snort-2.1.0/src'
        make[2]: *** [all-recursive] Error 1
        make[2]: Leaving directory `/home/subrama/sdi/snort-2.1.0/src'
        make[1]: *** [all-recursive] Error 1
        make[1]: Leaving directory `/home/subrama/sdi/snort-2.1.0'
        make: *** [all] Error 2

I got a solution from http://marc.theaimsgroup.com/?l=snort-devel&m=99478130116314&w=2
According to the solution, I had to add some options to $LIBS.
For this, I edited the configure file and added the following line just after the definition of INCLUDES.
  LIBS="$LIBS -lresolv"
I ran the configure script & then the make script.
Now, the error vanishes.




-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
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: