Nmap Development mailing list archives
configure fails to detect g++
From: Rainer Müller <raimue () macports org>
Date: Thu, 15 May 2008 00:36:52 +0200
Hi, the configure script of nmap fails when invoked with CXX being set to a non-path value in the environment. We at MacPorts [1] are using a special way to invoke ccache for building. When using ccache, we prepend it to the path to the actual compiler. So the result in the environment is: CC="ccache /usr/bin/gcc-4.0" CXX="ccache /usr/bin/g++-4.0" While the configure script of nmap accepts this for CC without problems, it errors out on CXX: --snip-- checking build system type... i386-apple-darwin9.2.2 checking host system type... i386-apple-darwin9.2.2 checking for gcc... ccache /usr/bin/gcc-4.0 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... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether ccache /usr/bin/gcc-4.0 accepts -g... yes checking for ccache /usr/bin/gcc-4.0 option to accept ISO C89... none needed checking for inline... inline checking for gcc... (cached) ccache /usr/bin/gcc-4.0 checking whether we are using the GNU C compiler... (cached) yes checking whether ccache /usr/bin/gcc-4.0 accepts -g... (cached) yes checking for ccache /usr/bin/gcc-4.0 option to accept ISO C89... (cached) none needed checking whether we are using the GNU C++ compiler... yes checking whether ccache /usr/bin/g++-4.0 accepts -g... yes checking for ccache /usr/bin/g++-4.0... MISSING configure: error: Could not locate a C++ compiler. If it exists, add it to your PATH or give configure the CXX=path_to_compiler argument. Otherwise, install a C++ compiler such as g++ or install a binary package of Nmap (see http://nmap.org/download.html )) --snap-- Seems like the configure script tries to check if CXX is set to a real path. But actually it already called it before to check if CXX is g++ and whether CXX accepts -g. So this check seems unnecessary to me. For now we just disabled ccache for this port, but it would be nice to get this working. I attached the full config.log to this mail. If you need further information, please ask. Rainer [1] MacPorts is a package manager for Mac OS X, see http://macports.org
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ ./configure --prefix=/opt/local --without-zenmap --mandir=${prefix}/share/man --infodir=${prefix}/share/info
--with-openssl=/opt/local --with-libpcre=/opt/local
## --------- ##
## Platform. ##
## --------- ##
hostname = Dysnomia.local
uname -m = i386
uname -r = 9.2.2
uname -s = Darwin
uname -v = Darwin Kernel Version 9.2.2: Tue Mar 4 21:17:34 PST 2008; root:xnu-1228.4.31~1/RELEASE_I386
/usr/bin/uname -p = i386
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 9.2.2: Tue Mar 4 21:17:34 PST 2008; root:xnu-1228.4.31~1/RELEASE_I386
Kernel configured for up to 2 processors.
2 processors are physically available.
2 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1
Primary memory available: 1.00 gigabytes
Default processor set: 92 tasks, 334 threads, 2 processors
Load average: 0.86, Mach factor: 1.22
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /bin
PATH: /sbin
PATH: /usr/bin
PATH: /usr/sbin
PATH: /usr/X11R6/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1848: checking build system type
configure:1866: result: i386-apple-darwin9.2.2
configure:1888: checking host system type
configure:1903: result: i386-apple-darwin9.2.2
configure:1973: checking for gcc
configure:2000: result: ccache /usr/bin/gcc-4.0
configure:2238: checking for C compiler version
configure:2245: ccache /usr/bin/gcc-4.0 --version >&5
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2248: $? = 0
configure:2255: ccache /usr/bin/gcc-4.0 -v >&5
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking -enable-werror --prefix=/usr
--mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple
--with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)
configure:2258: $? = 0
configure:2265: ccache /usr/bin/gcc-4.0 -V >&5
gcc-4.0: argument to `-V' is missing
configure:2268: $? = 1
configure:2291: checking for C compiler default output file name
configure:2318: ccache /usr/bin/gcc-4.0 -pipe -O2 -I/opt/local/include -L/opt/local/lib conftest.c >&5
configure:2321: $? = 0
configure:2359: result: a.out
configure:2376: checking whether the C compiler works
configure:2386: ./a.out
configure:2389: $? = 0
configure:2406: result: yes
configure:2413: checking whether we are cross compiling
configure:2415: result: no
configure:2418: checking for suffix of executables
configure:2425: ccache /usr/bin/gcc-4.0 -o conftest -pipe -O2 -I/opt/local/include -L/opt/local/lib conftest.c >&5
configure:2428: $? = 0
configure:2452: result:
configure:2458: checking for suffix of object files
configure:2484: ccache /usr/bin/gcc-4.0 -c -pipe -O2 -I/opt/local/include conftest.c >&5
configure:2487: $? = 0
configure:2510: result: o
configure:2514: checking whether we are using the GNU C compiler
configure:2543: ccache /usr/bin/gcc-4.0 -c -pipe -O2 -I/opt/local/include conftest.c >&5
configure:2549: $? = 0
configure:2566: result: yes
configure:2571: checking whether ccache /usr/bin/gcc-4.0 accepts -g
configure:2601: ccache /usr/bin/gcc-4.0 -c -g -I/opt/local/include conftest.c >&5
configure:2607: $? = 0
configure:2706: result: yes
configure:2723: checking for ccache /usr/bin/gcc-4.0 option to accept ISO C89
configure:2797: ccache /usr/bin/gcc-4.0 -c -pipe -O2 -I/opt/local/include conftest.c >&5
configure:2803: $? = 0
configure:2826: result: none needed
configure:2845: checking for inline
configure:2871: ccache /usr/bin/gcc-4.0 -c -pipe -O2 -I/opt/local/include conftest.c >&5
configure:2877: $? = 0
configure:2895: result: inline
configure:2963: checking for gcc
configure:2990: result: ccache /usr/bin/gcc-4.0
configure:3228: checking for C compiler version
configure:3235: ccache /usr/bin/gcc-4.0 --version >&5
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3238: $? = 0
configure:3245: ccache /usr/bin/gcc-4.0 -v >&5
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking -enable-werror --prefix=/usr
--mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple
--with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)
configure:3248: $? = 0
configure:3255: ccache /usr/bin/gcc-4.0 -V >&5
gcc-4.0: argument to `-V' is missing
configure:3258: $? = 1
configure:3261: checking whether we are using the GNU C compiler
configure:3313: result: yes
configure:3318: checking whether ccache /usr/bin/gcc-4.0 accepts -g
configure:3453: result: yes
configure:3470: checking for ccache /usr/bin/gcc-4.0 option to accept ISO C89
configure:3573: result: none needed
configure:3707: checking for C++ compiler version
configure:3714: ccache /usr/bin/g++-4.0 --version >&5
i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3717: $? = 0
configure:3724: ccache /usr/bin/g++-4.0 -v >&5
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking -enable-werror --prefix=/usr
--mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple
--with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)
configure:3727: $? = 0
configure:3734: ccache /usr/bin/g++-4.0 -V >&5
g++-4.0: argument to `-V' is missing
configure:3737: $? = 1
configure:3740: checking whether we are using the GNU C++ compiler
configure:3769: ccache /usr/bin/g++-4.0 -c -pipe -O2 -I/opt/local/include conftest.cpp >&5
configure:3775: $? = 0
configure:3792: result: yes
configure:3797: checking whether ccache /usr/bin/g++-4.0 accepts -g
configure:3827: ccache /usr/bin/g++-4.0 -c -g -I/opt/local/include conftest.cpp >&5
configure:3833: $? = 0
configure:3932: result: yes
configure:3960: checking for ccache /usr/bin/g++-4.0
configure:3989: result: MISSING
configure:3998: error: Could not locate a C++ compiler. If it exists, add it to your PATH or give configure the
CXX=path_to_compiler argument. Otherwise, install a C++ compiler such as g++ or install a binary package of Nmap (see
http://nmap.org/download.html ))
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=i386-apple-darwin9.2.2
ac_cv_c_compiler_gnu=yes
ac_cv_c_inline=inline
ac_cv_cxx_compiler_gnu=yes
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value='ccache /usr/bin/gcc-4.0'
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-pipe -O2'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=-I/opt/local/include
ac_cv_env_CPP_set=set
ac_cv_env_CPP_value='ccache /usr/bin/cpp-4.0'
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-pipe -O2'
ac_cv_env_CXX_set=set
ac_cv_env_CXX_value='ccache /usr/bin/g++-4.0'
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=-L/opt/local/lib
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=i386-apple-darwin9.2.2
ac_cv_objext=o
ac_cv_prog_CXXPROG=MISSING
ac_cv_prog_ac_ct_CC='ccache /usr/bin/gcc-4.0'
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
ac_cv_prog_cxx_g=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
BUILDZENMAP=''
CC='ccache /usr/bin/gcc-4.0'
CFLAGS='-pipe -O2'
COMPAT_OBJS=''
COMPAT_SRCS=''
CPP='ccache /usr/bin/cpp-4.0'
CPPFLAGS='-I/opt/local/include'
CXX='ccache /usr/bin/g++-4.0'
CXXFLAGS='-pipe -O2 -Wall '
CXXPROG='MISSING'
DEFS=''
DNET_BUILD=''
DNET_CLEAN=''
DNET_DEPENDS=''
DNET_DIST_CLEAN=''
ECHO_C='ECHO_N=''
ECHO_T=''
EGREP=''
EXEEXT=''
GREP=''
INSTALLNSE=''
INSTALLZENMAP=''
LDFLAGS='-L/opt/local/lib'
LIBDNETDIR=''
LIBDNET_LIBS=''
LIBLUADIR=''
LIBLUA_LIBS=''
LIBNBASE_LIBS=''
LIBNSOCK_LIBS=''
LIBOBJS=''
LIBPCAP_LIBS=''
LIBPCREDIR=''
LIBPCRE_LIBS=''
LIBS=''
LTLIBOBJS=''
LUAFLAGS=''
LUA_BUILD=''
LUA_CLEAN=''
LUA_DEPENDS=''
LUA_DIST_CLEAN=''
NBASEDIR=''
NBASE_BUILD=''
NSELIB_CLEAN=''
NSELIB_DIST_CLEAN=''
NSOCKDIR=''
NSOCK_BUILD=''
OBJEXT='o'
OPENSSL_LIBS=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PCAP_BUILD=''
PCAP_CLEAN=''
PCAP_DEPENDS=''
PCAP_DIST_CLEAN=''
PCRE_BUILD=''
PCRE_CLEAN=''
PCRE_DEPENDS=''
PCRE_DIST_CLEAN=''
PYTHON=''
PYTHON_EXEC_PREFIX=''
PYTHON_PLATFORM=''
PYTHON_PREFIX=''
PYTHON_VERSION=''
SHELL='/bin/sh'
STRIP=''
ZENMAP_CLEAN=''
ZENMAP_DIST_CLEAN=''
ac_ct_CC='ccache /usr/bin/gcc-4.0'
ac_ct_CXX=''
bindir='${exec_prefix}/bin'
build='i386-apple-darwin9.2.2'
build_alias=''
build_cpu='i386'
build_os='darwin9.2.2'
build_vendor='apple'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host='i386-apple-darwin9.2.2'
host_alias=''
host_cpu='i386'
host_os='darwin9.2.2'
host_vendor='apple'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${prefix}/share/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
libpcapdir='libpcap'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${prefix}/share/man'
oldincludedir='/usr/include'
pcredir='libpcre'
pdfdir='${docdir}'
pkgpyexecdir=''
pkgpythondir=''
prefix='/opt/local'
program_transform_name='s,x,x,'
psdir='${docdir}'
pyexecdir=''
pythondir=''
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
subdirs=''
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
configure: exit 1
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- configure fails to detect g++ Rainer Müller (May 14)
- Re: configure fails to detect g++ David Fifield (May 19)
