Nmap Development mailing list archives

Re: SVN 11833 OSX 10.5.6 Compile Error


From: Chris Clements <cclements () flatearth net>
Date: Fri, 23 Jan 2009 17:16:34 -0600

I was indeed using -j2

Will svn up and test again Monday.

Chris

On Jan 23, 2009, at 4:58 PM, David Fifield <david () bamsoftware com> wrote:

On Fri, Jan 23, 2009 at 04:20:09PM -0600, Chris Clements wrote:
Getting the following error while trying to compile:

Compiling libnsock
cd nsock/src && make
...
gcc -c  -g -O2 -Wall  -I../../nbase  -DHAVE_CONFIG_H -DNSOCK_VERSION=
\"0.02\" -D_FORTIFY_SOURCE=2 -I../include -I../../libpcap nsock_pcap.c
-o nsock_pcap.o
rm -f libnsock.a
ar cr libnsock.a error.o filespace.o gh_list.o nsock_connect.o
nsock_core.o nsock_iod.o nsock_read.o nsock_timers.o nsock_write.o
nsock_ssl.o nsock_utils.o nsock_event.o nsock_pool.o netutils.o
nsock_pcap.o
rm -f libnsock.a
ranlib: ar cr libnsock.a error.o filespace.o gh_list.o nsock_connect.o
nsock_core.o nsock_iod.o nsock_read.o nsock_timers.o nsock_write.o
nsock_ssl.o nsock_utils.o nsock_event.o nsock_pool.o netutils.o
nsock_pcap.o
file: libnsock.a(nsock_utils.o) has no symbols
ranlib: file: libnsock.a is not writable (No such file or directory)
ar: internal ranlib command failed
make[2]: *** [libnsock.a] Error 1
make[1]: *** [../nsock/src/libnsock.a] Error 2
make: *** [ncat_build] Error 2
make: *** Waiting for unfinished jobs....
ranlib: file: libnsock.a(nsock_utils.o) has no symbols
ranlib libnsock.a
ranlib: file: libnsock.a(nsock_utils.o) has no symbols

I don't get the error with a normal build with "make". However I was
able to get something similar with "make -j 4":

gcc -c -g -O2 -Wall -I../../nbase -DHAVE_CONFIG_H -DNSOCK_VERSION= \"0.02\" -D_FORTIFY_SOURCE=2 -I../include -I../../libpcap nsock_pcap.c -o nsock_pcap.o
rm -f libnsock.a
ar cr libnsock.a error.o filespace.o gh_list.o nsock_connect.o nsock_core.o nsock_iod.o nsock_read.o nsock_timers.o nsock_write.o nsock_ssl.o nsock_utils.o nsock_event.o nsock_pool.o netutils.o nsock_pcap.o
ranlib: file: libnsock.a(nsock_utils.o) has no symbols
rm -f libnsock.a
ar cr libnsock.a error.o filespace.o gh_list.o nsock_connect.o nsock_core.o nsock_iod.o nsock_read.o nsock_timers.o nsock_write.o nsock_ssl.o nsock_utils.o nsock_event.o nsock_pool.o netutils.o nsock_pcap.o
ranlib: file: libnsock.a(nsock_utils.o) has no symbols
ranlib libnsock.a
ranlib: archive: libnsock.a truncated or malformed (archive header of next member extends past the end of the file)
make[2]: *** [libnsock.a] Error 1
make[1]: *** [../nsock/src/libnsock.a] Error 2
make: *** [ncat_build] Error 2
make: *** Waiting for unfinished jobs....
ranlib libnsock.a
ranlib: file: libnsock.a(nsock_utils.o) has no symbols

It's a race condition in the build process, similar to the one fixed in
r9875. You can see that two different processes are trying to build
libnsock.a at the same time. I'll test a fix, but in the meantime you
should be able to use "make -j 1".

David Fifield


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: