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

Bug 526686

Summary: sys-devel/gcc: only gcc/doc/ info pages are installed from gcc/ which misses gfortran
Product: Gentoo Linux Reporter: Dirk Sondermann <ds-gentoo>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal CC: arsen, ds-gentoo, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=464008
Whiteboard:
Package list:
Runtime testing required: ---

Description Dirk Sondermann 2014-10-24 22:18:16 UTC
When gcc-4.7.3-r1 is installed with the fortran USE flag set the gfortran info file (gfortran.info.bz2) is not installed together with the other info files (for example, gcc.info.bz2) in /usr/share/gcc-data/i686-pc-linux-gnu/4.7.3/info.

The reason seems to be that the following fragment of toolchain_src_install in /usr/portage/eclass/toolchain.eclass considers only info files in gcc/doc while gfortran.info is located in gcc/fortran:

  # Copy over the info pages.  We disabled their generation
  # earlier, but the build system only expects to install out
  # of the build dir, not the source.  #464008
  mkdir -p gcc/doc
  local x=
  for x in "${S}"/gcc/doc/*.info* ; do
          if [[ -f ${x} ]] ; then
                  cp "${x}" gcc/doc/ || die
          fi
  done

As a local workaround, I'm using the following function in /etc/portage/env/sys-devel/gcc:

  src_prepare() {
    toolchain_src_prepare
    if use fortran; then
      cp gcc/fortran/*.info gcc/doc
    fi
  }
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2020-02-01 23:38:19 UTC
Also worth considering other docs:

  gcc-9.2.0/libitm/libitm.info
  gcc-9.2.0/gcc/fortran/gfortran.info

  gcc-9.2.0/gcc/doc/gccinstall.info
  gcc-9.2.0/gcc/doc/gccint.info
  gcc-9.2.0/gcc/doc/gcc.info
  gcc-9.2.0/gcc/doc/cppinternals.info
  gcc-9.2.0/gcc/doc/cpp.info

  gcc-9.2.0/libgomp/libgomp.info
  gcc-9.2.0/libquadmath/libquadmath.info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-10 05:05:25 UTC
It looks like Fortran is the only thing which isn't actually being installed.

# ls /usr/share/gcc-data/x86_64-pc-linux-gnu/9.5.0/info
cpp.info  cppinternals.info  gcc.info  gccinstall.info  gccint.info  libgomp.info  libitm.info  libquadmath.info
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-21 17:18:19 UTC
arsen, can you take a look?
Comment 4 Arsen Arsenović gentoo-dev 2024-07-30 21:02:40 UTC
~$ ls /usr/share/gcc-data/x86_64-pc-linux-gnu/14/info/
cpp.info           dir         gcc.info         gccint.info  gfortran.info  gnat-style.info  libgccjit.info  libitm.info
cppinternals.info  gccgo.info  gccinstall.info  gdc.info     gnat_rm.info   gnat_ugn.info    libgomp.info    libquadmath.info
~$ 
seems to have fixed itself in the interim
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-30 21:22:29 UTC
Ah, it must have been:

commit 69a74089aee8eee85bedf0a80b1124db9abc1a6b
Author: Sam James <sam@gentoo.org>
Date:   Mon May 8 16:48:15 2023 +0100

    toolchain.eclass: cleanup obsolete texinfo hacks

    These don't seem to be necessary at all now:
    - we don't sed info pages anymore because GCC has support for setting
    the bug URL + distributor now
    - there's info pages in other directories than gcc/ (e.g. libgccjit)

    With 12.3.0, I had without this:
    ```
    * CMP: =sys-devel/gcc-12.2.1_p20230505 with sys-devel/gcc-12.3.0/image
    *  FILES:-usr/share/gcc-data/x86_64-pc-linux-gnu/12/info/gfortran.info
    *  FILES:-usr/share/gcc-data/x86_64-pc-linux-gnu/12/info/libgccjit.info
    * ------> FILES(-2) ABI(TIMEOUT)
    ```

    Signed-off-by: Sam James <sam@gentoo.org>

Thanks!