Wireshark-users: Re: [Wireshark-users] Problems compiling a statically linked wireshark binary on

From: Sean Macleod <seanmac1904@xxxxxxxxx>
Date: Thu, 19 Oct 2006 14:39:50 +0800
Hi Johan

static binaries are a problem for Solaris
another options is to compile a dynamic version and run ldd against it

it will tell you what libraries it expects to find where

on my Solaris 10 system (running ethereal) I get this

ldd /usr/local/bin/ethereal

        libwiretap.so.0 =>       /usr/local/lib/libwiretap.so.0
        libethereal.so.0 =>      /usr/local/lib/libethereal.so.0
        libgtk-1.2.so.0 =>       /usr/sfw/lib/libgtk-1.2.so.0
        libgdk-1.2.so.0 =>       /usr/sfw/lib/libgdk-1.2.so.0
        libgmodule-1.2.so.0 =>   /usr/sfw/lib/libgmodule-1.2.so.0
        libglib-1.2.so.0 =>      /usr/sfw/lib/libglib-1.2.so.0
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libXext.so.0 =>  /usr/openwin/lib/libXext.so.0
        libX11.so.4 =>   /usr/openwin/lib/libX11.so.4
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libm.so.1 =>     /usr/lib/libm.so.1
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libz.so.1 =>     /usr/lib/libz.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libm.so.2 =>     /usr/lib/libm.so.2
        libmp.so.2 =>    /usr/lib/libmp.so.2
        libmd5.so.1 =>   /usr/lib/libmd5.so.1
        libscf.so.1 =>   /usr/lib/libscf.so.1
        libdoor.so.1 =>  /usr/lib/libdoor.so.1
        libuutil.so.1 =>         /usr/lib/libuutil.so.1
        /platform/SUNW,Sun-Blade-1500/lib/libc_psr.so.1
        /platform/SUNW,Sun-Blade-1500/lib/libmd5_psr.so.1

good luck

Sean


Johan R.-Ericson wrote:
Hello!

I'm having trouble compiling a statically linked Wireshark binary on Solaris 8. I need a statically linked binary because I'm compiling for a system that was provided by an external vendor. For reasons unknown the vendor chose to supply the system without X11... (before you ask: Solaris 8 was not either our choice)...

Anyway I installed gcc, binutils, GNU make and friends from sunfreeware.org <http://sunfreeware.org> and went on to compile using the following configure options:

./configure --disable-gtk2 --enable-static --disable-shared --with-ssl=/usr/local/ssl --prefix=/usr/local/wireshark

Everything seems to go fine during compilation. I run into trouble once it starts linking. Illustrated by the section below until we reach the <snip>.

make
/usr/local/bin/perl ./make-version.pl .
Version configuration file version.conf not found.  Using defaults.
This is not a SVN build.
svnversion.h is up-to-date.
make  all-recursive
Making all in tools
Making all in lemon
Making all in wiretap
make  all-am
Making all in doc
Making all in epan
Making all in ftypes
Making all in dfilter
Making all in dissectors
make  all-am
Making all in plugins
Making all in acn
Making all in agentx
Making all in artnet
Making all in asn1
Making all in ciscosm
Making all in docsis
Making all in enttec
Making all in giop
Making all in gryphon
Making all in h223
Making all in irda
Making all in lwres
Making all in mate
Making all in megaco
Making all in mgcp
Making all in opsi
Making all in pcli
Making all in profinet
Making all in rdm
Making all in rlm
Making all in rtnet
Making all in rudp
Making all in sbus
Making all in stats_tree
Making all in v5ua
Making all in packaging
Making all in rpm
Making all in SPECS
Making all in svr4
Making all in nsis
Making all in help
Making all in gtk
/usr/local/bin/perl ./make-version.pl .
Version configuration file version.conf not found.  Using defaults.
This is not a SVN build.
svnversion.h is up-to-date.

<snip>...<snip>

Using Gnu ld (I linked /usr/ccs/bin/ld to /usr/local/bin/ld i get:
-----------------------
/usr/ccs/bin/ld: cannot find -lkstat
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `wireshark'

Using Suns ld (/usr/ccs/bin/ld) I get other link errors that I forgot to copy down and it takes me about 3 hours to recompile evrything.... :-(

Does anyone have any hints as to whats going wrong and how to fix it?

Any help would be much appreciated!
/johan


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

_______________________________________________
Wireshark-users mailing list
Wireshark-users@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-users