[lfs] 02/02: gettext: Fix build issue with system libxml2
| Newsgroups | gmane.linux.lfs.book |
|---|---|
| Message-ID | <[email protected]> |
This is an automated email from the git hooks/post-receive script. git pushed a commit to branch trunk in repository lfs. commit e5955cd62a4069b1e2c9fb1536c55dc399a8bcb3 Author: Xi Ruoyao <[email protected]> AuthorDate: Wed Dec 18 10:48:14 2024 +0800 gettext: Fix build issue with system libxml2 The upstream fix is explicitly checking libxml2 version so it's not practical to be turned into a sed. But I don't want to upload another patch just for such a "temporary" issue (as it'll be fixed for 0.23.1 anyway). This alternative fix relies on: 1. The fact that the return type of xmlCtxtGetLastError and the arg type of xmlStructuredErrorFunc are changed in the same commit 61034116d0a3 ("error: Make more xmlError structs constant"). 2. GCC supports typeof(expr) to get the type of expr w/o really evaluating it. So it should have the same effect as the upstream fix. Tested with both --with-included-libxml2 and --without-included-libxml2 on BLFS. --- chapter08/gettext.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/chapter08/gettext.xml b/chapter08/gettext.xml index f26d15536..d8fbc8f20 100644 --- a/chapter08/gettext.xml +++ b/chapter08/gettext.xml @@ -43,6 +43,14 @@ <sect2 role="installation"> <title>Installation of Gettext</title> + <para>At first, fix an issue causing the package fail to build with + libxml-2.12 or later. The fix is optional for building LFS, but + required if rebuilding this package in BLFS with libxml + installed:</para> + +<screen><userinput remap="pre">sed -e '/^structured/s/xmlError \*/typeof(xmlCtxtGetLastError(NULL)) /' \ + -i gettext-tools/src/its.c</userinput></screen> + <para>Prepare Gettext for compilation:</para> <screen><userinput remap="configure">./configure --prefix=/usr \ -- To stop receiving notification emails like this one, please contact the administrator of this repository. -- http://lists.linuxfromscratch.org/sympa/info/lfs-book Unsubscribe: See the above information page