You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice that before make even invokes the first target, it produces an error, but continues regardless. Testing shows that for me, the make variable NMAP_VERSION ends up containing #1./nmap.h1 instead of 5.94.
Expected behavior
Running without error
Version info (please complete the following information):
OS: Linux 5.15.0
(referencing build of 5.94. --version and --iflist output not relevant)
Additional context
This is occurring for me in a cross-build environment. We have specified values for CC,CXX,CPP in the environment when running configure. This puts these in the right place for the later build.
However, the top of Makefile includes a $(shell) that uses $(CPP) directly, which fails because it isn't using the CPP given in configure's environment
Fix
Fixes include:
Add CPP = @CPP@ as the first line in Makefile
Replace the $(CPP) in the $(shell) command with @CPP@
These have both been tested and do not produce the failure originally seen. The sensible addition of CPP = @CPP@ with CC and CXX at lines 23-24 does not suffice, as the variable is referenced before it's set. If NMAP_VERSION is initialized later in the top portion of the Makefile, that would likely also work.
The text was updated successfully, but these errors were encountered:
Describe the bug
When building with an unusual compilation toolset, the generation of NMAP_VERSION in the root Makefile can fail.
To Reproduce
'CPP=/usr/bin/aarch64-linux/aarch64-linux-cpp --sysroot=/opt/aarch64-linux-sysroot' 'CC=/usr/bin/aarch64-linux/aarch64-linux-gcc --sysroot=/opt/aarch64-linux-sysroot' 'LDFLAGS=--sysroot=/opt/aarch64-linux-sysroot' 'CXX=/usr/bin/aarch64-linux/aarch64-linux-g++ --sysroot=/opt/aarch64-linux-sysroot' ./configure
make
Produces:
Notice that before make even invokes the first target, it produces an error, but continues regardless. Testing shows that for me, the make variable
NMAP_VERSION
ends up containing#1./nmap.h1
instead of5.94
.Expected behavior
Running without error
Version info (please complete the following information):
Additional context
This is occurring for me in a cross-build environment. We have specified values for CC,CXX,CPP in the environment when running configure. This puts these in the right place for the later build.
However, the top of Makefile includes a $(shell) that uses
$(CPP)
directly, which fails because it isn't using the CPP given in configure's environmentFix
Fixes include:
CPP = @CPP@
as the first line inMakefile
$(CPP)
in the $(shell) command with@CPP@
These have both been tested and do not produce the failure originally seen. The sensible addition of
CPP = @CPP@
with CC and CXX at lines 23-24 does not suffice, as the variable is referenced before it's set. IfNMAP_VERSION
is initialized later in the top portion of the Makefile, that would likely also work.The text was updated successfully, but these errors were encountered: