|
|
cdcb29 |
Patch by Robert Scheck <robert@fedoraproject.org> for libidn2 >= 2.0.0, which works
|
|
|
cdcb29 |
around the broken libtool of Debian. Multilib/multiarch systems like Fedora or Red
|
|
|
cdcb29 |
Hat Enterprise Linux are using /usr/lib64 for 64 bit libraries and /usr/lib is used
|
|
|
cdcb29 |
for 32 bit libraries. That allows to run 32 bit software on 64 bit systems. Debian
|
|
|
cdcb29 |
systems only use /usr/lib which contains only 32 or 64 bit systems depending on the
|
|
|
cdcb29 |
architecture.
|
|
|
cdcb29 |
|
|
|
cdcb29 |
Libtool hardcodes the runtime search path in a library (rpath), if the library that
|
|
|
cdcb29 |
is used for linking is not within the default system library path. The result is,
|
|
|
cdcb29 |
that if libtool.m4/configure files are generated by a Debian system, but used on a
|
|
|
cdcb29 |
Fedora or Red Hat Enterprise Linux 64 bit system for compiling, "-rpath /usr/lib64"
|
|
|
cdcb29 |
makes it into the binary.
|
|
|
cdcb29 |
|
|
|
cdcb29 |
Fedora and EPEL (for Red Hat Enterprise Linux) do not allow binaries with rpath, as
|
|
|
cdcb29 |
the Linux dynamic linker is usually smarter than the hardcoded path.
|
|
|
cdcb29 |
|
|
|
cdcb29 |
The fix for this issue is to add the optional /lib64 and /usr/lib64 directories at/
|
|
|
cdcb29 |
within libtool in front of the regular /lib and /usr/lib directories at the system
|
|
|
cdcb29 |
library path. These libtool information are hold in libtool.m4, which is generated
|
|
|
cdcb29 |
by running aclocal. As the content of libtool.m4 is included into configure during
|
|
|
cdcb29 |
a run of autoconf, libtool.m4 needs to be modified within the upstream build system
|
|
|
cdcb29 |
each time after a aclocal run - until Debian's libtool is fixed at Debian upstream.
|
|
|
cdcb29 |
|
|
|
cdcb29 |
Applying the fix is either possible by using the last hunk of the patch (the other
|
|
|
cdcb29 |
hunks are runtime-only if configure file has been already generated) or by running
|
|
|
cdcb29 |
the following sed command after each aclocal run within the upstream build system:
|
|
|
cdcb29 |
|
|
|
cdcb29 |
sed -e 's@\(# Ideally, we could use ldconfig to report\)@# Add ABI-specific directories to the system library path.\n sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"\n\n \1@' \
|
|
|
cdcb29 |
-e 's@/lib /usr/lib $lt_ld_extra@$sys_lib_dlsearch_path_spec $lt_ld_extra@' -i libidn2-2.0.0/m4/libtool.m4
|
|
|
cdcb29 |
|
|
|
cdcb29 |
More information regarding this topic can be found for example at:
|
|
|
cdcb29 |
|
|
|
cdcb29 |
- http://osdir.com/ml/bug-libtool-gnu/2009-12/msg00034.html
|
|
|
cdcb29 |
- http://lists.gnu.org/archive/html/libtool/2009-01/msg00039.html
|
|
|
cdcb29 |
- http://thread.gmane.org/gmane.comp.gnu.libtool.general/8339/focus=8345
|
|
|
cdcb29 |
|
|
|
cdcb29 |
--- libidn2-2.0.0/configure 2017-03-29 17:26:58.000000000 +0200
|
|
|
cdcb29 |
+++ libidn2-2.0.0/configure.rpath 2017-04-07 00:59:43.000000000 +0200
|
|
|
cdcb29 |
@@ -14266,6 +14266,9 @@
|
|
|
cdcb29 |
# before this can be enabled.
|
|
|
cdcb29 |
hardcode_into_libs=yes
|
|
|
cdcb29 |
|
|
|
cdcb29 |
+ # Add ABI-specific directories to the system library path.
|
|
|
cdcb29 |
+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
|
|
|
cdcb29 |
+
|
|
|
cdcb29 |
# Ideally, we could use ldconfig to report *all* directores which are
|
|
|
cdcb29 |
# searched for libraries, however this is still not possible. Aside from not
|
|
|
cdcb29 |
# being certain /sbin/ldconfig is available, command
|
|
|
cdcb29 |
@@ -14274,7 +14277,7 @@
|
|
|
cdcb29 |
# appending ld.so.conf contents (and includes) to the search path.
|
|
|
cdcb29 |
if test -f /etc/ld.so.conf; then
|
|
|
cdcb29 |
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
|
|
cdcb29 |
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
|
|
cdcb29 |
+ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
|
|
|
cdcb29 |
fi
|
|
|
cdcb29 |
|
|
|
cdcb29 |
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
|
|
cdcb29 |
--- libidn2-2.0.0/m4/libtool.m4 2017-02-15 10:54:29.000000000 +0100
|
|
|
cdcb29 |
+++ libidn2-2.0.0/m4/libtool.m4.rpath 2017-04-07 00:58:52.000000000 +0200
|
|
|
cdcb29 |
@@ -2866,6 +2866,9 @@
|
|
|
cdcb29 |
# before this can be enabled.
|
|
|
cdcb29 |
hardcode_into_libs=yes
|
|
|
cdcb29 |
|
|
|
cdcb29 |
+ # Add ABI-specific directories to the system library path.
|
|
|
cdcb29 |
+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
|
|
|
cdcb29 |
+
|
|
|
cdcb29 |
# Ideally, we could use ldconfig to report *all* directores which are
|
|
|
cdcb29 |
# searched for libraries, however this is still not possible. Aside from not
|
|
|
cdcb29 |
# being certain /sbin/ldconfig is available, command
|
|
|
cdcb29 |
@@ -2874,7 +2877,7 @@
|
|
|
cdcb29 |
# appending ld.so.conf contents (and includes) to the search path.
|
|
|
cdcb29 |
if test -f /etc/ld.so.conf; then
|
|
|
cdcb29 |
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
|
|
cdcb29 |
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
|
|
cdcb29 |
+ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
|
|
|
cdcb29 |
fi
|
|
|
cdcb29 |
|
|
|
cdcb29 |
# We used to test for /lib/ld.so.1 and disable shared libraries on
|