Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937774 - dev-lang/gnat-gpl-2021-r5[-cxx] won't build ada support
Summary: dev-lang/gnat-gpl-2021-r5[-cxx] won't build ada support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal minor
Assignee: Gentoo Linux ADA team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-11 18:22 UTC by JohnLM
Modified: 2024-10-15 21:59 UTC (History)
2 users (show)

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


Attachments
files list installed by the package (equery_files_gnat-gpl.txt,112.52 KB, text/plain)
2024-08-11 18:25 UTC, JohnLM
Details

Note You need to log in before you can comment on or make changes to this bug.
Description JohnLM 2024-08-11 18:22:58 UTC
I have dev-lang/gnat-gpl-2021-r5[bootstrap] emerged, but it seems to provide no Ada support, i.e., no gnatmake or other gnat* binaries. I have already tried re-emerging gnat-gpl a couple times and while it emerges sucessfully, situation doesn't change.

Reproducible: Always

Steps to Reproduce:
1. emerge dev-lang/gnat-gpl-2021-r5

Actual Results:  
No gnatmake

Expected Results:  
gnatmake present

# emerge --info gnat-gpl
Portage 3.0.65 (python 3.12.3-final-0, default/linux/amd64/23.0/systemd, gcc-10, glibc-2.39-r6, 6.6.38-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.6.38-gentoo-x86_64-AMD_Phenom-tm-_9950_Quad-Core_Processor-with-glibc2.39
KiB Mem:     8149180 total,   2695316 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Sun, 11 Aug 2024 17:15:00 +0000
Head commit of repository gentoo: fde2530dd0eeef27b8e61a97a975c73bd6a55bef
Head commit of repository esteid: 8d0d789bb69d9ff08fad5aa62a9423613f1d3f63

Head commit of repository java: 13cc3ab16bce19245c818cbb10a0925614d53061

Head commit of repository mv: 8ef8abbbe4f281a9527f8cb5382808a0b2234699

Head commit of repository johnlm-overlay: 83418a1173ec747ac571b6db3e469748cadd29b5

sh bash 5.2_p26-r6
ld GNU ld (Gentoo 2.42 p3) 2.42.0
distcc 3.4 x86_64-pc-linux-gnu [disabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26-r6::gentoo
dev-build/autoconf:        2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.28.5::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.4.1::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.38.2-r3::gentoo
dev-lang/python:           2.7.18_p16-r2::gentoo, 3.10.14_p1-r1::gentoo, 3.12.3-r1::gentoo
dev-lang/rust:             1.79.0::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-apps/systemd:          255.7-r1::gentoo
sys-devel/binutils:        2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.6::gentoo, 18.1.8::gentoo
sys-devel/gcc:             13.3.1_p20240614::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             17.0.6::gentoo, 18.1.8::gentoo
sys-devel/llvm:            17.0.6::gentoo, 18.1.8-r1::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r6::gentoo
Repositories:

cross-portage
    location: /usr/local/portage-crossdev
    masters: gentoo
    priority: 10
    volatile: True

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: 25
    volatile: True
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 3

esteid
    location: /var/lib/layman/esteid
    sync-type: git
    sync-uri: https://github.com/open-eid/gentoo.git
    masters: gentoo
    priority: 50
    volatile: True

java
    location: /var/lib/layman/java
    sync-type: git
    sync-uri: git://anongit.gentoo.org/proj/java.git
    masters: gentoo
    priority: 50
    volatile: True

mv
    location: /var/lib/layman/mv
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/user/mv.git
    masters: gentoo
    priority: 50
    volatile: True

johnlm-overlay
    location: /var/lib/layman/johnlm-overlay
    sync-type: git
    sync-uri: file:///home/johnlm/src/johnlm-overlay.git
    masters: gentoo
    priority: 60
    volatile: True

local-overlay
    location: /usr/local/portage
    masters: gentoo
    priority: 95
    volatile: True

Installed sets: @archivers, @major-bdeps
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=barcelona -mcx16 -fomit-frame-pointer -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=barcelona -mcx16 -fomit-frame-pointer -O2 -pipe"
DISTDIR="/mnt/megadisk/system/tmp/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=n --verbose-conflicts"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news noinfo nostrip parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="en en_GB lv"
MAKEOPTS="-j4"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="3dnow 3dnowext X a52 acl acpi amd64 bash-completion branding bzip2 cairo cet crypt css dbus dri dts evdev exif ffmpeg flac fontconfig g3dvl gallium gdbm gmp gnome gnome-keyring gstreamer gtk gtk3 gtkstyle gzip iconv jpeg kpathsea libnotify libtirpc mad matroska mmx mmxext mp3 multilib ncurses nls ogg openexr opengl openmp opus oss oss4 pam pcre png policykit qt3support readline seccomp smp sndfile sse sse2 sse3 sse4a ssl svg systemd test-rust threads tiff truetype udev unicode vdpau vorbis x264 xa xattr xcb xcomposite xinerama xml xv xvid xvmc zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" CAMERAS="ptp2 kodak_ez200" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en en-GB lv" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12 python3_10" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

dev-lang/gnat-gpl-2021-r5::gentoo was built with the following:
USE="ada bootstrap cet multilib nls openmp pie sanitize ssp -cxx -d -debug -default-stack-clash-protection -default-znow -doc (-fixed-point) -fortran (-go) -graphite -hardened (-jit) -libssp (-lto) -modula2 -objc -objc++ -objc-gc (-pch) -pgo -rust -systemtap -test -vanilla -vtv -zstd" ABI_X86="(64)"
CFLAGS="-march=barcelona -pipe -O2"
CXXFLAGS="-march=barcelona -pipe -O2"
Comment 1 JohnLM 2024-08-11 18:25:06 UTC
Created attachment 899853 [details]
files list installed by the package

This is what files gnat-gpl has installed on my system, as determined by `equery files gnat-gpl`
Comment 2 Tupone Alfredo gentoo-dev 2024-08-12 18:47:36 UTC
Are you sure you enabled the ada use flag? Like
 
USE=ada emerge gnat-gpl?
Comment 3 JohnLM 2024-08-12 20:59:29 UTC
Yes, very sure. It's also shown in the emerge --info gnat-gpl output above (near bottom).

I checked a little more what the build is doing. It seems in configure step it configures just for `Languages: c` contrary to what USE-flags should instruct it to. No clue why though.
Comment 4 JohnLM 2024-08-12 21:04:56 UTC
OK, I went on a hunch and tried running

USE="cxx" ebuild /usr/portage/dev-lang/gnat-gpl/gnat-gpl-2021-r5.ebuild configure

and it suddenly gave me `Languages: c,c++,ada`. That might mean `ada` USE-flag requires `cxx` USE-flag.
Comment 5 Tupone Alfredo gentoo-dev 2024-08-13 06:27:17 UTC
Yes, cxx is also required to build ada. So ada is disabled when cxx is not enabled. I remember that a warning message saying that is sent with elog
Comment 6 Tupone Alfredo gentoo-dev 2024-08-13 07:38:27 UTC
well, no,

This is the check we do:

is_ada() {
    gcc-lang-supported ada || return 1
    _tc_use_if_iuse cxx && _tc_use_if_iuse ada
}       

Both cxx and ada USE flags should be enabled, and gcc should have support for ada
Comment 7 JohnLM 2024-08-13 15:18:43 UTC
OK, I located the relevant snippet in toolchain.eclass and see it now. The issue is that it did happen silently.

Maybe REQUIRED_USE="ada? (cxx)" for dev-lang/gnat-gpl at least?
Comment 8 Larry the Git Cow gentoo-dev 2024-09-29 00:18:56 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=799693623d76c89e8b04d2434d0dfece44bb49f9

commit 799693623d76c89e8b04d2434d0dfece44bb49f9
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-08-03 02:27:51 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-09-29 00:18:08 +0000

    toolchain.eclass: Ada rework
    
    Look hard for an existing GNAT for use for bootstrapping without requiring
    users to run `gcc-config` / switch their system copy of GCC, which is both
    brittle in that it requires manual intervention, and also unclean.
    
    Started looking at this after https://public-inbox.gentoo.org/gentoo-dev/2a700166-f01a-4807-bd76-7b0cce72af0b@archeia.com/
    although the approach is different. I did use it as a base although not
    much of it remains.
    
    We take the following approach:
    * Iterate over installed GCC slots (preferring ${SLOT}, then iterating
      from the latest version installed down to GCC 10) to find a copy of
      GNAT;
    
    * Create wrappers for gnat* to redirect calls when building GCC to
      our found bootstrap copy of GNAT;
    
    * Use an extracted spec file to redirect gnat1 calls to that bootstrap
      copy too, as the build system doesn't allow saying "just use this copy
      of gnat" (it always wants $(CC) to support it).
    
      The real nasty part here is that GCC's build system doesn't seem to have
      a way to point to 'ADACC' or similar (it looks like it did have 'ADAC' years ago).
    
    Remaining bits to be done:
    * Adapting/replacing/supplementing dev-lang/gnat-gpl with a version that
      can be installed in parallel to sys-devel/gcc:10 so it can be pulled
      in transparently for bootstrapping;
    
    * Build our own, or source some other copy (e.g. from Alire), of a newer
      bootstrap GNAT. https://github.com/alire-project/GNAT-FSF-builds is
      a likely candidate.
    
    I also hope that we can ultimately do the same for D.
    
    Bug: https://gcc.gnu.org/PR864
    Bug: https://gcc.gnu.org/PR108909
    Bug: https://bugs.gentoo.org/137268
    Bug: https://bugs.gentoo.org/547358
    Bug: https://bugs.gentoo.org/919667
    Closes: https://bugs.gentoo.org/937774
    Link: https://lists.fedorahosted.org/archives/list/epel-devel@lists.fedoraproject.org/thread/CVQ3JIOZI5ODYDZU2DZLA37JWSLMCIN7/
    Signed-off-by: Sam James <sam@gentoo.org>

 eclass/toolchain.eclass | 143 +++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 141 insertions(+), 2 deletions(-)
Comment 9 Larry the Git Cow gentoo-dev 2024-10-15 21:59:52 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df5ffe6c0a1bf8c25aa6cb774bf1525ff4557f6f

commit df5ffe6c0a1bf8c25aa6cb774bf1525ff4557f6f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-10-15 21:59:07 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-10-15 21:59:29 +0000

    profiles/base: force on dev-lang/gnat-gpl[cxx] too
    
    Without USE=cxx, it'll silently disable Ada support.
    
    Bug: https://bugs.gentoo.org/937774
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/base/package.use.force | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)