office-gobmx/external/curl/configure-eval-fix.patch.0
Stephan Bergmann 9b2c6bbcc3 external/curl: Fix manipulation of LD_LIBRARY_PATH
This fixes the same issue as
<e39421cef3>
"curl-functions.m4: fix LIBRARY_PATH adjustment to avoid eval", just in a less
intrusive way so that we can get away with just fixing the resulting configure
rather than having to run any Autotools reconfiguration commands.

40a84af1bd "upgrade to curl-7.81.0" caused
<https://ci.libreoffice.org/job/lo_ubsan/2272/> to fail with the cryptic

[...]
> checking for gethostbyname in -lnetwork... no
> checking for gethostbyname in -lnet... no
> configure: error: couldn't find libraries for gethostbyname()
> /home/tdf/lode/jenkins/workspace/lo_ubsan/external/curl/ExternalProject_curl.mk:41: recipe for target '/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/ExternalProject/curl/build' failed
> make[1]: *** [/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/ExternalProject/curl/build] Error 1

because somewhere in the middle of curl's configure LD_LIBRARY_PATH got garbled
because of this issue, so that invoking
/home/tdf/lode/opt_private/clang-llvmorg-9.0.1/bin/clang started to fail with

> /home/tdf/lode/opt_private/clang-llvmorg-9.0.1/bin/clang: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /home/tdf/lode/opt_private/clang-llvmorg-9.0.1/bin/clang)
> /home/tdf/lode/opt_private/clang-llvmorg-9.0.1/bin/clang: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/tdf/lode/opt_private/clang-llvmorg-9.0.1/bin/clang)
> /home/tdf/lode/opt_private/clang-llvmorg-9.0.1/bin/clang: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/tdf/lode/opt_private/clang-llvmorg-9.0.1/bin/clang)

(because that clang is built against a local GCC and libstdc++, so needs
LD_LIBRARY_PATH to be set up properly to find the latter), which caused the
gethostbyname check to fail (as seen when looking into that build's
workdir/UnpackedTarball/curl/config.log).

Change-Id: I3d45018cdfdb22b98c0dec0757e754a172a811de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128850
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-01-24 10:15:28 +01:00

146 lines
3.9 KiB
Text

--- configure
+++ configure
@@ -17942,7 +17942,7 @@
*) library_path_var=LD_LIBRARY_PATH ;;
esac
- eval "old=$$library_path_var"
+ eval "old=\$$library_path_var"
eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
eval "export $library_path_var"
@@ -18230,7 +18230,7 @@
*) library_path_var=LD_LIBRARY_PATH ;;
esac
- eval "old=$$library_path_var"
+ eval "old=\$$library_path_var"
eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
eval "export $library_path_var"
@@ -19676,7 +19676,7 @@
*) library_path_var=LD_LIBRARY_PATH ;;
esac
- eval "old=$$library_path_var"
+ eval "old=\$$library_path_var"
eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
eval "export $library_path_var"
@@ -22525,7 +22525,7 @@
*) library_path_var=LD_LIBRARY_PATH ;;
esac
- eval "old=$$library_path_var"
+ eval "old=\$$library_path_var"
eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
eval "export $library_path_var"
@@ -24251,7 +24251,7 @@
*) library_path_var=LD_LIBRARY_PATH ;;
esac
- eval "old=$$library_path_var"
+ eval "old=\$$library_path_var"
eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
eval "export $library_path_var"
@@ -34015,7 +34015,7 @@
*) library_path_var=LD_LIBRARY_PATH ;;
esac
- eval "old=$$library_path_var"
+ eval "old=\$$library_path_var"
eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
eval "export $library_path_var"
@@ -34479,7 +34479,7 @@
*) library_path_var=LD_LIBRARY_PATH ;;
esac
- eval "old=$$library_path_var"
+ eval "old=\$$library_path_var"
eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
eval "export $library_path_var"
@@ -37507,7 +37507,7 @@
*) library_path_var=LD_LIBRARY_PATH ;;
esac
- eval "old=$$library_path_var"
+ eval "old=\$$library_path_var"
eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
eval "export $library_path_var"
@@ -39014,7 +39014,7 @@
*) library_path_var=LD_LIBRARY_PATH ;;
esac
- eval "old=$$library_path_var"
+ eval "old=\$$library_path_var"
eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
eval "export $library_path_var"
@@ -39259,7 +39259,7 @@
*) library_path_var=LD_LIBRARY_PATH ;;
esac
- eval "old=$$library_path_var"
+ eval "old=\$$library_path_var"
eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
eval "export $library_path_var"
@@ -39527,7 +39527,7 @@
*) library_path_var=LD_LIBRARY_PATH ;;
esac
- eval "old=$$library_path_var"
+ eval "old=\$$library_path_var"
eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
eval "export $library_path_var"
@@ -39787,7 +39787,7 @@
*) library_path_var=LD_LIBRARY_PATH ;;
esac
- eval "old=$$library_path_var"
+ eval "old=\$$library_path_var"
eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
eval "export $library_path_var"
@@ -40833,7 +40833,7 @@
*) library_path_var=LD_LIBRARY_PATH ;;
esac
- eval "old=$$library_path_var"
+ eval "old=\$$library_path_var"
eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
eval "export $library_path_var"
@@ -41238,7 +41238,7 @@
*) library_path_var=LD_LIBRARY_PATH ;;
esac
- eval "old=$$library_path_var"
+ eval "old=\$$library_path_var"
eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
eval "export $library_path_var"
@@ -43189,7 +43189,7 @@
*) library_path_var=LD_LIBRARY_PATH ;;
esac
- eval "old=$$library_path_var"
+ eval "old=\$$library_path_var"
eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
eval "export $library_path_var"
@@ -43305,7 +43305,7 @@
*) library_path_var=LD_LIBRARY_PATH ;;
esac
- eval "old=$$library_path_var"
+ eval "old=\$$library_path_var"
eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
eval "export $library_path_var"