Bug 7886

Summary: gettext: link failure with locally-installed libxml2
Product: buildroot Reporter: Ignacy Gawędzki <ignacy.gawedzki>
Component: OtherAssignee: Yann E. MORIN <yann.morin.1998>
Status: RESOLVED FIXED    
Severity: normal CC: buildroot, yann.morin.1998
Priority: P3    
Version: unspecified   
Target Milestone: 2015.02   
Hardware: PC   
OS: Linux   
Host: Target:
Build:

Description Ignacy Gawędzki 2015-02-18 15:12:57 UTC
Gettext really depends on libxml2, which itself links with liblzma.  The thing is, when host-gettext gets linked with a locally-installed libxml2, symbols in the latter defined in liblzma won't possibly match the ones in a host-liblzma if it is built and installed.

The solution is to add host-libxml2 to HOST_GETTEXT_DEPENDENCIES.

I suspect this problem is symptomatic of a more general problem of well-defined dependencies of host-packages.
Comment 1 Yann E. MORIN 2015-02-20 22:29:32 UTC
Ignacy, All,

> Gettext really depends on libxml2

Indeed.

> which itself links with liblzma

Not in Buildroot, since we explicitly disable lzma support in libxml2, which is causing a problem similar to the one you report.

> The solution is to add host-libxml2 to HOST_GETTEXT_DEPENDENCIES.

Indeed, it looks like the only option available to us (there is no option to disable xml requirement in gettext).

Care to send a patch, as documented there:
    http://buildroot.net/downloads/manual/manual.html#submitting-patches

Thanks! :-)
Comment 2 Thomas Petazzoni 2015-04-09 14:19:58 UTC
A patch has been proposed to address this, but there are some concerns about it. See http://patchwork.ozlabs.org/patch/442466/.
Comment 3 Yann E. MORIN 2015-12-26 21:46:06 UTC
I've sent an updated version of the proposed fix, and have updated
the commit log with extra information on the reason why we want
host-gettext to depend on host-libxml2:
    https://patchwork.ozlabs.org/patch/561119/
Comment 4 Yann E. MORIN 2015-12-29 17:27:21 UTC
Fixed with:
https://git.buildroot.org/buildroot/commit/?id=a7fe2ce6f499830f590177bf9a76cf144fd198dc

Thanks for the report! :-)