ncurses 5.6-r2 fails to build with gnat-gcc installed.
gnat-gcc and gcc have the same version number 4.2
FEATURES="-ccache" and MAKEOPTS="-j1" doesn't change the problem.
I've never seen this with former versions of ncurses although gnat-gcc was already installed:
gnatbind -aO./ -aO/data1/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/Ada95/samples -aO../src -aO/data1/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/Ada95/samples/../src -I- -x tour.ali
fatal error: file terminal_interface-curses.ali is incorrectly formatted
make sure you are using consistent versions of gcc/gnatbind
gnatmake: *** bind failed.
make: *** [tour] Error 4
make: Leaving directory `/data1/portage/sys-libs/ncurses-5.6-r2/work/narrowc/Ada95/samples'
make: *** [all] Error 2
make: Leaving directory `/data1/portage/sys-libs/ncurses-5.6-r2/work/narrowc/Ada95'
make: *** [all] Error 2
Portage 2.1.3_rc7 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.5-r4, 2.6.20-g
System uname: 2.6.20-gentoo-r8-galenos x86_64 AMD Athlon(tm) 64 X2 Dual Core Pro
Gentoo Base System release 1.12.10
Timestamp of tree: Mon, 09 Jul 2007 06:50:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.33-r1
sys-devel/autoconf: 2.13, 2.61-r1
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
CFLAGS="-O2 -pipe -march=athlon64 -msse3"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shu
tdown /usr/lib/X11/xdm /usr/lib/fax /usr/share/X11/xkb /usr/share/config /var/bi
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php
5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/r
evdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=athlon64 -msse3"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms stri
ia.de http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://mirrors.
ors/gentoo/ http://gentoo.ynet.sk/pub http://ftp.belnet.be/mirror/rsync.gentoo.o
rg/gentoo/ http://mirror.switch.ch/ftp/mirror/gentoo/ http://ftp.snt.utwente.nl/
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/di
stfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
USE="X Xaw3d a52 aac aalib acl acpi alsa amd64 ansi apache2 apm arts athena audi
ofile bash-completion bcmath berkdb bitmap-fonts blas bzip2 cairo calendar caps
cblas ccache cdparanoia cdr cdrom cgi chroot cli clisp cpudetection cracklib cry
pt css ctype cups curl cyrus dbm dbus dga directfb doc dri dv dvb dvd dvdr dvdre
ad encode eolconv exif expat fbcon ffmpeg fftw firefox flac font-server foomatic
db fortran ftp garmin gb gd gdbm gif glitz glut gnome gnutls gocr gphoto2 gpm gp
s gs gstreamer gtk guile hal iconv idn imagemagick imlib ipppd ipv6 isdnlog java
maildir matroska matrox mbox mcal mhash midi mikmod mime mmx mozcalendar mozilla
mp3 mpeg mudflap mule musicbrainz mysql ncurses nis nls nptl nptlonly nsplugin
numeric offensive ogg on-the-fly-crypt opengl openmp pam pango pcre pdf perl php
png portaudio posix pppd python qt3 qt4 quicktime readline reflection samba sas
l scanner sdl session slang sndfile sockets socks5 sound sox speedo speex spl ss
e sse2 ssl statistics svg syslog sysvpc tcltk tcpd theora threads tiff tk truety
pe truetype-fonts type1-fonts unicode urandom usb userlocales vim vim-pager vim-
syntax vim-with-x vorbis wireshark wmp xfs xim xine xml xorg xosd xpm xterm xv x
vid zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dsha
re dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mula
w multi null plug rate route share shm softvol" ELIBC="glibc" FRITZCAPI_CARDS="f
cpci" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz c
fontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" USERLAND
="GNU" VIDEO_CARDS="mga fbdev vesa"
Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTA
GE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
does 5.6-r1 work for you ?
Yes, it does
I have a different gnat related problem. I've just hacked the ebuild to have an
ada use flag. All of the errors were from running USE="ada" emerge ncurses
gnatgcc -c -I./ -I/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/Ada95/samples -I../src -I/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/Ada95/samples/../src -O3 -gnatpn -gnatg -I/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/Ada95/samples -I- /var/tmp/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/Ada95/samples/sample-helpers.adb
sample-helpers.adb:42:06: warning: redundant with clause in body
gnatmake: "/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/Ada95/samples/sample-helpers.adb" compilation error
make: *** [tour] Error 4
make: Leaving directory `/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/narrowc/Ada95/samples'
make: *** [all] Error 2
make: Leaving directory `/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/narrowc/Ada95'
make: *** [all] Error 2
* ERROR: sys-libs/ncurses-5.6-r2 failed.
* Call stack:
* ebuild.sh, line 1647: Called dyn_compile
* ebuild.sh, line 988: Called qa_call 'src_compile'
* ebuild.sh, line 44: Called src_compile
* ncurses-5.6-r2.ebuild, line 50: Called do_compile
* ncurses-5.6-r2.ebuild, line 103: Called die
* make failed
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/sys-libs/ncurses-5.6-r2/temp/build.log'.
* This ebuild is from an overlay: '/usr/local/portage/'
gnatgcc -c -I/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/Ada95/src/ -O3 -gnatpn -gnatg -I. -I/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/Ada95/src -I- /var/tmp/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/Ada95/src/terminal_interface-curses-mouse.adb
terminal_interface-curses-mouse.adb:42:06: warning: redundant with clause in body
gnatmake: "/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/Ada95/src/terminal_interface-curses-mouse.adb" compilation error
make: *** [terminal_interface-curses-mouse.o] Error 4
make: Leaving directory `/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/narrowc/Ada95/src'
make: Entering directory `/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/narrowc/Ada95/samples'
I find this kind of odd, since it first fails to compile something (and it looks
like a minor error), then make continues to compile other directories, rather than immediately dying
There is another problem with the current ebuild. CFLAGS isn't filtered when
USE="profile". The ebuild becomes very sad when there's both -gp and -fomit-frame-pointer.
Sorry, did not have much time to look into that (and quite unlikely that I will before the next week). Just a few quick questions for now:
does this happen only with gnat-gcc-4.2.0 or also with gnat-gcc-4.1.2 or gnat-gpl-184.108.40.2067 or any other gnat? Looks like I got ncurses sucsessfully updated here, as the new version was pulled in. However I had the gnat-gpl-4.1 profile active at the moment..
>fatal error: file terminal_interface-curses.ali is incorrectly formatted
>make sure you are using consistent versions of gcc/gnatbind
Hm, strange. Normally formatting errors are caused by new versions employing stricter checks (and it is common for Ada libs to be built with "treat all warnings as errors" switch on (which one is that, -gnatwe? don't remember atm)). However here it complains about an ali file which, normally, it should have generated itself just a short while before. My guess is that it tries to use some preexisting file and so there may be an easy fix. Or, well, any chance you are trying to rebuild ncurses over some old attempt and portage somehow did not clear the dir?
I'll try to look into this, however as I said, likely next week only. Will be on the move for the most part before that..
(In reply to comment #4)
> does this happen only with gnat-gcc-4.2.0 or also with gnat-gcc-4.1.2 or
> gnat-gpl-220.127.116.117 or any other gnat?
Sorry but I cannot test this here because gnat-gcc-4.2.0 was the first version I installed and I wouldn't like to downgrade for other reasons.
> Or, well, any chance you are trying to rebuild ncurses over some old attempt and portage somehow did not clear the dir?
I got the same failure after I had completely removed (at least I hope I did so ...) and reinstalled all ncurses-related files in portage
a bunch of configure flags were added ... i would take 5.6-r1 and add one flag at a time from 5.6-r2 until you can narrow down the ones that cause this
Created attachment 125060 [details, diff]
Here is a fix for this problem. It is caused by the --enable-warnings flag as GNAT is a bit picky when it comes to warnings so I added an "ada" use flag.
For some reason $(use_enable !ada warnings) didn't work properly, as --disable-warnings still enabled the problem for some reason, so I used a local variable instead.
Please review and test.
Works perfectly. Thanks.
> Created an attachment (id=125060) 
> ebuild patch
> Please review and test.
*** Bug 186295 has been marked as a duplicate of this bug. ***
Created attachment 126403 [details]
ncurses ebuild with full gnat/ada support
I had an issue updating an amd64 box today, so here's the complete multilib-enabled version with enhancements.
Created attachment 126404 [details]
adacurses-config file required for the above ebuild.
ive fixed --disable-warnings and made the warnings option conditional based on USE=ada
I just hit the exact same error (again) as the original reporter when upgrading a (relatively) new install from 5.7-r2 to 5.7-r3. Yes, I have the the correct (latest) versions of gnat-gcc and gnat-gpl:
~ $ equery l gnat
[ Searching for package 'gnat' in all categories among: ]
* installed packages
[I--] [ ~] app-admin/eselect-gnat-1.4-r1 (0)
[I--] [ ~] dev-lang/gnat-gcc-4.3.3 (4.3)
[I--] [ ~] dev-lang/gnat-gpl-18.104.22.1688-r1 (4.1-2008)
~ $ eselect gnat list
Available gnat compilers:
 x86_64-pc-linux-gnu-gnat-gcc-4.3 *
 adadoc *
 xmlada *
I guess I'm not quite sure how ncurses is supposed to build correctly without the right config info, and it apparently doesn't actually install the Ada libs without some manual help. Also, it seems like there should be some appropriate DEPEND, so I've also added a dep on virtual/ada to the attached ebuild. Unless you have a better/cleaner way to do this, ncurses seems to require some additional help for USE=ada to work correctly. Thanks...
Created attachment 211648 [details]
Updated ebuild with working Ada support
It's pretty much brute-force, so I'd be interested if there's a more elegant way to do this...
see Bug 167849
also, you know you're supposed to post *diffs*, not entire ebuilds. i'm not going to look at whole files.
Created attachment 211656 [details, diff]
diff of updated ebuild with working ada support
Here you go...
The config script is now installed by the package, and looks to be the same one I originally attached to this bug. I guess I'm missing something; can you point me to the updated script mentioned in comments 19 and 20 of Bug 167849?
Well, the config-scripts were partly based on that, but
also on Juergen's older script. Then of course, in parameterizing
things, it evolved somewhat. (The installed script should look
much like your attachment ;-).
can we get a refresh on this w/ncurses-6.0 ? i'm not a fan of hardcoding random paths in the configure stage like this patch requires ...