Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 781716 - media-libs/libuninameslist-20200413-r1 - /.../nameslist.c:216: undefined reference to uniNamesList_NamesListVersionFR
Summary: media-libs/libuninameslist-20200413-r1 - /.../nameslist.c:216: undefined refe...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: CJK Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-09 07:11 UTC by Toralf Förster
Modified: 2022-03-11 15:07 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,15.35 KB, text/plain)
2021-04-09 07:11 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,2.66 KB, text/plain)
2021-04-09 07:11 UTC, Toralf Förster
Details
environment (environment,18.54 KB, text/plain)
2021-04-09 07:11 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,12.22 KB, application/x-bzip)
2021-04-09 07:11 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,7.65 KB, application/x-bzip)
2021-04-09 07:11 UTC, Toralf Förster
Details
media-libs:libuninameslist-20200413-r1:20210409-021854.log (media-libs:libuninameslist-20200413-r1:20210409-021854.log,23.20 KB, text/plain)
2021-04-09 07:11 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,10.20 KB, application/x-bzip)
2021-04-09 07:11 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2021-04-09 07:11:50 UTC
/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
Comment 1 Toralf Förster gentoo-dev 2021-04-09 07:11:52 UTC
Created attachment 698790 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-04-09 07:11:53 UTC
Created attachment 698793 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2021-04-09 07:11:54 UTC
Created attachment 698796 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2021-04-09 07:11:55 UTC
Created attachment 698799 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2021-04-09 07:11:56 UTC
Created attachment 698802 [details]
logs.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2021-04-09 07:11:57 UTC
Created attachment 698805 [details]
media-libs:libuninameslist-20200413-r1:20210409-021854.log
Comment 7 Toralf Förster gentoo-dev 2021-04-09 07:11:58 UTC
Created attachment 698808 [details]
temp.tar.bz2
Comment 8 orbea 2021-04-10 04:33:23 UTC
I can't reproduce this, only the other libuninamelist bug.

https://bugs.gentoo.org/779670
Comment 9 Luke-Jr 2021-05-10 22:03:50 UTC
media-libs/libuninameslist-20200413-r1 was marked stable for ppc64, but building fails with this error...
Comment 10 Luke-Jr 2021-05-10 22:42:05 UTC
-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.
Comment 11 Naohiro Aota gentoo-dev 2021-05-25 15:16:29 UTC
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.
Comment 12 Larry the Git Cow gentoo-dev 2021-05-27 02:06:05 UTC
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(+)