Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 570548 - sys-fs/xfsdump - fails linking to 'libintl_gettext' under uclibc
Summary: sys-fs/xfsdump - fails linking to 'libintl_gettext' under uclibc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 547292 uclibc-porting
  Show dependency tree
 
Reported: 2016-01-02 01:41 UTC by Joshua Kinard
Modified: 2016-01-18 08:55 UTC (History)
3 users (show)

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


Attachments
Make gettext/libintl support optional in xfsdump-3.1.6 (xfsdump-3.1.6-uclibc-useflag-nls.patch,954 bytes, patch)
2016-01-02 03:24 UTC, Joshua Kinard
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Kinard gentoo-dev 2016-01-02 01:41:37 UTC
xfsdump fails to build in a uClibc-based userland due to not getting the '-lintl' flag passed during linking:

    [CC]     var.o
content.o: In function `restore_file_cb':
content.c:(.text+0x4cb0): warning: the use of OBSOLESCENT `utime' is discouraged, use `utimes'
drive_scsitape.o: In function `ds_instantiate':
drive_scsitape.c:(.text+0x46c): undefined reference to `libintl_gettext'
drive_scsitape.c:(.text+0x4b0): undefined reference to `libintl_gettext'
drive_scsitape.c:(.text+0x528): undefined reference to `libintl_gettext'
drive_scsitape.c:(.text+0x628): undefined reference to `libintl_gettext'
drive_scsitape.o: In function `record_hdr_validate':
drive_scsitape.c:(.text+0x9f8): undefined reference to `libintl_gettext'
drive_scsitape.o:drive_scsitape.c:(.text+0xb04): more undefined references to `libintl_gettext' follow
main.o: In function `main':
main.c:(.text.startup+0x68): undefined reference to `libintl_bindtextdomain'
main.c:(.text.startup+0x70): undefined reference to `libintl_textdomain'
main.c:(.text.startup+0x124): undefined reference to `libintl_gettext'
main.c:(.text.startup+0x190): undefined reference to `libintl_gettext'
main.c:(.text.startup+0x204): undefined reference to `libintl_gettext'
main.c:(.text.startup+0x2b4): undefined reference to `libintl_gettext'
main.c:(.text.startup+0x558): undefined reference to `libintl_gettext'
main.o:main.c:(.text.startup+0x5cc): more undefined references to `libintl_gettext' follow
collect2: error: ld returned 1 exit status
../include/buildrules:32: recipe for target 'xfsrestore' failed
gmake[2]: *** [xfsrestore] Error 1
include/buildrules:22: recipe for target 'restore' failed
gmake[1]: *** [restore] Error 2
gmake[1]: *** Waiting for unfinished jobs....

It appears that using 'append-ldflags' from flag-o-matic will fix this issue, but that raises a QA flag because append-ldflags is not for passing library linking flags.  We're supposed to use 'append-libs' instead.

However, xfsdump's build system does not appear to honor $LIBS or something isn't picking up -lintl when added via append-libs.  So, bug this until a good solution can be found.
Comment 1 Joshua Kinard gentoo-dev 2016-01-02 03:24:53 UTC
Created attachment 421568 [details, diff]
Make gettext/libintl support optional in xfsdump-3.1.6

@base-system, @embedded,

I tried several approaches to getting xfsdump's build system to properly detect -lintl (provided by dev-libs/libintl on uclibc, not by sys-devel/gettext, it looks).  But unless I use append-ldflags to pass -lintl, the build will fail, as it looks like xfsdump's build system doesn't honor/use $LIBS correctly.

So, I instead modded the ebuild to make gettext support optional via the 'nls' USE flag, and for uclibc, this flag will be force-disabled in the uclibc profile's package.use.mask.  I also left the elibc_uclibc USE dep in there for the future.

Look good?
Comment 2 Joshua Kinard gentoo-dev 2016-01-18 08:55:27 UTC
Added to the tree on the 3.1.6 ebuild only.