wireshark-dev October 2010 archive
Main Archive Page > Month Archives  > wireshark-dev archives
wireshark-dev: Re: [Wireshark-dev] Unable to run wireshark, tsha

Re: [Wireshark-dev] Unable to run wireshark, tshark or dumpcap from the build directory.

From: Stephen Fisher <steve_at_nospam>
Date: Fri Oct 01 2010 - 22:22:35 GMT
To: Developer support list for Wireshark <wireshark-dev@wireshark.org>

On Fri, Oct 01, 2010 at 06:32:41PM +0000, Christopher Maynard wrote:

> I am unable to run wireshark, tshark or dumpcap from the build Is
> there something I'm doing wrong here? Those symbols are all in
> epan/.libs/libwireshark.so. My guess is that the binaries are linking
> against the much older already installed version of wireshark instead
> of the new one, but how do I fix this? I thought
> WIRESHARK_RUN_FROM_BUILD_DIRECTORY=1 was supposed to take care of
> this. Any ideas?

Do you have a different version installed on the system while you're
trying to run from the build directory? I've run into problems in the
past with that. The RUN_FROM_BUILD_DIRECTORY logic in epan/filesystem.c
doesn't seem to have anything to do with dynamic library linking and it
turns itself on automatically when the executable name has ".libs" at
the beginning anyway.

FreeBSD has a tool called ldd that links the objects that an executable
is linked to. Linux should have a similar program. What about if you
run it with "libtool --mode=execute" like below:

sfisher@shadow:/usr/local/src/wireshark>libtool --mode=execute ldd ./tshark
        libwiretap.so.0 => /usr/local/src/wireshark/wiretap/.libs/libwiretap.so.0 (0x280ba000)
        libwireshark.so.0 => /usr/local/src/wireshark/epan/.libs/libwireshark.so.0 (0x28108000)
        libwsutil.so.0 => /usr/local/src/wireshark/wsutil/.libs/libwsutil.so.0 (0x2a272000)

When I don't run with the wrapper, it finds the installed libraries:

sfisher@shadow:/usr/local/src/wireshark>libtool --mode=execute ldd .libs/tshark
        libwiretap.so.0 => /usr/local/lib/libwiretap.so.0 (0x280ba000)
        libwireshark.so.0 => /usr/local/lib/libwireshark.so.0 (0x28108000)
        libwsutil.so.0 => /usr/local/lib/libwsutil.so.0 (0x2a272000)

Sent via: Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev