Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 184700

Summary: sys-libs/ncurses: improve ada support
Product: Gentoo Linux Reporter: Matthias M Weber <mmw>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: CONFIRMED ---    
Severity: normal CC: ada, dickey, esigra, hiyuh.root, marty.rosenberg
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: ebuild patch
ncurses ebuild with full gnat/ada support
ncurses-5.6-adacurses-config
Updated ebuild with working Ada support
diff of updated ebuild with working ada support

Description Matthias M Weber 2007-07-09 08:13:57 UTC
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
1.   
     |
gnatmake: *** bind failed.
make[2]: *** [tour] Error 4
make[2]: Leaving directory `/data1/portage/sys-libs/ncurses-5.6-r2/work/narrowc/Ada95/samples'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/data1/portage/sys-libs/ncurses-5.6-r2/work/narrowc/Ada95'
make: *** [all] Error 2


Reproducible: Always




Portage 2.1.3_rc7 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.5-r4, 2.6.20-g
entoo-r8-galenos x86_64)
=================================================================
System uname: 2.6.20-gentoo-r8-galenos x86_64 AMD Athlon(tm) 64 X2 Dual Core Pro
cessor 4200+
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
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.18.1
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
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=athlon64 -msse3"
CHOST="x86_64-pc-linux-gnu"
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
nd /var/spool/fax/etc"
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"
DISTDIR="/data1/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms stri
ct unmerge-orphans"
GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo/ http://gentoo.intergen
ia.de http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://mirrors.
sec.informatik.tu-darmstadt.de/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirr
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/
pub/os/linux/gentoo/"
LINGUAS="en de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
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-*"
PORTAGE_TMPDIR="/data1"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=" "
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
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
 javascript jpeg kde leim libcaca libg++ libgda libwww lm_sensors logrotate mad 
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
Comment 1 SpanKY gentoo-dev 2007-07-09 20:08:59 UTC
does 5.6-r1 work for you ?
Comment 2 Matthias M Weber 2007-07-09 20:40:12 UTC
Yes, it does

Comment 3 marty rosenberg 2007-07-10 10:07:46 UTC
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[2]: *** [tour] Error 4
make[2]: Leaving directory `/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/narrowc/Ada95/samples'
make[1]: *** [all] Error 2
make[1]: 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[2]: *** [terminal_interface-curses-mouse.o] Error 4
make[2]: Leaving directory `/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/narrowc/Ada95/src'
make[2]: 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.
Comment 4 George Shapovalov (RETIRED) gentoo-dev 2007-07-10 21:15:03 UTC
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-4.1.3.2007 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..

George
Comment 5 Matthias M Weber 2007-07-10 21:33:18 UTC
(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-4.1.3.2007 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

Matthias
Comment 6 SpanKY gentoo-dev 2007-07-10 22:25:56 UTC
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
Comment 7 David Holm (RETIRED) gentoo-dev 2007-07-16 18:12:14 UTC
Created attachment 125060 [details, diff]
ebuild patch

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.
Comment 8 Matthias M Weber 2007-07-17 17:05:18 UTC
Works perfectly. Thanks.

> Created an attachment (id=125060) [edit]
> ebuild patch
> 
> Please review and test.


Comment 9 Jakub Moc (RETIRED) gentoo-dev 2007-07-23 05:57:18 UTC
*** Bug 186295 has been marked as a duplicate of this bug. ***
Comment 10 Steve Arnold archtester gentoo-dev 2007-07-30 00:00:53 UTC
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.
Comment 11 Steve Arnold archtester gentoo-dev 2007-07-30 00:03:01 UTC
Created attachment 126404 [details]
ncurses-5.6-adacurses-config

adacurses-config file required for the above ebuild.
Comment 12 SpanKY gentoo-dev 2007-08-25 17:13:33 UTC
ive fixed --disable-warnings and made the warnings option conditional based on USE=ada
Comment 13 Steve Arnold archtester gentoo-dev 2009-12-01 03:18:26 UTC
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-4.1.3.2008-r1 (4.1-2008)

 ~ $ eselect gnat list
Available gnat compilers:
  [1]   x86_64-pc-linux-gnu-gnat-gcc-4.3 *
  [2]   x86_64-pc-linux-gnu-gnat-gpl-4.1-2008
Installed libs:
  [1]   adadoc *
  [2]   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...
Comment 14 Steve Arnold archtester gentoo-dev 2009-12-01 03:33:39 UTC
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...
Comment 15 SpanKY gentoo-dev 2009-12-01 05:07:04 UTC
see Bug 167849

also, you know you're supposed to post *diffs*, not entire ebuilds.  i'm not going to look at whole files.
Comment 16 Steve Arnold archtester gentoo-dev 2009-12-01 05:39:53 UTC
Created attachment 211656 [details, diff]
diff of updated ebuild with working ada support

Here you go...
Comment 17 Steve Arnold archtester gentoo-dev 2009-12-01 05:43:19 UTC
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?
Comment 18 Thomas Dickey 2009-12-22 10:12:21 UTC
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 ;-).
Comment 19 SpanKY gentoo-dev 2015-08-12 08:36:14 UTC
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 ...