New: gettext: link failure with locally-installed libxml2
https://bugs.busybox.net/show_bug.cgi?id=7886
Summary: gettext: link failure with locally-installed libxml2
Product: buildroot
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Other
AssignedTo: unassigned at buildroot.uclibc.org
ReportedBy: ignacy.gawedzki at green-communications.fr
CC: buildroot at uclibc.org
Estimated Hours: 0.0
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.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7886] gettext: link failure with locally-installed libxml2
https://bugs.busybox.net/show_bug.cgi?id=7886
Yann E. MORIN <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P5 |P3
Status|NEW |ASSIGNED
CC| |yann.morin.1998 at free.fr
AssignedTo|unassigned at buildroot.uclibc |yann.morin.1998 at free.fr
|.org |
Target Milestone|--- |2015.02
Severity|minor |normal--- Comment #1 from Yann E. MORIN <[email protected]> 2015-02-20 22:29:32 UTC --- Ignacy, All,
Quoted 1 line
Gettext really depends on libxml2
Indeed.
Quoted 1 line
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.
Quoted 1 line
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! :-)
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
PATCH 1/1 gettext: add dependency on host-libxml2 for host-gettext.
From: Ignacy Gaw?dzki <[email protected]>
Otherwise, the locally-installed libxml2 will be used, which may depend on a locally-installed liblzma which may create conflict if host-liblzma is compiled.
Fixes https://bugs.busybox.net/show_bug.cgi?id=7886
---
Ignacy is unavailable this week, but he commited this change to our local tree before leaving.
package/gettext/gettext.mk +1 -1
@@ -12,7 +12,7 @@ GETTEXT_LICENSE = GPLv2+ GETTEXT_LICENSE_FILES = COPYING GETTEXT_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) -HOST_GETTEXT_DEPENDENCIES = # we don't want the libiconv dependency +HOST_GETTEXT_DEPENDENCIES = host-libxml2 # we don't want the libiconv dependency GETTEXT_CONF_OPTS += \ --disable-libasprintf \
Signature · 1 line
2.1.4
PATCH 1/1 gettext: add dependency on host-libxml2 for host-gettext.
Dear Nicolas Cavallari,
Quoted 20 lines · Nicolas Cavallari
From: Ignacy Gaw?dzki <[email protected]>
Otherwise, the locally-installed libxml2 will be used, which may depend on a locally-installed liblzma which may create conflict if host-liblzma is compiled.
Fixes https://bugs.busybox.net/show_bug.cgi?id=7886
Signed-off-by Ignacy Gaw?dzki <[email protected]>[nicolas: added extended commit message]Signed-off-by Nicolas Cavallari <[email protected]>---
Ignacy is unavailable this week, but he commited this change to our local tree before leaving.package/gettext/gettext.mk +0
-0
package/gettext/gettext.mk GETTEXT_LICENSE = GPLv2+ · line 15
Quoted 5 lines
package/gettext/gettext.mk +1
-1@@ -12,7 +12,7 @@ GETTEXT_LICENSE = GPLv2+ GETTEXT_LICENSE_FILES = COPYING GETTEXT_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) -HOST_GETTEXT_DEPENDENCIES = # we don't want the libiconv dependency +HOST_GETTEXT_DEPENDENCIES = host-libxml2 # we don't want the libiconv dependency
I agree that we normally prefer to rely on external libraries, rather than built-in copies. However, in this case, I am wondering if we shouldn't rather rely on the built-in copy, which is more lightweight that building host-libxml2.
From the DEPENDENCIES file of gettext:
* libxml2
+ Optional.
Needed for the --color option of the various programs.
If not present, a subset of libxml2 (included in this package) will be compiled into libgettextlib.
+ Homepage:
http://xmlsoft.org/ + Download: ftp://xmlsoft.org/libxml2/
+ If it is installed in a nonstandard directory, pass the option --with-libxml2-prefix=DIR to 'configure'.
So instead of building an external libxml2, we can pass --with-included-libxml to the gettext-tools configure script to force it to use the built-in libxml2 subset.
Note that there are several other libraries in the same situation:
glib2, libcroco and libunistring.
What is the opinion of other BR developers about this?
And all that just for a --color command line option that we really don't care about. Why the heck isn't this thing optional in the first place?
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 gettext: add dependency on host-libxml2 for host-gettext.
Thomas, Nicolas, All,
On 2015-02-23 19:17 +0100, Thomas Petazzoni spake thusly:
Quoted 46 lines · Nicolas Cavallari
Quoted 20 lines
From: Ignacy Gaw?dzki <[email protected]>
Otherwise, the locally-installed libxml2 will be used, which may depend on a locally-installed liblzma which may create conflict if host-liblzma is compiled.
Fixes https://bugs.busybox.net/show_bug.cgi?id=7886
Signed-off-by Ignacy Gaw?dzki <[email protected]>[nicolas: added extended commit message]Signed-off-by Nicolas Cavallari <[email protected]>---
Ignacy is unavailable this week, but he commited this change to our local tree before leaving.package/gettext/gettext.mk +0
-0package/gettext/gettext.mk GETTEXT_LICENSE = GPLv2+ · line 15
Quoted 5 lines
package/gettext/gettext.mk +1
-1@@ -12,7 +12,7 @@ GETTEXT_LICENSE = GPLv2+ GETTEXT_LICENSE_FILES = COPYING GETTEXT_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) -HOST_GETTEXT_DEPENDENCIES = # we don't want the libiconv dependency +HOST_GETTEXT_DEPENDENCIES = host-libxml2 # we don't want the libiconv dependencyI agree that we normally prefer to rely on external libraries, rather than built-in copies. However, in this case, I am wondering if we shouldn't rather rely on the built-in copy, which is more lightweight that building host-libxml2.
From the DEPENDENCIES file of gettext:
* libxml2
+ Optional.
Needed for the --color option of the various programs.
If not present, a subset of libxml2 (included in this package) will be compiled into libgettextlib.
+ Homepage:http://xmlsoft.org/ + Download: ftp://xmlsoft.org/libxml2/+ If it is installed in a nonstandard directory, pass the option --with-libxml2-prefix=DIR to 'configure'.
Quoted 8 lines
So instead of building an external libxml2, we can pass --with-included-libxml to the gettext-tools configure script to force it to use the built-in libxml2 subset.
Note that there are several other libraries in the same situation:
glib2, libcroco and libunistring.What is the opinion of other BR developers about this?
On my machine, host-libxml2 takes about 0m53.693s while host-gettext takes about 2m34.112s. So the overhead (~20%-pf-gettext)) is not negligible...
I am compeltely undecided on that... Do we consider a ~20%-of-gettext overhead for a full build to be important or not?
Quoted 2 lines
And all that just for a --color command line option that we really don't care about. Why the heck isn't this thing optional in the first place?
Eh... Upstream... ;-)
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
[Buildroot] [Bug 7886] gettext: link failure with locally-installed libxml2
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7886
--- Comment #2 from Thomas Petazzoni <[email protected]> 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/.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
PATCH 1/1 gettext: add dependency on host-libxml2 for host-gettext.
In reply to Yann E. MORINDear all,
Quoted 62 lines · Yann E. MORIN
Thomas, Nicolas, All,
On 2015-02-23 19:17 +0100, Thomas Petazzoni spake thusly:
Quoted 46 lines · Nicolas Cavallari
Quoted 20 lines
From: Ignacy Gaw?dzki <[email protected]>
Otherwise, the locally-installed libxml2 will be used, which may depend on a locally-installed liblzma which may create conflict if host-liblzma is compiled.
Fixes https://bugs.busybox.net/show_bug.cgi?id=7886
Signed-off-by Ignacy Gaw?dzki <[email protected]>[nicolas: added extended commit message]Signed-off-by Nicolas Cavallari <[email protected]>---
Ignacy is unavailable this week, but he commited this change to our local tree before leaving.package/gettext/gettext.mk +0
-0package/gettext/gettext.mk GETTEXT_LICENSE = GPLv2+ · line 15
Quoted 5 lines
package/gettext/gettext.mk +1
-1@@ -12,7 +12,7 @@ GETTEXT_LICENSE = GPLv2+ GETTEXT_LICENSE_FILES = COPYING GETTEXT_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) -HOST_GETTEXT_DEPENDENCIES = # we don't want the libiconv dependency +HOST_GETTEXT_DEPENDENCIES = host-libxml2 # we don't want the libiconv dependencyI agree that we normally prefer to rely on external libraries, rather than built-in copies. However, in this case, I am wondering if we shouldn't rather rely on the built-in copy, which is more lightweight that building host-libxml2.
From the DEPENDENCIES file of gettext:
* libxml2
+ Optional.
Needed for the --color option of the various programs.
If not present, a subset of libxml2 (included in this package) will be compiled into libgettextlib.
+ Homepage:http://xmlsoft.org/ + Download: ftp://xmlsoft.org/libxml2/+ If it is installed in a nonstandard directory, pass the option --with-libxml2-prefix=DIR to 'configure'.
Quoted 8 lines
So instead of building an external libxml2, we can pass --with-included-libxml to the gettext-tools configure script to force it to use the built-in libxml2 subset.
Note that there are several other libraries in the same situation:
glib2, libcroco and libunistring.What is the opinion of other BR developers about this?
On my machine, host-libxml2 takes about 0m53.693s while host-gettext takes about 2m34.112s. So the overhead (~20%-pf-gettext)) is not negligible...
Quoted 7 lines
I am compeltely undecided on that... Do we consider a ~20%-of-gettext overhead for a full build to be important or not?
Quoted 2 lines
And all that just for a --color command line option that we really don't care about. Why the heck isn't this thing optional in the first place?
Eh... Upstream... ;-)
Given the following reasons:
- The difference of build time caused by using host-libxml2 is not that much, as Yann said.
- We normally prefer to rely on external libraries
- Other packages could benefit on having host-libxml2 already built. Otherwise we could end up with building libxml2 twice, the one bundled in gettext and the external one.
I vote for using the host-libxml2 package instead of the bundled libxml2.
Regards,
Vincent.
Quoted 3 lines
Regards,
Yann E. MORIN.
PATCH 1/1 gettext: add dependency on host-libxml2 for host-gettext.
In reply to Nicolas CavallariNicolas, Ignacy, All,
On 2015-02-23 14:03 +0100, Nicolas Cavallari spake thusly:
Quoted 7 lines
From: Ignacy Gaw?dzki <[email protected]>
Otherwise, the locally-installed libxml2 will be used, which may depend on a locally-installed liblzma which may create conflict if host-liblzma is compiled.
I've sent an updated version of this patch:
https://patchwork.ozlabs.org/patch/561119/
Thanks for the initial patch! :-)
Regards,
Yann E. MORIN.
Quoted 27 lines
Signed-off-by Ignacy Gaw?dzki <[email protected]>[nicolas: added extended commit message]Signed-off-by Nicolas Cavallari <[email protected]>---
Ignacy is unavailable this week, but he commited this change to our local tree before leaving.package/gettext/gettext.mk +1
-1@@ -12,7 +12,7 @@ GETTEXT_LICENSE = GPLv2+ GETTEXT_LICENSE_FILES = COPYING GETTEXT_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) -HOST_GETTEXT_DEPENDENCIES = # we don't want the libiconv dependency +HOST_GETTEXT_DEPENDENCIES = host-libxml2 # we don't want the libiconv dependency GETTEXT_CONF_OPTS += \ --disable-libasprintf \Signature · 6 lines
2.1.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
[Buildroot] [Bug 7886] gettext: link failure with locally-installed libxml2
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7886
--- Comment #3 from Yann E. MORIN <[email protected]> --- 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/
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
PATCH 1/1 gettext: add dependency on host-libxml2 for host-gettext.
In reply to Vicente Olivert RieraQuoted 11 lines · Vicente Olivert Riera
Given the following reasons:
- The difference of build time caused by using host-libxml2 is not that much, as Yann said.
- We normally prefer to rely on external libraries
- Other packages could benefit on having host-libxml2 already built. Otherwise we could end up with building libxml2 twice, the one bundled in gettext and the external one.
Quoted 5 lines
I vote for using the host-libxml2 package instead of the bundled libxml2.
Regards,
Vincent.
Hi All.
Given my recent bump to gettext 0.19.7 libxml2 is now required more than ever for the new ITS handling code.
The problem now is that older libxml2 versions might not be enough for host-gettext and result in build failure:
http://autobuild.buildroot.net/results/1b7/1b7b1244ccab111dbcdb6350525077d2a7157d91/build-end.log
It is silly that the configure script doesn't check for this, however we can't make conditionals for host packages (or better said, for things that may or may not be present in the distro), and i follow the same line of reasoning of avoiding bundled duplication - it's more a matter of build time than space for host packages, but still.
I'd vote for making it so as well.
Regards.
[Buildroot] [Bug 7886] gettext: link failure with locally-installed libxml2
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7886
Yann E. MORIN <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED--- Comment #4 from Yann E. MORIN <[email protected]> --- Fixed with:
https://git.buildroot.org/buildroot/commit/?id=a7fe2ce6f499830f590177bf9a76cf144fd198dc
Thanks for the report! :-)
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.