|
|
e68a2f3 |
Patch by Robert Scheck <robert@fedoraproject.org> for zarafa >= 7.0.9, which works
|
|
|
cc7b75a |
around the broken libtool of Debian. Multilib/multiarch systems like Fedora or Red
|
|
|
cc7b75a |
Hat Enterprise Linux are using /usr/lib64 for 64 bit libraries and /usr/lib is used
|
|
|
cc7b75a |
for 32 bit libraries. That allows to run 32 bit software on 64 bit systems. Debian
|
|
|
cc7b75a |
systems only use /usr/lib which contains only 32 or 64 bit systems depending on the
|
|
|
cc7b75a |
architecture.
|
|
|
cc7b75a |
|
|
|
cc7b75a |
Libtool hardcodes the runtime search path in a library (rpath), if the library that
|
|
|
cc7b75a |
is used for linking is not within the default system library path. The result is,
|
|
|
cc7b75a |
that if aclocal.m4/configure files are generated by a Debian system, but used on a
|
|
|
cc7b75a |
Fedora or Red Hat Enterprise Linux 64 bit system for compiling, "-rpath /usr/lib64"
|
|
|
cc7b75a |
makes it into the binary.
|
|
|
cc7b75a |
|
|
|
cc7b75a |
Fedora and EPEL (for Red Hat Enterprise Linux) do not allow binaries with rpath, as
|
|
|
cc7b75a |
the Linux dynamic linker is usually smarter than the hardcoded path.
|
|
|
cc7b75a |
|
|
|
cc7b75a |
The fix for this issue is to add the optional /lib64 and /usr/lib64 directories at/
|
|
|
cc7b75a |
within libtool in front of the regular /lib and /usr/lib directories at the system
|
|
|
cc7b75a |
library path. These libtool information are hold in aclocal.m4, which is generated
|
|
|
cc7b75a |
by running aclocal. As the content of aclocal.m4 is included into configure during
|
|
|
cc7b75a |
a run of autoconf, aclocal.m4 needs to be modified within the upstream build system
|
|
|
cc7b75a |
each time after a aclocal run - until Debian's libtool is fixed at Debian upstream.
|
|
|
cc7b75a |
|
|
|
cc7b75a |
Applying the fix is either possible by using the first hunk of the patch (second
|
|
|
cc7b75a |
hunk is runtime-only if configure file has been already generated) or by running
|
|
|
cc7b75a |
the following sed command after each aclocal run within the upstream build system:
|
|
|
cc7b75a |
|
|
|
cc7b75a |
sed -e 's@\(# Append ld.so.conf contents to the search path\)@# Add ABI-specific directories to the system library path.\n sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"\n\n \1@' \
|
|
|
cc7b75a |
-e 's@/lib /usr/lib $lt_ld_extra@$sys_lib_dlsearch_path_spec $lt_ld_extra@' -i zarafa-6.40.5/aclocal.m4
|
|
|
cc7b75a |
|
|
|
cc7b75a |
More information regarding this topic can be found for example at:
|
|
|
cc7b75a |
|
|
|
cc7b75a |
- http://osdir.com/ml/bug-libtool-gnu/2009-12/msg00034.html
|
|
|
cc7b75a |
- http://lists.gnu.org/archive/html/libtool/2009-01/msg00039.html
|
|
|
cc7b75a |
- http://thread.gmane.org/gmane.comp.gnu.libtool.general/8339/focus=8345
|
|
|
cc7b75a |
|
|
|
e68a2f3 |
--- zarafa-7.0.9/aclocal.m4 2012-08-03 13:58:18.000000000 +0200
|
|
|
e68a2f3 |
+++ zarafa-7.0.9/aclocal.m4.rpath 2012-08-12 22:57:31.000000000 +0200
|
|
|
e68a2f3 |
@@ -2485,10 +2485,13 @@
|
|
|
cc7b75a |
# before this can be enabled.
|
|
|
cc7b75a |
hardcode_into_libs=yes
|
|
|
cc7b75a |
|
|
|
cc7b75a |
+ # Add ABI-specific directories to the system library path.
|
|
|
cc7b75a |
+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
|
|
|
cc7b75a |
+
|
|
|
cc7b75a |
# Append ld.so.conf contents to the search path
|
|
|
cc7b75a |
if test -f /etc/ld.so.conf; then
|
|
|
e68a2f3 |
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;/^$/d' | tr '\n' ' '`
|
|
|
cc7b75a |
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
|
|
cc7b75a |
+ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
|
|
|
cc7b75a |
fi
|
|
|
cc7b75a |
|
|
|
cc7b75a |
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
|
|
e68a2f3 |
--- zarafa-7.0.9/configure 2012-08-03 13:58:18.000000000 +0200
|
|
|
e68a2f3 |
+++ zarafa-7.0.9/configure.rpath 2012-08-12 22:59:05.000000000 +0200
|
|
|
e68a2f3 |
@@ -10097,10 +10097,13 @@
|
|
|
cc7b75a |
# before this can be enabled.
|
|
|
cc7b75a |
hardcode_into_libs=yes
|
|
|
cc7b75a |
|
|
|
cc7b75a |
+ # Add ABI-specific directories to the system library path.
|
|
|
cc7b75a |
+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
|
|
|
cc7b75a |
+
|
|
|
cc7b75a |
# Append ld.so.conf contents to the search path
|
|
|
cc7b75a |
if test -f /etc/ld.so.conf; then
|
|
|
e68a2f3 |
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;/^$/d' | tr '\n' ' '`
|
|
|
cc7b75a |
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
|
|
cc7b75a |
+ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
|
|
|
cc7b75a |
fi
|
|
|
cc7b75a |
|
|
|
cc7b75a |
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
|
|
e68a2f3 |
@@ -15288,10 +15291,13 @@
|
|
|
cc7b75a |
# before this can be enabled.
|
|
|
cc7b75a |
hardcode_into_libs=yes
|
|
|
cc7b75a |
|
|
|
cc7b75a |
+ # Add ABI-specific directories to the system library path.
|
|
|
cc7b75a |
+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
|
|
|
cc7b75a |
+
|
|
|
cc7b75a |
# Append ld.so.conf contents to the search path
|
|
|
cc7b75a |
if test -f /etc/ld.so.conf; then
|
|
|
e68a2f3 |
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;/^$/d' | tr '\n' ' '`
|
|
|
cc7b75a |
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
|
|
cc7b75a |
+ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
|
|
|
cc7b75a |
fi
|
|
|
cc7b75a |
|
|
|
cc7b75a |
# We used to test for /lib/ld.so.1 and disable shared libraries on
|