[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gettext] libtextstyle.so: undefined reference to `__builtin_clz

From: Bruno Haible
Subject: Re: [bug-gettext] libtextstyle.so: undefined reference to `__builtin_clzll'
Date: Wed, 17 Jul 2019 20:44:27 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-154-generic; KDE/5.18.0; x86_64; ; )


Jeffrey Walton wrote:
> I'm working on an ancient system with GCC 3.3. GetText is compiling
> OK, but it is failing link.
> (iConv and GetText are not my goals here. They are dependent libraries
> I need to build on the way to my goal of updating Git and Wget).
> $ cat ~/get-text.txt
> libtool: link: gcc -std=gnu99 -g2 -O2 -fPIC -pthread -Wl,-R
> -Wl,\$ORIGIN/../lib -Wl,-R -Wl,/usr/local/lib -Wl,--enable-new-dtags
> -o .libs/hello hello.o  -L/usr/local/lib ../lib/.libs/libtextstyle.so
> /usr/local/lib/libiconv.so -lm -ldl -lpthread -pthread -Wl,-rpath
> -Wl,/usr/local/lib
> ../lib/.libs/libtextstyle.so: undefined reference to `__builtin_clzll'
> collect2: ld returned 1 exit status

Thanks for the report. This patch should fix it.

diff --git a/gnulib-local/lib/libxml/timsort.h 
index 0c6346b..efca68c 100644
--- a/gnulib-local/lib/libxml/timsort.h
+++ b/gnulib-local/lib/libxml/timsort.h
@@ -74,7 +74,7 @@ typedef unsigned __int64 uint64_t;
 static int compute_minrun(const uint64_t);
 #ifndef CLZ
-#ifdef __GNUC__
+#if defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 
 #define CLZ __builtin_clzll
When you are working off a tarball, you need to apply this change in three
1) gnulib-local/lib/libxml/timsort.h
2) libtextstyle/lib/libxml/timsort.h
3) gettext-tools/gnulib-lib/libxml/timsort.h


reply via email to

[Prev in Thread] Current Thread [Next in Thread]