/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/nameslist.o: in function `uniNamesList_NamesListVersionAlt': /var/tmp/portage/media-libs/libuninameslist-20200413-r1/work/libuninameslist-20200413/nameslist.c:216: undefined reference to `uniNamesList_NamesListVersionFR' /usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/nameslist.o: in function `uniNamesList_nameAlt': /var/tmp/portage/media-libs/libuninameslist-20200413-r1/work/libuninameslist-20200413/nameslist.c:230: undefined reference to `uniNamesList_nameFR' /usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/nameslist.o: in function `uniNamesList_annotAlt': ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1_desktop_gnome_systemd-20210408-231233 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-10.3.0 * Python 3.8.8 timestamp(s) of HEAD at this tinderbox image: /var/db/repos/gentoo Fri Apr 9 01:49:59 UTC 2021 emerge -qpvO media-libs/libuninameslist [ebuild N ] media-libs/libuninameslist-20200413-r1
Created attachment 698790 [details] emerge-info.txt
Created attachment 698793 [details] emerge-history.txt
Created attachment 698796 [details] environment
Created attachment 698799 [details] etc.portage.tar.bz2
Created attachment 698802 [details] logs.tar.bz2
Created attachment 698805 [details] media-libs:libuninameslist-20200413-r1:20210409-021854.log
Created attachment 698808 [details] temp.tar.bz2
I can't reproduce this, only the other libuninamelist bug. https://bugs.gentoo.org/779670
media-libs/libuninameslist-20200413-r1 was marked stable for ppc64, but building fails with this error...
-O0 and -Og (my default) fail to build, while -O1 and -O2 seem to work. This suggests it's a bug in dead code that some -O1 optimisation hides by taking it out entirely.
This is caused by code like below: UN_DLL_LOCAL int uniNamesList_haveFR(unsigned int lang) { #ifdef WANTLIBOFR if ( lang==1 ) return( 1 ); #endif return( 0 ); } UN_DLL_EXPORT const char *uniNamesList_NamesListVersionAlt(unsigned int lang) { if ( uniNamesList_haveFR(lang) ) return( uniNamesList_NamesListVersionFR() ); else if ( lang==0 ) return( uniNamesList_NamesListVersion() ); return( NULL ); } Since we do not have WANTLIBOFR defined uniNamesList_haveFR() always returns 0. That will cause the gcc optimizer to eliminate the call of uniNamesList_NamesListVersionFR(). OTOH, nameslist-fr.c which has uniNamesList_NamesListVersionFR() is not built unless we define WANTLIBOFR, causing the undefined reference errors. So, the code needs to define empty *_FR functions #ifndef WANTLIBOFR. Or, we can just ./configure --enable-frenchlib as it won't add any dependencies.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79dfca2512dbaaf7e133e629f27cf2815a8477e0 commit 79dfca2512dbaaf7e133e629f27cf2815a8477e0 Author: Naohiro Aota <naota@gentoo.org> AuthorDate: 2021-05-27 02:00:23 +0000 Commit: Naohiro Aota <naota@gentoo.org> CommitDate: 2021-05-27 02:05:23 +0000 media-libs/libuninameslist: enable french lib This commit enable frenclib to fix build with -O0 (undefined references). Enabling french lib caused parallel make issue, so Makefile.am is also patched. Closes: https://bugs.gentoo.org/781716 Signed-off-by: Naohiro Aota <naota@gentoo.org> .../files/libuninameslist-20200413-makefile.patch | 20 ++++++++++++++ .../libuninameslist-20200413-r2.ebuild | 32 ++++++++++++++++++++++ 2 files changed, 52 insertions(+)