Ethereal-dev: [Ethereal-dev] Build problems on Solaris

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

From: Thomas Steffen <steffen.list.account@xxxxxxxxx>
Date: Tue, 9 Aug 2005 10:48:59 +0200
I have trouble building Ethereal from subversion on Solaris 8/SPARC,
with the latest libraries and tools from www.blastwave.org (autoconf
2.59, automake 1.83, gcc 3.4, gtk 2.6.3). I could pinpoint it to the
generation of epan/.libs/libethereal.so: somewhere in this step the
dissectors are lost, and not included in the library. My knowledge of
the linking process is sketch, so can you help me with the following
hypothesis?

As usual under Solaris, I use the Sun linker ld. Actually, configure
says I am using /usr/ccs/bin/ld, but I don't know how to confirm this.
I know that the Sun linker behaves very different from the GNU linker,
so could it be that it does not include the static library
libdissetors.a in the dynamic library output libethereal.so? This
seems to be so:

ethereal $ nm epan/dissectors/.libs/libdissectors.a | grep capture_fddi
[77]    |        76|     208|FUNC |GLOB |0    |5      |capture_fddi
ethereal $ nm epan/.libs/libethereal.so | grep capture_fddi
ethereal $ 

But why does this step fail, and what is the best option to try? Can I
use the GNU linker even if gcc is compiled for the Sun linker? I have
appended the relevant commands in the make process below.

I had two other minor problems:

It seems that autoconf does not handle grep correctly. I have the GNU
grep first on the path (/opt/csw/bin/grep), but for some reason
libtool calls the other grep (/usr/bin/grep), which does not support
-E. I fixed this in libtool, but it does not seem to make a
difference.

And with the tools from www.sunfreeware.com, ./autogen.sh fails with
the unhelpful message

ethereal $ ./autogen.sh
Checking for python.
./autogen.sh: glibtool: not found
processing .
./aclocal-flags: gtk-config: not found
aclocal -I ./aclocal-fallback
/usr/local/share/aclocal/pkg.m4:5: warning: underquoted definition of
PKG_CHECK_MODULES
  run info '(automake)Extending aclocal'
  or see http://sources.redhat.com/automake/automake.html#Extending%20aclocal
Use of uninitialized value in concatenation (.) or string at
/usr/local/share/autoconf/Autom4te/XFile.pm line 229.
configure.in:21: /usr/local/bin/m4: ERROR: Reading inserted file: No
such file or directory
autom4te: /usr/local/bin/m4 failed with exit status: 1
aclocal: autom4te failed with exit status: 1

All errors but the last one are "normal", because I also have them
with the blastwave tools.

Any ideas? I would like to put together a tutorial for compiling
Ethereal on Solaris in less than 100 steps, but first it has to work
:-)

Thomas

----------------------------------------

Build output:

$ ./configure --with-ssl --disable-usr-local
$ ethereal make
...
/bin/bash ../libtool --mode=link gcc  -DINET6 -DSOLARIS8_INET6
-D_U_="__attribute__((unused))" -Wall -W  -g -O2 -Wno-return-type
-DFUNCPROTO=15 -D_REENTRANT -I/opt/csw/include/gtk-2.0
-I/opt/csw/lib/gtk-2.0/include
-I/opt/csw/include/atk-1.0 -I/opt/csw/include/pango-1.0
-I/opt/csw/include -I/opt/csw/include/freetype2 -I/usr/openwin/include
-I/opt/csw/include/glib-2.0 -I/opt/csw/lib/glib-2.0/include   -O
-Dsolaris2 -DNETSNMP_NO_INLINE -I/opt/csw/include -I.
-I/opt/csw/include -I/opt/csw/include   -L/usr/local/lib
-R/usr/local/lib -o libethereal.la -rpath
/home/common/Ethereal/ethereal-0.10.12svn-solaris-sparc32/lib
-version-info 0:1:0 addr_and_mask.lo addr_resolv.lo adler32.lo afn.lo 
asn1.lo atalk-utils.lo base64.lo bitswap.lo charsets.lo  circuit.lo
column.lo column-utils.lo conversation.lo crc16.lo  crc32.lo
crypt-des.lo crypt-md4.lo crypt-md5.lo crypt-rc4.lo  emem.lo epan.lo
except.lo filesystem.lo follow.lo  frame_data.lo
h225-persistentdata.lo in_cksum.lo ipproto.lo  ipv4.lo nstime.lo
osi-utils.lo packet.lo plugins.lo prefs.lo  proto.lo ptvcursor.lo
radius_dict.lo range.lo reassemble.lo  req_resp_hdrs.lo sha1.lo
sigcomp_state_hdlr.lo sigcomp-udvm.lo  sminmpec.lo sna-utils.lo
stats_tree.lo strutil.lo t35.lo  tap.lo timestamp.lo to_str.lo
tvbuff.lo value_string.lo  xdlc.lo xmlstub.lo  inet_aton.lo  
dfilter/libdfilter.la ftypes/libftypes.la dissectors/libdissectors.la
-lnsl -lz  -R/opt/csw/lib:/opt/csw/gcc3/lib:/usr/lib:/lib
gcc -shared -Wl,-h -Wl,libethereal.so.0 -o .libs/libethereal.so.0.0.1 
.libs/addr_and_mask.o .libs/addr_resolv.o .libs/adler32.o .libs/afn.o
.libs/asn1.o .libs/atalk-utils.o .libs/base64.o .libs/bitswap.o
.libs/charsets.o .libs/circuit.o .libs/column.o .libs/column-utils.o
.libs/conversation.o .libs/crc16.o .libs/crc32.o .libs/crypt-des.o
.libs/crypt-md4.o .libs/crypt-md5.o .libs/crypt-rc4.o .libs/emem.o
.libs/epan.o .libs/except.o .libs/filesystem.o .libs/follow.o
.libs/frame_data.o .libs/h225-persistentdata.o .libs/in_cksum.o
.libs/ipproto.o .libs/ipv4.o .libs/nstime.o .libs/osi-utils.o
.libs/packet.o .libs/plugins.o .libs/prefs.o .libs/proto.o
.libs/ptvcursor.o .libs/radius_dict.o .libs/range.o .libs/reassemble.o
.libs/req_resp_hdrs.o .libs/sha1.o .libs/sigcomp_state_hdlr.o
.libs/sigcomp-udvm.o .libs/sminmpec.o .libs/sna-utils.o
.libs/stats_tree.o .libs/strutil.o .libs/t35.o .libs/tap.o
.libs/timestamp.o .libs/to_str.o .libs/tvbuff.o .libs/value_string.o
.libs/xdlc.o .libs/xmlstub.o .libs/inet_aton.o -z allextract
dfilter/.libs/libdfilter.a ftypes/.libs/libftypes.a
dissectors/.libs/libdissectors.a -z defaultextract  -R/opt/csw/lib
-R/opt/csw/lib -R/usr/local/lib
-R/opt/csw/lib:/opt/csw/gcc3/lib:/usr/lib:/lib -L/usr/local/lib
-L/opt/csw/lib /opt/csw/lib/libgmodule-2.0.so -ldl
/opt/csw/lib/libglib-2.0.so /opt/csw/lib/libintl.so -lc
/opt/csw/lib/libiconv.so /opt/csw/lib/libpcre.so -lnsl -lz -lc
...
gcc -DINET6 -DSOLARIS8_INET6 "-D_U_=__attribute__((unused))" -Wall -W
-g -O2 -Wno-return-type -DFUNCPROTO=15 -D_REENTRANT
-I/opt/csw/include/gtk-2.0 -I/opt/csw/lib/gtk-2.0/include
-I/opt/csw/include/atk-1.0 -I/opt/csw/include/pango-1.0
-I/opt/csw/include -I/opt/csw/include/freetype2 -I/usr/openwin/include
-I/opt/csw/include/glib-2.0 -I/opt/csw/lib/glib-2.0/include -O
-Dsolaris2 -DNETSNMP_NO_INLINE -I/opt/csw/include -I.
-I/opt/csw/include -I/opt/csw/include -o .libs/ethereal
pcap-util-unix.o capture_stop_conditions.o capture_ui_utils.o cfile.o
clopts_common.o conditions.o disabled_protos.o packet-range.o
pcap-util.o print.o ps.o ringbuffer.o timestats.o util.o
version_info.o alert_box.o capture.o capture_opts.o capture_sync.o
capture_loop.o color_filters.o file.o fileset.o filters.o g711.o
merge.o proto_hier_stats.o summary.o .libs/etherealS.o -z combreloc -z
text  -L/usr/local/lib gtk/libui.a wiretap/.libs/libwiretap.so
-L/opt/csw/lib epan/.libs/libethereal.so /usr/local/lib/libnetsnmp.so
-lgen -lkstat -lelf -ladm -lcrypto /opt/csw/lib/libpcre.so -lpcap
/opt/csw/lib/libgtk-x11-2.0.so /opt/csw/lib/libgdk-x11-2.0.so
/opt/csw/lib/libatk-1.0.so /opt/csw/lib/libgdk_pixbuf-2.0.so
/opt/csw/lib/libpangoxft-1.0.so /opt/csw/lib/libpangox-1.0.so
/opt/csw/lib/libpango-1.0.so -lm /opt/csw/lib/libgobject-2.0.so
/opt/csw/lib/libgmodule-2.0.so -ldl /opt/csw/lib/libgthread-2.0.so
-lthread /opt/csw/lib/libglib-2.0.so -liconv -lintl
/opt/csw/lib/libintl.so -lc /opt/csw/lib/libiconv.so -lkrb5 -lk5crypto
-lkrb5support -lcom_err -lresolv -lsocket -lnsl -lz
-R/home/common/Ethereal/ethereal-0.10.12svn-solaris-sparc32/lib
-R/usr/local/lib -R/opt/csw/lib -R/opt/csw/lib/
-R/opt/csw/lib:/opt/csw/gcc3/lib:/usr/lib:/lib
ld: warning: file /opt/csw/lib/libintl.so: attempted multiple inclusion of file
ld: warning: file /opt/csw/lib/libiconv.so: attempted multiple inclusion of file
Undefined                       first referenced
 symbol                             in file
RegistrationRejectReason_vals       gtk/libui.a(h225_counter.o)
register_all_protocol_handoffs      gtk/libui.a(main.o)
hf_frame_number                     print.o
AdmissionRejectReason_vals          gtk/libui.a(h225_counter.o)
gsm_map_opr_code_strings            gtk/libui.a(gsm_map_stat.o)
isup_message_type_value             gtk/libui.a(voip_calls.o)
T_h323_message_body_vals            gtk/libui.a(h225_counter.o)
...