Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: [Ethereal-dev] mergecap fails to link on Solaris 9 (needs getprotobyname() etc)

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Jeff Morriss <jeff_morriss@xxxxxxxxxxx>
Date: Thu, 08 Jul 2004 14:08:42 -0400

Hi list,

I updated my CVS tree to release-0-10-5 and tried to compile on Solaris 9 but 'mergecap' fails to link:

make[2]: Entering directory `/u/morriss/ethereal-dev/source'
/bin/bash ./libtool --mode=link gcc  -D_U_="__attribute__((unused))" -Wall -W -g -O2 -Wno-return-type -DFUNCPROTO=15 -I/usr/local/include -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/openwin/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include    -L/usr/local/lib -R/usr/local/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/local/lib -R/usr/local/lib -o ethereal -export-dynamic pcap-util-unix.o capture_stop_conditions.o cfile.o conditions.o disabled_protos.o pcap-util.o range.o ringbuffer.o timestats.o version_info.o alert_box.o capture.o file.o filters.o g711.o merge.o proto_hier_stats.o summary.o  gtk/libui.a wiretap/libwiretap.la epan/libethereal.la -lcrypto "-dlopen" self "-dlopen" plugins/acn/acn.la "-dlopen" plugins/artnet/artnet.la "-dlopen" plugins/asn1/asn1.la "-dlopen" plugins/ciscosm/ciscosm.la "-dlopen" plugins/docsis/docsis.la "-dlopen" plugins/enttec/enttec.la "-dlopen" plugin
s/giop/cosnaming.la "-dlopen" plugins/giop/coseventcomm.la "-dlopen" plugins/gryphon/gryphon.la "-dlopen" plugins/irda/irda.la "-dlopen" plugins/lwres/lwres.la "-dlopen" plugins/megaco/megaco.la "-dlopen" plugins/mgcp/mgcp.la "-dlopen" plugins/pcli/pcli.la "-dlopen" plugins/rdm/rdm.la "-dlopen" plugins/rlm/rlm.la "-dlopen" plugins/rtnet/rtnet.la "-dlopen" plugins/rudp/rudp.la "-dlopen" plugins/v5ua/v5ua.la -lpcap -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lthread -lglib-2.0      -lnsl -lz  -R/usr/local/lib
rm -f .libs/ethereal.nm .libs/ethereal.nmS .libs/ethereal.nmT
creating .libs/etherealS.c
(cd .libs && gcc -c -fno-builtin -fno-rtti -fno-exceptions "etherealS.c")
cc1: warning: "-fno-rtti" is valid for C++ but not for C/ObjC
rm -f .libs/etherealS.c .libs/ethereal.nm .libs/ethereal.nmS .libs/ethereal.nmT
gcc "-D_U_=__attribute__((unused))" -Wall -W -g -O2 -Wno-return-type -DFUNCPROTO=15 -I/usr/local/include -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/openwin/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -o .libs/ethereal pcap-util-unix.o capture_stop_conditions.o cfile.o conditions.o disabled_protos.o pcap-util.o range.o ringbuffer.o timestats.o version_info.o alert_box.o capture.o file.o filters.o g711.o merge.o proto_hier_stats.o summary.o .libs/etherealS.o  -L/usr/local/lib -L/usr/local/ssl/lib gtk/libui.a wiretap/.libs/libwiretap.so epan/.libs/libethereal.so -lcrypto -lpcap -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lthread -lglib-2.0 -lnsl -lz -R/usr/local/lib -R/usr/local/ssl/lib
Undefined                       first referenced
 symbol                             in file
getprotobyname                      /usr/local/lib/libpcap.a(nametoaddr.o)  (symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
getservbyname                       /usr/local/lib/libpcap.a(nametoaddr.o)  (symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
socket                              /usr/local/lib/libpcap.a(inet.o)  (symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
getnetbyname                        /usr/local/lib/libpcap.a(nametoaddr.o)  (symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
ld: fatal: Symbol referencing errors. No output written to .libs/ethereal
collect2: ld returned 1 exit status
make[2]: *** [ethereal] Error 1

/usr/local/lib/libpcap.a is version 0.7.1 (from sunfreeware.com)

Any thoughts?  Do I need to update my libpcap?

Cheers,
-Jeff