Got this while trying to merge app-text/manpager to try out colorized manpage output on my amd64 Linux machine. I highly suspect it's got something to do with the hardened setup I am running on that box, but I am not finding any recent hits on Google to confirm that. This same setup compiles fine on mips, which doesn't use hardened. SHORT BUILD OUTPUT: CCLD accessdb CCLD whatis CCLD lexgrog CCLD mandb CCLD man /usr/lib/gcc/x86_64-pc-linux-gnu/5.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status Makefile:1841: recipe for target 'whatis' failed make[3]: *** [whatis] Error 1 make[3]: *** Waiting for unfinished jobs.... make[3]: Leaving directory '/ramfs/portage/sys-apps/man-db-2.7.2-r1/work/man-db-2.7.2/src' Makefile:1915: recipe for target 'all-recursive' failed make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory '/ramfs/portage/sys-apps/man-db-2.7.2-r1/work/man-db-2.7.2/src' Makefile:1521: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/ramfs/portage/sys-apps/man-db-2.7.2-r1/work/man-db-2.7.2' Makefile:1449: recipe for target 'all' failed make: *** [all] Error 2 * ERROR: sys-apps/man-db-2.7.2-r1::gentoo failed (compile phase): * emake failed # emerge -pqv '=sys-apps/man-db-2.7.2-r1::gentoo' [ebuild N ] sys-apps/man-db-2.7.2-r1 USE="berkdb gdbm manpager zlib -nls (-selinux) -static-libs" [uninstall ] sys-apps/man-1.6g-r1 USE="lzma -nls (-selinux)" [blocks b ] sys-apps/man-db ("sys-apps/man-db" is blocking sys-apps/man-1.6g-r1) [blocks b ] sys-apps/man ("sys-apps/man" is blocking sys-apps/man-db-2.7.2-r1)
Created attachment 411220 [details] emerge --info
Created attachment 411222 [details] build.log
your compiler settings are pretty over the top. please scale them back to simple ones first and see if it still fails.
It looks like this bug needs to be linked to the tracking bug for LTO. My CFLAGS are the way they are due to using both LTO and Graphite, so I tested disabling LTO for just man-db via package.env, and it compiles fine. Add LTO back, it fails. I should've tried that initially, but LTO-related errors are usually more obvious, such as a given symbol missing from a given object file, so it didn't appear to be LTO-related.