Nmap Development mailing list archives
Re: [nmap-svn] r14271 - nmap-exp/ithilgore/ncrack/nbase
From: ithilgore <ithilgore.ryu.l () gmail com>
Date: Tue, 14 Jul 2009 22:39:34 +0300
Fyodor wrote:
On Tue, Jul 14, 2009 at 07:30:28AM -0700, commit-mailer () insecure org wrote:Log: OK the nbase configure straight from Nmap trunk won't do out-of-the-box but for some reason the autoconf tool gives quite a different output configure between ncrack-nmap. I will have to examine what is the cause of that.Well, Nbase really should be able to handle being under a different parent directory. So if it doesn't, I'd consider it a bug. If you make a patch which makes /nbase generic, that would be great. It beats having a slightly changed nbase just for ncrack.
Here's what I have found so far: For some reason that I am not currently aware of, compilation of Ncrack requires that the -l linking flags of nsock and nbase be in that order: first nsock and then nbase (meaning -lnsock -lnbase). However, Nmap has them in the order: first nbase and then nsock. If Ncrack specifies them in the order -lnbase -lnsock then the linking phase fails complaining that no symbols can be found for some functions that are called in nsock but have been defined in nbase (like get_random_bytes). Putting that aside, with the current order (-lnsock -lnbase), during the first compilation of Ncrack from a brand-new svn checkout, happens the following: Normally by typing ./configure the configure scripts of *all* libraries are being run (nbase, nsock and opensshlib in that order). However, when you then call 'make' to start the compilation procedure, the configure scripts of nbase and nsock are called again (something which shouldn't be really happening). In particular, this is the output of when makes start running: cd nbase && make make[1]: Entering directory `/home/ithilgore/la/ncrack/nbase' autoconf ./config.status --recheck running CONFIG_SHELL=/bin/sh /bin/sh ./configure --disable-option-checking --prefix=/usr/local --cache-file=/dev/null --srcdir=. --no-create --no-recursion checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... .... .... As you see, autoconf is called there again, something which as a result creates a new configure script for nbase. I think this has something to do with the ./config-status --recheck line. The above behaviour of configure scripts running two times, happens only with the order of -lnsock -lnbase. However, as I mentioned aboved, changing that order creates linking problems. So, we've got 2 different paths to choose: 1) Solve the linking problems when specifying -lnbase -lnsock. Everything else seems to work fine from there on. OR 2) See why the configure scripts run twice when specifying -lnsock -lnbase and find a workaround. I would be really glad, if someone, who has a little more experience on these slightly obscure building systems, could shed some light on this matter. -- ithilgore _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- Re: [nmap-svn] r14271 - nmap-exp/ithilgore/ncrack/nbase Fyodor (Jul 14)
- Re: [nmap-svn] r14271 - nmap-exp/ithilgore/ncrack/nbase ithilgore (Jul 15)