[Snort-devel] solaris 2.[67] compile bug fix

James P. Anderson III anderson at ...241...
Tue Jul 10 12:05:05 EDT 2001

Hi there.

Solaris 2.[67], gcc-2.95.
SunOS zymurgy 5.7 Generic_106541-12 sun4u sparc SUNW,Ultra-1

snort-1.8-RELEASE picked up Tue Jul 10 11:51

configured with:



de -DENABLE_SSL  -g -O2 -Wall -c spp_arpspoof.c
spp_arpspoof.c: In function `ARPwatchArg':
spp_arpspoof.c:368: warning: implicit declaration of function
gcc  -g -O2 -Wall -L/usr/local/lib -L/usr/local/lib
-L/usr/local/ssl/lib -o snort  snort.o log.o decode.o mstring.o
rules.o plugbase.o sp_pattern_match.o sp_tcp_flag_check.o
sp_icmp_type_check.o sp_icmp_code_check.o sp_ttl_check.o
sp_ip_id_check.o sp_tcp_ack_check.o sp_tcp_seq_check.o
sp_dsize_check.o spp_http_decode.o spp_portscan.o sp_ipoption_check.o
sp_rpc_check.o sp_icmp_id_check.o sp_icmp_seq_check.o sp_respond.o
spo_alert_syslog.o spo_log_tcpdump.o spo_database.o sp_session.o
spp_defrag.o parser.o spo_alert_fast.o spo_alert_full.o
spo_alert_smb.o spo_alert_unixsock.o sp_react.o spo_xml.o
sp_ip_tos_check.o snprintf.o checksum.o spp_tcp_stream2.o
sp_reference.o sp_ip_fragbits.o spp_anomsensor.o tag.o spp_unidecode.o
codes.o strlcpyu.o strlcatu.o debug.o sp_tcp_win_check.o
spp_rpc_decode.o spp_bo.o spp_telnet_negotiation.o spo_csv.o
sp_ip_same_check.o sp_priority.o sp_ip_proto.o ubi_BinTree.o
ubi_SplayTree.o spo_unified.o spp_stream4.o spp_frag2.o spp_arpspoof.o
 -lz -lpcap -lm -lsocket -lnsl  -lmysqlclient -lodbc -lssl -lcrypto
Undefined                       first referenced
 symbol                             in file
inet_aton                           spp_arpspoof.o
ld: fatal: Symbol referencing errors. No output written to snort
collect2: ld returned 1 exit status
make: *** [snort] Error 1

The fix (thanks google!) is to add -lresolv to the Makefile.

>Hang on, inet_aton *is* in Solaris but not mentioned on the
>man page.
>It`s in libresolv!  However, Samba doesn`t link against libresolv as a
>Changing the LIBS= line in the Makefile to LIBS=-lsec -lgen -lsocket
>-ldl -lresolv lets libsmb/clidgram.c compile fine unchanged.  That`s a
>better fix.

So with the

LIBS = -lz -lpcap -lm -lsocket -lnsl  -lmysqlclient -lodbc -lssl -lcrypto -lresolv

line in the Makefile patched it then compiles ok.

Great program, by the way.


James P. Anderson III         anderson at ...510...
Bristol-Myers Squibb Pharmaceutical Research Institute
Hopewell, NJ                      Work: (609)-818-5453

More information about the Snort-devel mailing list