Hi Bojan,
Well I've been playing around with your patch and it seems to have the
same problems I've experienced in the past- namely if you have
multiple instances of a shared library, you can have only one shared
library search path and so you'll possibly link to the wrong one.
Example, I have libpcap installed in /usr/local and /opt/local and
libnet in /opt/local.
If I were to do:
./configure --with-libpcap=/usr/local && make
The result is something like this:
gcc -I/opt/local/include -I.. -DTCPBRIDGE -ggdb -std=gnu99 -Wall
-Wextra -Wno-variadic-macros -I/usr/local/include -o tcpbridge
tcpbridge-tcpbridge_opts.o tcpbridge-tcpbridge.o tcpbridge-bridge.o
tcpbridge-send_packets.o ./tcpedit/libtcpedit.a ./common/libcommon.a
-L/opt/local/lib -lnet -L/usr/local/lib -lpcap
/opt/local/lib/libopts.dylib -lm -ldl
Notice: -L/opt/local/lib -lnet for libnet and -L/usr/local/lib -lpcap
But when you look to see what was actually linked:
otool -L src/tcpreplay:
src/tcpreplay:
/opt/local/lib/libpcap.0.dylib (compatibility version 1.0.0,
current version 0.9.5)
/opt/local/lib/libopts.25.dylib (compatibility version 29.0.0,
current version 29.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 88.3.6)
Notice it's picking up libpcap from /opt/local because libnet was
specified first on the link list. This is unfortunately a really big
deal b/c many people have older versions of libpcap and configure will
detect different functionality then what is provided at run/link-time.
Anyways, I've made a small change to your patch (included here) so
that it reports which directory it's finding each library in. Makes
things a little easier to debug.
Regards,
Aaron
On 4/4/07, Bojan Smojver <[EMAIL PROTECTED]> wrote:
> On Wed, 2007-04-04 at 23:02 -0700, Aaron Turner wrote:
>
> > Hey thanks for the patch Bojan. I'll try go through it and merge it
> > to trunk before I go out of town, otherwise it'll happen next week.
>
> No worries. I just hope it works correctly when there are multiple
> installations of libnet/libpcap on the system. If not, let me know.
>
> --
> Bojan
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Tcpreplay-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/tcpreplay-users
>
--
Aaron Turner
http://synfin.net/
http://tcpreplay.synfin.net/ - Pcap editing & replay tools for Unix
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Tcpreplay-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tcpreplay-users