Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 266306 - virtual/gnat-4.3 needed (gcc-4.3.2 cannot build dev-lang/gnat-gcc-4.2.3)
Summary: virtual/gnat-4.3 needed (gcc-4.3.2 cannot build dev-lang/gnat-gcc-4.2.3)
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: ada team [OBSOLETE]
URL:
Whiteboard:
Keywords:
: 272611 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-15 21:46 UTC by Erik Quaeghebeur
Modified: 2016-07-17 12:53 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Quaeghebeur 2009-04-15 21:46:27 UTC
I'm emerging an ebuild (alpine, not in portage yet) that needs an ebuild (topal, not in portage yet) that needs gnat. After keywording the unstable(!?) virtual/gnat, providing versions 3.4 (slot 3.4) and 4.1, 4.2 (both slot 4.1), the emerge command wishes to emerge virtual/gnat-4.2 and thus gnat-gcc-4.2.3. I got the following error:

checking whether the C compiler (/var/tmp/portage/dev-lang/gnat-gcc-4.2.3/work/usr/bin/gnatgcc -march=native -O2 -pipe -L/var/tmp/portage/dev-lang/gnat-gcc-4.2.3/work/usr/lib/gnatgcc/x86_64-pc-linux-gnu/4.1) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
 *
 * ERROR: dev-lang/gnat-gcc-4.2.3 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3800:  Called gnatbuild_src_compile 'configure' 'make-tools' 'bootstrap'
 *             environment, line 2679:  Called die
 * The specific snippet of code:
 *                       CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" "${S}"/configure --prefix=${PREFIX} --bindir=${BINPATH} --includedir=${INCLUDEPATH} --libdir="${LIBPATH}" --libexecdir="${LIBEXECPATH}" --datadir=${DATAPATH} --mandir=${DATAPATH}/man --infodir=${DATAPATH}/info --program-prefix=gnat --enable-languages="c,ada" --with-gcc --enable-threads=posix --enable-shared --with-system-zlib ${confgcc} || die "configure failed"
 *  The die message:
 *   configure failed

This does not seem surprising as I don't have gcc-4.2.3 installed. So it seems virtual/gnat-4.3 is what I need to let the stable gnat-gcc-4.3.2 be selected for emerging.

Reproducible: Always

Steps to Reproduce:
1. Install some ebuild depending on gnat
2. keyword virtual/gnat ~...
3. try to emerge ebuild from 1. while having the latest stable gcc installed

Actual Results:  
error about gcc-4.2.3, which is not installed (see description)

Expected Results:  
correct installation of gnat-gcc-4.3.2 with installed gcc-4.3.2

# emerge --info
Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8 x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r8-x86_64-AMD_Athlon-tm-_64_Processor_3200+-with-glibc2.2.5
Timestamp of tree: Wed, 15 Apr 2009 16:45:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.2-r7
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo"
LANG="nl_BE.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="nl nl_BE en_US en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip R X a52 aac aalib accessibility acpi alsa amd64 audiofile bash-completion berkdb blas bluetooth bzip2 cdr cli cracklib crypt cups curl dbus dhcp dri dvd dvdr dvdread eds emboss encode evo fam ffmpeg fftw firefox flac fortran gcj gd gdbm gif gmp gpm gs gstreamer hal haskell iconv idn ieee1394 imagemagick imap isdnlog java javascript jpeg justify kcal kde kdeenablefinal kdehiddenvisibility kpathsea lapack largeterminal latex lcms ldap libcaca libnotify lm_sensors logitech-mouse mad matroska midi mikmod mime mmap mmx mmxext mng mozilla mozsvg mp3 mpeg mplayer mudflap multilib ncurses network nls nodrm nptl nptlonly nsplugin ntplonly nvidia octave ogg oggvorbis opengl openmp pam pcre pdf perl pic plotutils png ppds pppd python qt3 qt3support quicktime readline reflection resolvconf samba sdl sensord session slang sparse spell spl sse sse2 ssl startup-notification subversion svg symlink sysfs tcpd theora threads tiff truetype type1 unicode usb userlocales visualisation vorbis wifi wmf xcomposite xine xml xorg xpm xulrunner xv xvid xvmc zlib" ALSA_CARDS="via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="nl nl_BE en_US en" USERLAND="GNU" VIDEO_CARDS="fbdev nv nvidia vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Erik Quaeghebeur 2009-04-18 12:50:14 UTC
> This does not seem surprising as I don't have gcc-4.2.3 installed. So it seems
> virtual/gnat-4.3 is what I need to let the stable gnat-gcc-4.3.2 be selected
> for emerging.

I made may own virtual/gnat-4.3 ebuild and put it in my local overlay and the problem persists, but now for gnat-gcc-4.3.2. So it seems my idea was wrong and something else is wrong. I don't know what... I'd be happy to provide additional details and testing.
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-04-18 16:08:51 UTC
Please post your "emerge --info" as well as the output of

  gcc-config -c
Comment 3 Erik Quaeghebeur 2009-04-19 08:45:54 UTC
(In reply to comment #2)
> Please post your "emerge --info" as well as the output of
> 
>   gcc-config -c
> 

emerge --info in initial post

# gcc-config -c
x86_64-pc-linux-gnu-4.3.2
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-04-22 21:01:30 UTC
(In reply to comment #3)
> emerge --info in initial post

OMG, how could I miss that? :)

Seems like you alrteady set gcc to the correct version with gcc-config. Maybe you have some stale files of older gcc-versions lying around. You could check /etc/env.d/gcc directory for this. Remove any references to older gcc-versions which aren't any longer installed on your system.
Comment 5 Erik Quaeghebeur 2009-04-22 22:35:41 UTC
(In reply to comment #4)
> 
> Seems like you alrteady set gcc to the correct version with gcc-config. Maybe
> you have some stale files of older gcc-versions lying around. You could check
> /etc/env.d/gcc directory for this. Remove any references to older gcc-versions
> which aren't any longer installed on your system.

This does not seem to be the case:

# ls -al /etc/env.d/gcc/
totaal 9
drwxr-xr-x 2 root root  168 apr  9 23:29 .
drwxr-xr-x 8 root root 1184 apr 20 21:28 ..
-rw-r--r-- 1 root root   34 apr  8 11:44 config-x86_64-pc-linux-gnu
lrwxrwxrwx 1 root root   25 apr  8 11:44 .NATIVE -> x86_64-pc-linux-gnu-4.3.2
-rw-r--r-- 1 root root  285 apr  8 11:43 x86_64-pc-linux-gnu-4.3.2

Comment 6 George Shapovalov (RETIRED) gentoo-dev 2009-04-25 15:35:29 UTC
Sorry about missing virtual/gnat-4.3, my omission, fixed. However you should not use this virtual for generic Ada packages. Please use virtual/ada instead.

virtual/gnat is for the packages that extend compiler in some way or otherwise reference inner workings, such as asis or few "internal" libs (even those more often depend directly on a particular version range of gnat-gcc or gnat-gpl). "Outside" packages - generic Ada libs or programs - should not care about a particula r gcc backend version, only about Ada standard provided. This dependency info is kept via virtual/ada - there are essentially two versions at the moment, 1995 and 2005, reflecting the available Ada standards. Please use that virtual, unless absolutely necessary. virtual/gnat is, in a way, deprecated and may even be removed if it finds no use for extended period of time..

As for virtual/gnat being "unstable" (we prefer the term "testing ")), the standard answer is that nobody bothered to request its stabilization, so I did not pester our arch team with an official request to stabilize. However, in view of what I described above, this particular package is unlikely to need stabilization atm or any time soon. If you want virtual/ada stabilized, just let me know. Actually, I'll open the stabilization request anyway, as there are multiple gnat compiles stable for each of the SLOTs..

Comment 7 George Shapovalov (RETIRED) gentoo-dev 2009-04-25 16:04:24 UTC
The compile problem you report has nothing to do with virtuals and the above discussion. The problem is -march=native. In short, to compile gnat you need an ada compiler on the systems and it is provided via a bootstrap compiler that is pulled in and used for the 1st pass of compilation. This bootstrap compiler is 4.1, so you will need to provide -march that that version would recognize. I could filter out -march=native in eclass, but that would completely eliminate -march argument, as there is no info on which to base an informed decision about -march downgrade and this is clearly not what user intended. An easier and better solution is to update the bootstrap, which I will do now soon (it was planned for the time when gcc-4.4 gets released which, incidentally, just happened to happen :)). See bug #231769, comments 13 and 14 for some more detail..

I'll close this bug as invalid (this seems to be the closest approximation of a real reason). Simply set some sensible -march option in command line to build gnat. Your newly compiled gnat will happily accept -march=native or core2 or whatever is legal and necessary for 4.3 and there will be very little difference in the generated gnat itself and no for the gnat-generated code..
Comment 8 Erik Quaeghebeur 2009-04-27 21:32:10 UTC
(In reply to comment #7)
> The compile problem you report has nothing to do with virtuals and the above
> discussion. The problem is -march=native.

Indeed; managed to compile. Thanks
Comment 9 George Shapovalov (RETIRED) gentoo-dev 2009-06-04 14:10:26 UTC
*** Bug 272611 has been marked as a duplicate of this bug. ***