Nmap Development mailing list archives
Re: ranlib error when building nsock examples locally
From: Jay Fink <jay.fink () gmail com>
Date: Wed, 1 Jul 2009 10:00:27 -0400
Clean checkout works fine. thanks, j On Tue, Jun 30, 2009 at 5:40 PM, Jay Fink<jay.fink () gmail com> wrote:
I was using an svn checkout; So here are the steps: cd nmap make clean svn up ./configure make sudo make install cd nmap/libpcap (made sure this had built as the examples need it) ./configure make I didn't install at this point because I only needed the libs from that directory cd ../nsock/examples (note that nsock_pcap.c is a file I created, but it compiled fine earlier) make nsock_pcap that is when I hit the error. I can try it again from clean sources tomorrow. I see what you mean, something may have just been off about the build itself. No crashes... well not yet right :) thanks. j On Tue, Jun 30, 2009 at 4:29 PM, Daniel Roethlisberger<daniel () roe ch> wrote:Jay Fink <jay.fink () gmail com> 2009-06-30:All, I ran into this after building an nmap/libpcap on FreeBSD-8.0-current when trying to compile a test program using nsock in ~/nmap/nsock/examples: [jrf@pradu ~/nmap/nsock/examples]$ make nsock_pcap gcc -o nsock_pcap -I/usr/local/include -Wall -g -I../include -I../../nbase nsock_pcap.o ../src/libnsock.a ../../nbase/libnbase.a -lssl -lpcap -lcrypto ../../libpcap/libpcap.a ../../libpcap/libpcap.a: could not read symbols: Archive has no index; run ranlib to add one *** Error code 1 Stop in /usr/home/jrf/nmap/nsock/examples. I went into nmap/libpcap and ran 'ranlib libpcap.a' and it compiles fine now. I am running a FreeBSD 8 snapshot: FreeBSD pradu 8.0-CURRENT-200906 FreeBSD 8.0-CURRENT-200906 #0: Sun Jun 7 10:31:30 UTC 2009 root () mason cse buffalo edu:/usr/obj/usr/src/sys/GENERIC amd64I just tried to reproduce this on my -current test box built from fresh sources csup'ed a few hours ago. Running configure and make in nmap/libpcap yields a perfectly fine libpcap.a (ranlib is run correctly on libpcap.a as the last step in building libpcap). I succeeded in manually linking nsock_telnet against pcap at ../../libpcap/libpcap.a and I verified that libpcap was statically linked using ldd. $ uname -a FreeBSD cassandra.ustcor.roe.ch 8.0-CURRENT FreeBSD 8.0-CURRENT #2: Tue Jun 30 00:46:44 CEST 2009 root () cassandra ustcor roe ch:/usr/obj/usr/src/sys/GENERIC amd64 What were the exact commands you used to configure and build Nmap's libpcap, starting from a fresh checkout or release tarball? (Your box didn't by any chance crash at some point, leaving a corrupted/empty libpcap.a behind? I think there was a chdir() related LOR in -current at around the time the June snapshot must have been taken, not sure though.) -- Daniel Roethlisberger http://daniel.roe.ch/ _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- Re: ranlib error when building nsock examples locally Jay Fink (Jul 01)