Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Lack of dependency generation in nsock makefile
From: David Fifield <david () bamsoftware com>
Date: Fri, 19 Jun 2009 11:28:38 -0600

On Fri, Mar 06, 2009 at 08:38:53PM -0800, Fyodor wrote:
On Thu, Mar 05, 2009 at 12:52:15PM -0600, Nelson wrote:
nevermind... make clean and distclean fixed the issue

This makes me wonder if the Nmap (or dependencies such as nbase,
nsock, etc.) Makefile dependency tracking is working properly.  Has
anyone else been noticing this problem (where you have to do make
clean after an svn update in your sandbox because a plain 'make' fails
to compile some of the new code files)?

This just happened to me again today while working in nsock. It wasn't
after an update, it was after modifying some files.

Scanning 3 services on localhost (127.0.0.1)
nmap: nsock_connect.c:158: nsock_connect_tcp: Assertion `nsi->state == NSIOD_STATE_INITIAL || nsi->state == 
NSIOD_STATE_UNKNOWN' failed.
Aborted

I finally looked at the nsock makefile. It doesn't do automatic
dependency generation with a makefile.dep file like nmap and ncat do.
The only dependencies it knows are of .o files on their .c counterparts,
so if something changes in a header included by a .c file, the .c won't
get rebuilt. You can try it yourself with

        touch nsock/src/nsock_internal.h
        make

Nothing will get recompiled, even though there are a lot of files that
include nsock_internal.h.

I will see about fixing this, or have a bug wrangler do it, if nobody
offers a patch first.

David Fifield

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


  By Date           By Thread  

Current thread:
  • Lack of dependency generation in nsock makefile David Fifield (Jun 19)
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]