Description of problem: After installation of package gcc-c++ under /usr/lib/gcc/x86_64-redhat-linux/8/32 there are broken symlinks Version-Release number of selected component (if applicable): gcc-c++-8.3.1-4.5.el8.x86_64 How reproducible: Steps to Reproduce: 1. Install a RHEL 8.1 machine 2. Install gcc-c++ 3. list content of /usr/lib/gcc/x86_64-redhat-linux/8/32 Actual results: The symlinks are all broken: # ls -l /usr/lib/gcc/x86_64-redhat-linux/8/32 total 3832 -rw-r--r--. 1 root root 2552 Jul 16 22:31 crtbegin.o -rw-r--r--. 1 root root 2684 Jul 16 22:31 crtbeginS.o -rw-r--r--. 1 root root 2932 Jul 16 22:31 crtbeginT.o -rw-r--r--. 1 root root 1124 Jul 16 22:31 crtend.o -rw-r--r--. 1 root root 1124 Jul 16 22:31 crtendS.o -rw-r--r--. 1 root root 6440 Jul 16 22:31 crtfastmath.o -rw-r--r--. 1 root root 1152 Jul 16 22:31 crtoffloadbegin.o -rw-r--r--. 1 root root 1148 Jul 16 22:31 crtoffloadend.o -rw-r--r--. 1 root root 1268 Jul 16 22:31 crtoffloadtable.o -rw-r--r--. 1 root root 2972 Jul 16 22:31 crtprec32.o -rw-r--r--. 1 root root 2980 Jul 16 22:31 crtprec64.o -rw-r--r--. 1 root root 2972 Jul 16 22:31 crtprec80.o lrwxrwxrwx. 1 root root 38 Jul 16 22:31 libasan.a -> ../../../i686-redhat-linux/8/libasan.a -rw-r--r--. 1 root root 13420 Jul 16 22:31 libasan_preinit.o -rw-r--r--. 1 root root 36 Jul 16 22:31 libasan.so lrwxrwxrwx. 1 root root 40 Jul 16 22:31 libatomic.a -> ../../../i686-redhat-linux/8/libatomic.a -rw-r--r--. 1 root root 38 Jul 16 22:31 libatomic.so -rw-r--r--. 1 root root 3324634 Jul 16 22:34 libgcc.a -rw-r--r--. 1 root root 49396 Jul 16 22:34 libgcc_eh.a -rw-r--r--. 1 root root 191 Jul 16 22:31 libgcc_s.so -rw-r--r--. 1 root root 67306 Jul 16 22:34 libgcov.a -rw-r--r--. 1 root root 379162 Jul 16 22:34 libgomp.a lrwxrwxrwx. 1 root root 28 Jul 16 22:31 libgomp.so -> ../../../../libgomp.so.1.0.0 lrwxrwxrwx. 1 root root 37 Jul 16 22:31 libitm.a -> ../../../i686-redhat-linux/8/libitm.a -rw-r--r--. 1 root root 35 Jul 16 22:31 libitm.so lrwxrwxrwx. 1 root root 42 Jul 16 22:31 libquadmath.a -> ../../../i686-redhat-linux/8/libquadmath.a -rw-r--r--. 1 root root 40 Jul 16 22:31 libquadmath.so lrwxrwxrwx. 1 root root 40 Jul 16 22:31 libstdc++.a -> ../../../i686-redhat-linux/8/libstdc++.a lrwxrwxrwx. 1 root root 42 Jul 16 22:31 libstdc++fs.a -> ../../../i686-redhat-linux/8/libstdc++fs.a lrwxrwxrwx. 1 root root 31 Jul 16 22:31 libstdc++.so -> ../../../../libstdc++.so.6.0.25 lrwxrwxrwx. 1 root root 40 Jul 16 22:31 libsupc++.a -> ../../../i686-redhat-linux/8/libsupc++.a lrwxrwxrwx. 1 root root 39 Jul 16 22:31 libubsan.a -> ../../../i686-redhat-linux/8/libubsan.a -rw-r--r--. 1 root root 37 Jul 16 22:31 libubsan.so Expected results: no broken symlinks on installation of gcc-c++ Additional info: several of those symlinks can be satisfied installing further packages: - libstdc++-devel.i686 (repo rhel-8-for-x86_64-appstream-rpms) - libstdc++-static.i686 (repo codeready-builder-for-rhel-8-x86_64-rpms) - libatomic-static.i686 (repo rhel-8-for-x86_64-appstream-rpms) - libgomp.i686 (repo rhel-8-for-x86_64-appstream-rpms) but the following links remains broken: lrwxrwxrwx. 1 root root 38 Jul 16 22:31 libasan.a -> ../../../i686-redhat-linux/8/libasan.a lrwxrwxrwx. 1 root root 37 Jul 16 22:31 libitm.a -> ../../../i686-redhat-linux/8/libitm.a lrwxrwxrwx. 1 root root 42 Jul 16 22:31 libquadmath.a -> ../../../i686-redhat-linux/8/libquadmath.a lrwxrwxrwx. 1 root root 39 Jul 16 22:31 libubsan.a -> ../../../i686-redhat-linux/8/libubsan.a
This is completely intentional, the gcc.x86_64 etc. packages must not force installation of *.i686 packages, and the symlinks will be satisfied if the corresponding *.i686 packages are installed, if not, the compiler will simply support -m64 only or -m32 only for compilation that doesn't need those. For libasan.a, you can install libasan-static.i686, for libitm.a libitm-static.i686, for libquadmath.a libquadmath-static.i686, for libubsan.a libubsan-static.i686.
With weak and rich dependencies we could perhaps improve the situation somewhat, e.g. recommend installation of the i686 packages if glibc-devel.i686 or glibc.i686 is installed. Recommends: instead of Requires: means that the user can remove the packages again, and they will only get them if there are already some 32-bit multilibs. It looks like something that could we try in Fedora.
(In reply to Jakub Jelinek from comment #1) > This is completely intentional, the gcc.x86_64 etc. packages must not force > installation of *.i686 packages, and the symlinks will be satisfied if the > corresponding *.i686 packages are installed, if not, the compiler will > simply support -m64 only or -m32 only for compilation that doesn't need > those. I understand, and I definitely agree that forcing i686 packages installation would be a bad idea. Just my 2c here, as I might miss apiece, but wouldn't be cleaner if the symlinks were created upon installation of the relevant i686 packages ? My customer, who is indeed building 32bits applications, noticing the broken links did not have a good impression. > For libasan.a, you can install libasan-static.i686, for libitm.a > libitm-static.i686, for libquadmath.a libquadmath-static.i686, for > libubsan.a libubsan-static.i686. I had a quick check again, but I could not find those packages in any RHEL8 related repository. These are available for RHEL7 libasan-static.i686 libitm-static.i686 libquadmath-static.i686 while I could not find libubsan-static.i686 anywhere
> wouldn't be cleaner if the symlinks were created upon installation of the relevant i686 packages ? Can we get a response on this? Some i686 packages are missing from RHEL 8 repositories for which there are still broken links. Should this not be addressed?
libubsan-static is provided via devtoolset-9-libubsan-devel on RHEL 7. We build libasan-static.i686 libitm-static.i686 libquadmath-static.i686 libubsan-static.i686 for RHEL 8 too, they just are not available in BaseOS or AppStream or CRB for some reason.
Thanks Marek. I have raised a request for these packages to be added to RHEL 8 repos.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (gcc bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:1571