Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 554532 - app-cdr/cdw-0.8.0 build fix for uclibc
Summary: app-cdr/cdw-0.8.0 build fix for uclibc
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Arthur Zamarin
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks: uclibc-porting
  Show dependency tree
 
Reported: 2015-07-11 18:02 UTC by René Rhéaume
Modified: 2020-11-07 17:32 UTC (History)
2 users (show)

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


Attachments
cdw-0.8.0-uclibc.patch (cdw-0.8.0-uclibc.patch,1.16 KB, patch)
2015-07-11 18:02 UTC, René Rhéaume
Details | Diff
ebuild patch (cdw-0.8.0.ebuild.patch,840 bytes, patch)
2015-07-11 18:04 UTC, René Rhéaume
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description René Rhéaume 2015-07-11 18:02:10 UTC
cdw uses an include file which does not exists in a uclibc environment. Also, it silently uses libintl without adding -lintl to its libraries. Finally, a few undeclared functions warning are corrected.

Reproducible: Always

Steps to Reproduce:
1. emerge cdw
2.
3.
Actual Results:  
emake failed (compile phase)

Expected Results:  
cdw installed on system
Comment 1 René Rhéaume 2015-07-11 18:02:48 UTC
Created attachment 406544 [details, diff]
cdw-0.8.0-uclibc.patch
Comment 2 René Rhéaume 2015-07-11 18:04:33 UTC
Created attachment 406546 [details, diff]
ebuild patch
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2015-07-12 03:54:03 UTC
your change to the Makefile.am file breaks linking on glibc systems. libintl doesn't seem to be needed:

readelf -d /var/tmp/portage/app-cdr/cdw-0.8.0/image/usr/bin/cdw | grep lib
 0x0000000000000001 (NEEDED)             Shared library: [libmenuw.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libformw.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libpanelw.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libncursesw.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libcdio.so.15]
 0x0000000000000001 (NEEDED)             Shared library: [libiso9660.so.9]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libburn.so.4]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]

so what linking error were you trying to solve for uclibc?
Comment 4 René Rhéaume 2015-07-12 11:16:24 UTC
(In reply to Mr. Bones. from comment #3)
> your change to the Makefile.am file breaks linking on glibc systems. libintl
> doesn't seem to be needed:
> 
> so what linking error were you trying to solve for uclibc?

The following one, but you must patch main.c beforehand to get to this.

cdw-main.o: In function `cdw_conditional_exit':
main.c:(.text.cdw_conditional_exit+0x2f): undefined reference to `libintl_gettext'
main.c:(.text.cdw_conditional_exit+0x3e): undefined reference to `libintl_gettext'
cdw-main.o: In function `main':
main.c:(.text.startup.main+0x357): undefined reference to `libintl_gettext'
main.c:(.text.startup.main+0x444): undefined reference to `libintl_gettext'
main.c:(.text.startup.main+0x453): undefined reference to `libintl_gettext'
cdw-main.o:main.c:(.text.startup.main+0x54d): more undefined references to `libintl_gettext' follow
../src/utilities/libcdwutilities.a(cdw_utils.o): In function `cdw_locale_init':
cdw_utils.c:(.text.cdw_locale_init+0x3f): undefined reference to `libintl_textdomain'
cdw_utils.c:(.text.cdw_locale_init+0x52): undefined reference to `libintl_bindtextdomain'
../src/utilities/libcdwutilities.a(cdw_utils.o): In function `cdw_utils_eta_calculations':
cdw_utils.c:(.text.cdw_utils_eta_calculations+0x84): undefined reference to `libintl_gettext'
cdw_utils.c:(.text.cdw_utils_eta_calculations+0xe0): undefined reference to `libintl_gettext'
../src/utilities/libcdwutilities.a(cdw_logging.o): In function `cdw_logging_module_init':
cdw_logging.c:(.text.cdw_logging_module_init+0x165): undefined reference to `libintl_gettext'
cdw_logging.c:(.text.cdw_logging_module_init+0x174): undefined reference to `libintl_gettext'
cdw_logging.c:(.text.cdw_logging_module_init+0x1b5): undefined reference to `libintl_gettext'
../src/utilities/libcdwutilities.a(cdw_logging.o):cdw_logging.c:(.text.cdw_logging_module_init+0x1c4): more undefined references to `libintl_gettext' follow
collect2: error: ld returned 1 exit status
gmake[3]: *** [cdw] Error 1
gmake[2]: *** [all-recursive] Error 1
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2
Command exited with non-zero status 2
Comment 5 Mr. Bones. (RETIRED) gentoo-dev 2015-07-16 04:07:32 UTC
I added the compile bits to portage to make it easier for someone to roll a patch that fixes the linking issues for uclibc while still working for glibc.
Comment 6 Anthony Basile gentoo-dev 2016-03-01 10:27:40 UTC
We need -lintl in my approach to building uclibc systems because I use gettext here to provide libintl.  I've been dealing with these on a per package basis by adding the appropriate files to /etc/portage/{package.env,env}/  This is not the best solution but I haven't found a universally applicable better solution.  Running through each package and adding the correct intelligence is a lot of work and may be for naught when/if I get to the locales problem in uclibc.
Comment 7 Anthony Basile gentoo-dev 2016-03-01 10:30:21 UTC
(In reply to Mr. Bones. from comment #5)
> I added the compile bits to portage to make it easier for someone to roll a
> patch that fixes the linking issues for uclibc while still working for glibc.

Thanks this helps because it does reduce the amount of "out of tree" fixes we need to add to uclibc.  Much appreciated.
Comment 8 René Rhéaume 2017-01-15 14:42:23 UTC
The patch is still needed for uclibc-ng. 

However, a cleaner way to solve the linking problem would be to add a test for a gettext provider in configure.ac . I am not versed in GNU autotools, so if someone comes with the patch, I will be happy to try it out.
Comment 9 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2020-11-07 17:32:02 UTC
Sorry for bumping a very old bug (and likely forgotten).

The patch was already pushed upstream, and every code change is already apparent in version 0.8.1 (which is already put in tree for a long time). Therefore I think we can close this bug.

In any case, thank you for your patch, and in case the problem isn't fixed I will be pleased to reopen and investigate to fix it. Do note I don't have uclibc environment, so your future responses are needed.