[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: #839209 gnatgcc: wrong symlink may result ABI mix in same object



Source: gcc-6
Package: gnat-6
Version: 6.3.0-4
Followup-For: Bug #839209

Hello.

gcc Depends: gcc-6, and they provide the following /usr/bin symlinks.
  gcc    :      gcc    ->      gcc-6
  gcc    : ARCH-gcc    ->      gcc-6
  gcc-6  :      gcc-6  -> ARCH-gcc-6
For gnat-6 (the gnat package has a different role than the gcc package):
  gnat-6 :      gnat   ->      gnat-6
  gnat-6 : ARCH-gnat   -> ARCH-gnat-6
  gnat-6 :      gnat-6 -> ARCH-gnat-6

By the way, the comparison suggests that
  gcc    : ARCH-gcc    -> ARCH-gcc-6
would probably be more consistent than
  gcc    : ARCH-gcc    -> gcc-6 -> ARCH-gcc-6
I may check other compilers and report a separate wishlist bug if this
seams a good idea.

The gnat-6 package also provides a gnatgcc symlink, so that gnat-6 may
coexist with a more recent default gcc, say gcc(=7).
Code produced by /usr/bin/gnat->gnat-6 can be mixed with code sharing
the same ABI, from /usr/bin/gnatgcc->gcc-6, but not from the default C
compiler /usr/bin/gcc->gcc-7.
As a consequence,
- /usr/bin/(ARCH-)?gnatgcc-6 symlinks would be of no use.
  If the right version is known, (ARCH-)?gcc-6 can be called directly.
- gnat-6 Depends: gcc-6, but has no reason to Depend: gcc.
  Users of gnat-6 may have good reasons not to install gcc-7.

Currently,
  gnat-6 : ARCH-gnatgcc -> ARCH-gcc-6
  gnat-6 :      gnatgcc -> ARCH-gcc
The latter symlink is broken when the gcc package is not installed,
and worst, may refer to the wrong ABI when it is.
Letting /usr/bin/gnatgcc target ARCH-gcc-6 probably solves the issue.

This bug causes no FTBFS because gcc is listed in build-essential, but
source packages mixing Ada and C sources will silently start to
produce faulty binary packages when gcc-7 becomes the default.  Most
Ada autopkgtests already fail because gprbuild relies on gnatgcc to
detect an Ada compiler (see #838483).
This justifies a "serious" severity in my opinion.


Reply to: