This PR fixes the issue, at least for linux: https://github.com/curl/curl/pull/8230
--- a/m4/curl-functions.m4 2022-01-03 16:36:46.000000000 +0000 +++ b/m4/curl-functions.m4 2022-01-05 17:34:33.635107486 +0000 @@ -6515,16 +6515,21 @@ dnl changes contained within this macro. AC_DEFUN([CURL_RUN_IFELSE], [ case $host_os in - darwin*) library_path_var=DYLD_LIBRARY_PATH ;; - *) library_path_var=LD_LIBRARY_PATH ;; + darwin*) + old=$DYLD_LIBRARY_PATH + DYLD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export DYLD_LIBRARY_PATH + AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4) + DYLD_LIBRARY_PATH=$old # restore + ;; + *) + old=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export LD_LIBRARY_PATH + AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4) + LD_LIBRARY_PATH=$old # restore + ;; esac - - eval "old=$$library_path_var" - eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old" - - eval "export $library_path_var" - AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4) - eval "$library_path_var=\$old" # restore ]) dnl CURL_COVERAGE On Wed, Jan 5, 2022 at 12:29 PM Satadru Pramanik <sata...@gmail.com> wrote: > Relevant commit is: > https://github.com/curl/curl/commit/ba0657c343f0c3eff28f7d56cff3196c6443e0b9#diff-b63dc43a7804261e71d648333b4dd8ea0f67a64edb5f422381e9610501c79bc3 > > When I run autoreconf -fiv after replacing the above code with: > > dnl CURL_RUN_IFELSE > dnl ------------------------------------------------- > dnl Wrapper macro to use instead of AC_RUN_IFELSE. It > dnl sets LD_LIBRARY_PATH locally for this run only, from the > dnl CURL_LIBRARY_PATH variable. It keeps the LD_LIBRARY_PATH > dnl changes contained within this macro. > > AC_DEFUN([CURL_RUN_IFELSE], [ > case $host_os in > darwin*) library_path_var=DYLD_LIBRARY_PATH ;; > *) library_path_var=LD_LIBRARY_PATH ;; > esac > > eval "old=$$library_path_var" > eval "echo \$old = $$library_path_var" > eval "echo LD_LIBRARY_PATH = $LD_LIBRARY_PATH" > eval "echo CURL_LIBRARY_PATH = $CURL_LIBRARY_PATH" > eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old" > eval "echo \$library_path_var is $library_path_var" > eval "echo \$library_path_var = $$library_path_var" > eval "export $library_path_var" > AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4) > eval "$library_path_var=\$old" # restore > ]) > I get: > > checking if compiler accepts some basic options... 23359library_path_var = > 23359library_path_var > LD_LIBRARY_PATH = /usr/local/lib > CURL_LIBRARY_PATH = > LD_LIBRARY_PATH is LD_LIBRARY_PATH > LD_LIBRARY_PATH = 23359library_path_var > > The problem is $$ gives the PID, and you can not escape in M4 as per > https://mbreen.com/m4.html#quotes . > > On Wed, Jan 5, 2022 at 11:28 AM Satadru Pramanik <sata...@umich.edu> > wrote: > >> I get this error on both armv7l & i686 trying to run the configure script >> on ChromeOS inside Chromebrew with GCC 11.2. >> The configure script from curl 7.80.0 works. >> >> checking if X/Open network library is required... no >> checking for gethostbyname... no >> checking for gethostbyname in -lnsl... no >> checking for gethostbyname in -lsocket... no >> checking for gethostbyname in -lwatt... no >> checking for gethostbyname with both nsl and socket libs... no >> checking for gethostbyname for Minix 3... no >> checking for gethostbyname for eCos... no >> checking for gethostbyname for AmigaOS bsdsocket.library... no >> checking for gethostbyname in -lnetwork... no >> checking for gethostbyname in -lnet... no >> configure: error: couldn't find libraries for gethostbyname() >> >> on x86_64 it succeeds though: >> checking if X/Open network library is required... no >> checking for gethostbyname... yes >> >> on i686 and armv7l I see this in config.log from the 7.81.0 configure >> script: >> configure:21721: checking for gethostbyname >> configure:21721: i686-cros-linux-gnu-gcc -o conftest -O2 -pipe -flto >> -ffat-lto-objects -fPIC -fuse-ld=gold -flto conftest.c >&5 >> /usr/local/libexec/gcc/i686-cros-linux-gnu/11/cc1: error while loading >> shared libraries: libisl.so.23: cannot open shared object file: No such >> file or directory >> as: error while loading shared libraries: libopcodes-2.37.so: cannot >> open shared object file: No such file or directory >> configure:21721: $? = 1 >> configure: failed program was: >> ... >> configure:21721: result: no >> >> >> on i686 I see this in config.log from the 7.80.0 configure script: >> configure:21675: result: no >> configure:21679: checking for gethostbyname >> configure:21679: i686-cros-linux-gnu-gcc -o conftest -O2 -pipe -flto >> -ffat-lto-objects -fPIC -fuse-ld=gold -Werror-implicit-function-declaration >> -Wno-system-headers -Wenum-conversion -flto conftest.c >&5 >> configure:21679: $? = 0 >> configure:21679: result: yes >> >> Looks like some sort of LIBRARY_PATH issue in the 7.81.0 configure script? >> >> FYI, autoreconf -fi also gives a broken configure script. >> >> Thanks, >> >> Satadru Pramanik >> Chromebrew dev team >> >
-- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html