Nmap Development mailing list archives

Re: ranlib error when building nsock examples locally


From: Daniel Roethlisberger <daniel () roe ch>
Date: Tue, 30 Jun 2009 22:29:55 +0200

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  amd64

I 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


Current thread: