Bug 7886 - gettext: link failure with locally-installed libxml2
Summary: gettext: link failure with locally-installed libxml2
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Linux
: P3 normal
Target Milestone: 2015.02
Assignee: Yann E. MORIN
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-18 15:12 UTC by Ignacy Gawędzki
Modified: 2015-12-29 17:27 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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! :-)