Nmap Development mailing list archives
Building Nmap on older platforms - liblua issues
From: "Greg Earle" <earle () isolar DynDNS ORG>
Date: Wed, 22 Apr 2020 12:42:15 -0700
Hello everyone, long-time listener, first time caller ... Sorry for the long post.I'm trying to build 7.80 on an ancient hardware/OS/compiler platform (frozen CM configuration - don't ask).
"liblua" is giving me fits. First thing I ran into: == Compiling liblua gmake[1]: Entering directory '/src/networking/nmap-7.80/liblua'gcc -O2 -Wall -W -DLUA_COMPAT_5_2 -g -O2 -Wall -DLUA_USE_POSIX -DLUA_USE_DLOPEN -I./liblinear -I./liblua -I./libdnet-stripped/include -I./libssh2/include -I./libz -I/usr/local/include -I/usr/local/include -I./nbase -I./nsock/include -DHAVE_CONFIG_H -DNMAP_PLATFORM=\"********************\" -DNMAPDATADIR=\"/usr/local/share/nmap\" -D_FORTIFY_SOURCE=2 -c -o lapi.o lapi.c
In file included from lua.h:16, from lapi.c:16:luaconf.h:581:2: #error "Compiler does not support 'long long'. Use option '-DLUA_32BITS' or '-DLUA_C89_NUMBERS' (see file 'luaconf.h' for details)"
==I can add "-DLUA_C89_NUMBERS" into the mix, but then it gags on "log2()", which doesn't come in libm on this OS - it's available in a different library.
(I don't want to use "-DLUA_USE_C89" because the compiler supports C99 and there's no need to disable C99 features when the function is available, just not in a standard place.)
Then I noticed something.In the top-level Makefile, instead of doing "cd $(LIBLUADIR) && $(MAKE) <platform>"", it does this:
==@echo Compiling liblua; cd $(LIBLUADIR) && $(MAKE) liblua.a CC="$(CC)" MYCFLAGS="$(CFLAGS) -DLUA_USE_POSIX -DLUA_USE_DLOPEN"
==If I manually set MYCFLAGS, MYLDFLAGS and MYLIBS in liblua/Makefile, I can do a "make <platform>" down in liblua and it builds cleanly.
But because of that top-level Makefile line, all of my MYCFLAGS/MYLDFLAGS/MYLIBS settings get ignored and it fails. So my question is:
How can I tell the build how to find my alternate math library if it's going to override the mechanism liblua provides to do just that?
-------Oh, while I'm here - "libz/configure" and "liblua/Makefile" both contain references to "-Wextra", which isn't supported on older GCC versions. "-W" seems to be the same thing and it's maintained for compatibility; could those two instances be changed to use that?
==[/src/networking/nmap-7.80] $ grep Wextra libz/configure.dist liblua/Makefile libz/configure: CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual -pedantic -DZLIB_CONST"
libz/configure: CFLAGS="${CFLAGS} -Wall -Wextra -pedantic" == Thanks in advance, - Greg _______________________________________________ Sent through the dev mailing list https://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Building Nmap on older platforms - liblua issues Greg Earle (Apr 22)