Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 117571 - nmap-3.95 won't build if 'ccache' is in FEATURES list
Summary: nmap-3.95 won't build if 'ccache' is in FEATURES list
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Michal Januszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-03 04:08 UTC by Manfred Kroehnert
Modified: 2006-01-29 13:46 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
config.log output for compilation of nmap-3.95 with gcc-3.4.5 (config.log,12.49 KB, text/plain)
2006-01-14 15:35 UTC, Manfred Kroehnert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Manfred Kroehnert 2006-01-03 04:08:07 UTC
I have ccache in the FEATURES list in /etc/make.conf.
When I tried to compile nmap-3.95 I got the following error:

checking for ccache g++... 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://www.insecure.org/nmap/nmap_download.html ))

After taking ccache out of the FEATURES list nmap-3.95 compiled fine
Comment 1 Pawel Madej aka Nysander 2006-01-05 04:41:52 UTC
please show output of 
# emerge info
# gcc-config --list
# emerge -pv nmap
Comment 2 Manfred Kroehnert 2006-01-05 13:57:31 UTC
emerge info:
----------------------------------------------------------------------------------
Portage 2.1_pre3-r1 (hardened/x86/2.6, gcc-3.4.5, glibc-2.3.5-r3, 2.6.14-gentoo-r3n i686)
=================================================================
System uname: 2.6.14-gentoo-r3n i686 Intel(R) Pentium(R) 4 CPU 1.70GHz
Gentoo Base System version 1.12.0_pre13
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -mcpu=pentium4 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O2 -mcpu=pentium4 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://mirror.etf.bg.ac.yu/gentoo http://gentoo.inode.at/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/"
LC_ALL="en_US.utf8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage//packages/x86/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage/"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X aalib adns alsa aqt audiofile avi berkdb bzip2 cdr cmucl crypt cups curl directfb dlloader dvd emacs ethereal exif expat fam flac foomaticdb gd gdbm gif glut gmp gpm gtk gtk2 hardened idn imlib ipv6 java jpeg junit lcms libcaca libwww lua mad mikmod mmx mng mysql nas ncurses nls ogg openal opengl pam pcre perl php pic png python qt readline samba sdl sqlite sse ssl svga tcltk tcpd tetex tiff truetype udev unicode usb userlocales vorbis x86 xemacs xml xml2 xmms xvid zlib elibc_glibc kernel_linux userland_GNU video_cards_radeon"
Unset:  ASFLAGS, CTARGET, LANG, LDFLAGS, LINGUAS

-------------------------------------------------------------------------------



gcc-config -l:
-------------------------------------------------------------------------------
 [1] i686-pc-linux-gnu-3.3.4
 [2] i686-pc-linux-gnu-3.4.5 *
 [3] i686-pc-linux-gnu-3.4.5-hardenednopie
 [4] i686-pc-linux-gnu-3.4.5-hardenednopiessp
 [5] i686-pc-linux-gnu-3.4.5-hardenednossp
 [6] i686-pc-linux-gnu-3.4.5-vanilla
-------------------------------------------------------------------------------



emerge -pv nmap:
-------------------------------------------------------------------------------
[ebuild   R   ] net-analyzer/nmap-3.95  USE="gtk ssl" 0 kB
-------------------------------------------------------------------------------
Comment 3 Michal Januszewski (RETIRED) gentoo-dev 2006-01-07 14:27:44 UTC
Could you please try to temporarily switch to i686-pc-linux-gnu-3.3.4 and see whether nmap compiles when this gcc profile is used?
Comment 4 Manfred Kroehnert 2006-01-11 23:32:42 UTC
sorry for the delay, but here comes the result:

1) # gcc-config 1

2) # gcc-config -l

 [1] i686-pc-linux-gnu-3.3.4 *
 [2] i686-pc-linux-gnu-3.4.5
 [3] i686-pc-linux-gnu-3.4.5-hardenednopie
 [4] i686-pc-linux-gnu-3.4.5-hardenednopiessp
 [5] i686-pc-linux-gnu-3.4.5-hardenednossp
 [6] i686-pc-linux-gnu-3.4.5-vanilla

3) # emerge -av nmap


These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] net-analyzer/nmap-3.95  USE="gtk ssl" 0 kB 

Total size of downloads: 0 kB

Do you want me to merge these packages? [Yes/No] 
>>> emerge (1 of 1) net-analyzer/nmap-3.95 to /
>>> checksums files   ;-) nmap-3.93.ebuild
>>> checksums files   ;-) nmap-3.95.ebuild
>>> checksums files   ;-) nmap-3.90.ebuild
>>> checksums files   ;-) nmap-3.81.ebuild
>>> checksums files   ;-) nmap-3.83.ebuild
>>> checksums files   ;-) files/digest-nmap-3.81
>>> checksums files   ;-) files/digest-nmap-3.83
>>> checksums files   ;-) files/digest-nmap-3.90
>>> checksums files   ;-) files/digest-nmap-3.93
>>> checksums files   ;-) files/digest-nmap-3.95
>>> checksums files   ;-) files/nmap-logo-64.png
>>> checksums files   ;-) files/nmap-3.93-gcc41.patch
>>> checksums src_uri ;-) nmap-3.95.tar.bz2
>>> Unpacking source...
>>> Unpacking nmap-3.95.tar.bz2 to /var/tmp/portage/nmap-3.95/work
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/nmap-3.95/work/nmap-3.95 ...
 * econf: updating nmap-3.95/nsock/src/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating nmap-3.95/nsock/src/config.sub with /usr/share/gnuconfig/config.sub
 * econf: updating nmap-3.95/libpcap/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating nmap-3.95/libpcap/config.sub with /usr/share/gnuconfig/config.sub
 * econf: updating nmap-3.95/libpcre/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating nmap-3.95/libpcre/config.sub with /usr/share/gnuconfig/config.sub
 * econf: updating nmap-3.95/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating nmap-3.95/config.sub with /usr/share/gnuconfig/config.sub
 * econf: updating nmap-3.95/libdnet-stripped/config/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating nmap-3.95/libdnet-stripped/config/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --with-nmapfe --with-openssl --build=i686-pc-linux-gnu
checking for i686-pc-linux-gnu-gcc... ccache cc
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 cc accepts -g... yes
checking for ccache cc option to accept ANSI C... none needed
checking for i686-pc-linux-gnu-g++... ccache g++
checking whether we are using the GNU C++ compiler... yes
checking whether ccache g++ accepts -g... yes
checking for ccache g++... 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://www.insecure.org/nmap/nmap_download.html ))

!!! Please attach the following file when filing a report to bugs.gentoo.org:
!!! /var/tmp/portage/nmap-3.95/work/nmap-3.95/config.log

!!! ERROR: net-analyzer/nmap-3.95 failed.
!!! Function econf, Line 489, Exitcode 0
!!! econf failed
!!! If you need support, post the topmost build error, NOT this status message.
Comment 5 Michal Januszewski (RETIRED) gentoo-dev 2006-01-13 01:35:07 UTC
Please follow the on-screen instructions displayed by the ebuild:

!!! Please attach the following file when filing a report to bugs.gentoo.org:
!!! /var/tmp/portage/nmap-3.95/work/nmap-3.95/config.log

and attach the config.log file to this bug :)
Comment 6 Manfred Kroehnert 2006-01-14 15:35:48 UTC
Created attachment 77128 [details]
config.log output for compilation of nmap-3.95 with gcc-3.4.5

Here is the file /var/tmp/portage/nmap-3.95/work/nmap-3.95/config.log .
I used gcc 3.4.5 for compilation.
Comment 7 Michal Januszewski (RETIRED) gentoo-dev 2006-01-15 05:27:48 UTC
I think you might have set some env. variables that are causing the problem.
Please try doing:

  # unset CC CXX 
  # emerge nmap
Comment 8 Manfred Kroehnert 2006-01-22 11:05:24 UTC
After unsetting CC and CXX nmap compiles fine.

> I think you might have set some env. variables that are causing the problem.

But my intention was to compile nmap with support of ccache thus ccache is listed
in the FEATURES list in /etc/make.conf .
And therefore it is correct if CC is set to "ccache cc".
And my reason for submitting this as a bug was that nmap can't be compiled with support of ccache so that it can be handled in the ebuild.

If this is wrong please correct me :-)
Comment 9 Michal Januszewski (RETIRED) gentoo-dev 2006-01-22 14:03:31 UTC
First of all, nmap *can* be compiled with 'ccache' in FEATURES. I'm able to do so as long as the CC and CXX variables are not set. If I set them, things start to break.

I was always under the impression, that one only needs to put 'ccache' in FEATURES to activate ccache support in Portage and that no playing with env variables is required.

If you think this is not the case, please give me a link to the docs describing how ccache should be used with Portage.
Comment 10 Manfred Kroehnert 2006-01-23 23:25:20 UTC
Ok, now I figured out, why CC was set to "ccache cc".
In the portage guide I read that I should modify the PATH variable in
/etc/env.d/00basic if I wanted to use ccache for other users as default.
But after doing this nothing changed and the cache directory was still empty.
So I decided to set the CC variable in my users profile.
And this was inherited after changing to root with su.

Now I have modified the PATH variable in my profile to include the
ccache bin directory before /usr/bin and it now works without changing CC.

Now my only remaining question is if the ebuild could/should deal with
env-variables that are set but prevent the program from compiling.

I have learned my lesson and my next bug report will be better.
Comment 11 Michal Januszewski (RETIRED) gentoo-dev 2006-01-29 13:46:49 UTC
I don't think the ebuild is the proper place to deal with this kind of problems. I imagine nmap isn't the only package that can be 'broken' by having wrong settings in env. variables.

If it is to be handled at all, I think it would be Portage's job (as in the core emerge program, not the ebuilds) to sanitize the environment.