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
Created attachment 406544 [details, diff] cdw-0.8.0-uclibc.patch
Created attachment 406546 [details, diff] ebuild patch
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?
(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
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.
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.
(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.
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.
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.