Nmap Development mailing list archives

Re: nmap-4.75 : make still fails with --without-liblua


From: David Fifield <david () bamsoftware com>
Date: Mon, 15 Sep 2008 22:27:50 -0600

On Sat, Sep 13, 2008 at 12:23:12AM -0700, Fyodor wrote:
On Tue, Sep 09, 2008 at 05:57:08PM +0200, Simon Zilliken wrote:
Hello there,

make makefile.dep fails if --without-liblua is set, complaining about missing 
header files:

nse_main.h:5:19: error: lua.h: No such file or directory
nse_main.h:6:22: error: lualib.h: No such file or directory
nse_main.h:7:23: error: lauxlib.h: No such file or directory

This is because -DNOLUA is prepended to CXXFLAGS only, not CPPFLAGS. A 
possible solution would be to add CXXFLAGS to the makefile.dep rule in 
Makefile.in, line 261:

Hi Simon.  I've made this change in SVN and also a related change.  It
seems to do the trick from my testing, but if you still have trouble
with this, let me know.

Sorry I didn't look at this sooner. Making makefile.dep with CXXFLAGS
fails when creating a universal binary for Mac OS X. CXXFLAGS
necessarily contains "-arch i386 -arch ppc", which leads to this error:

Makefile:276: makefile.dep: No such file or directory
g++ -MM -Iliblua -Ilibdnet-stripped/include -Ilibpcre -isysroot \
/Developer/SDKs/MacOSX10.4u.sdk -Ilibpcap -Inbase -Insock/include \
-no-cpp-precomp -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
-mmacosx-version-min=10.4 -arch ppc -arch i386 -Wall  -fno-strict-aliasing \
-DHAVE_CONFIG_H -DNMAP_NAME=\"Nmap\" -DNMAP_URL=\"http://nmap.org\"; \
-DNMAP_PLATFORM=\"i386-apple-darwin9.4.0\" \
-DNMAPDATADIR=\"/usr/local/share/nmap\" \
-DNMAPLIBEXECDIR=\"/usr/local/libexec/nmap\" main.cc nmap.cc targets.cc \
tcpip.cc nmap_error.cc utils.cc idle_scan.cc osscan.cc osscan2.cc output.cc \
scan_engine.cc timing.cc charpool.cc services.cc protocols.cc nmap_rpc.cc \
portlist.cc NmapOps.cc TargetGroup.cc Target.cc FingerPrintResults.cc \
service_scan.cc NmapOutputTable.cc MACLookup.cc nmap_tty.cc nmap_dns.cc \
traceroute.cc portreasons.cc nse_main.cc nse_nsock.cc nse_init.cc nse_fs.cc \
nse_nmaplib.cc nse_debug.cc nse_pcrelib.cc nse_binlib.cc nse_hash.cc \
nse_bit.cc > makefile.dep
g++-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
make[1]: *** [makefile.dep] Error 1
make: *** [stage-nmap] Error 2

CXXFLAGS used to be used to make makefile.dep, but I took it out in
r7198 for just this reason.

I committed a change that puts -DNOLUA in CPPFLAGS instead. Simon, would
you try r10212 and see if it works?

David Fifield

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


Current thread: