Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure fails with "--with-openssl=" option for curl 8.1.1 #11187

Closed
micwinxx opened this issue May 23, 2023 · 8 comments
Closed

configure fails with "--with-openssl=" option for curl 8.1.1 #11187

micwinxx opened this issue May 23, 2023 · 8 comments

Comments

@micwinxx
Copy link

I did this

wget https://curl.se/download/curl-8.1.1.tar.gz
tar xvzf curl-8.1.1.tar.gz
cd curl-8.1.1
./configure --disable-shared --with-openssl=my_local_path_to_openssl-3.0.8_install
fails with:

checking run-time libs availability... failed
configure: error: one or more libs available at link-time are not available run-time. Libs used at link-time: -lssl -lcrypto -lssl -lcrypto   -lz 

I expected the following

configure to run through (it works until 8.1.0)

curl/libcurl version

8.1.1

operating system

linux (centos7.9)
Linux machine-name 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

@micwinxx
Copy link
Author

Note that usually I also have some more option, e.g., "--without-zlib" which gets rid of the -lz part of the error.

@bagder
Copy link
Member

bagder commented May 23, 2023

A variation of #11179 perhaps? Can you try to build from git or apply the fix from #11180 to see if it makes a difference?

@micwinxx
Copy link
Author

For current master 1fe8de8 but also for tag curl-8_1_1 everything works (I did not apply any extra commit); here is what I did:

git clone https://github.com/curl/curl.git curl-master
cd curl-master
(git checkout curl-8_1_1)
autoreconf -fi
configure --disable-shared --with-openssl=my_local_path_to_openssl-3.0.8_install --without-zlib
make

This runs through. Could it be possible that the configure script of the downloadable tar.gz package is somehow corrupted?

I can see that the configure script in the downloadable package was created with version 2.71 while on my system it uses 2.69.

@micwinxx
Copy link
Author

I did another test, I just switched out the configure script that is shipped within the 8.1.1 tar.gz package with the one that is shipped within the 8.1.0 tar.gz package. With this configure script everything runs through.

Here is the diff between the 8.1.0 and the 8.1.1 configure script:

1963c1963
<     --disable-rtsp          Disable RTSP support
---
>   --disable-rtsp          Disable RTSP support
2051c2051
<     --disable-hsts          Disable HSTS support
---
>   --disable-hsts          Disable HSTS support
6677a6678,6682
> compilersh="run-compiler"
> echo "CC=$CC" > $compilersh
> echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $compilersh
> echo 'exec $CC $@' >> $compilersh
> 
18678a18684
>       oldcc=$CC
18679a18686
>       CC="sh ./run-compiler"
18723a18731
>       CC=$oldcc
19007a19016
>       oldcc=$CC
19008a19018
>       CC="sh ./run-compiler"
19052a19063
>       CC=$oldcc
20671a20683
>       oldcc=$CC
20672a20685
>       CC="sh ./run-compiler"
20716a20730
>       CC=$oldcc
22318d22331
< 
22320d22332
< 
23553a23566
>       oldcc=$CC
23554a23568
>       CC="sh ./run-compiler"
23611a23626
>       CC=$oldcc
25219a25235
>       oldcc=$CC
25220a25237
>       CC="sh ./run-compiler"
25259a25277
>       CC=$oldcc
34696a34715
>       oldcc=$CC
34697a34717
>       CC="sh ./run-compiler"
34730a34751
>       CC=$oldcc
35231a35253
>       oldcc=$CC
35232a35255
>       CC="sh ./run-compiler"
35267a35291
>       CC=$oldcc
37912a37937
>       oldcc=$CC
37913a37939
>       CC="sh ./run-compiler"
37977a38004
>       CC=$oldcc
39469a39497
>       oldcc=$CC
39470a39499
>       CC="sh ./run-compiler"
39520a39550
>       CC=$oldcc
39761a39792
>       oldcc=$CC
39762a39794
>       CC="sh ./run-compiler"
39812a39845
>       CC=$oldcc
40118a40152
>       oldcc=$CC
40119a40154
>       CC="sh ./run-compiler"
40211a40247
>       CC=$oldcc
40460a40497
>       oldcc=$CC
40461a40499
>       CC="sh ./run-compiler"
40546a40585
>       CC=$oldcc
41384a41424
>       oldcc=$CC
41385a41426
>       CC="sh ./run-compiler"
41447a41489
>       CC=$oldcc
43162a43205
>       oldcc=$CC
43163a43207
>       CC="sh ./run-compiler"
43216a43261
>       CC=$oldcc
43328a43374
>       oldcc=$CC
43329a43376
>       CC="sh ./run-compiler"
43382a43430
>       CC=$oldcc
45442d45489
< 
45619a45667,45668
> 
> rm $compilersh

So it seems that the run-compiler logic is not working correctly.

@bagder
Copy link
Member

bagder commented May 23, 2023

which is exactly why I asked:

A variation of #11179 perhaps?

... and this is fixed already in master with #11180 ...

@tawmoto
Copy link

tawmoto commented May 23, 2023

A variation of #11179 perhaps? Can you try to build from git or apply the fix from #11180 to see if it makes a difference?

I tried it and it does not work, because I don't use configure.ac at all, and that patch is applied to configure.ac
I use configure directly

this is my command

./configure --enable-ftp --enable-proxy --enable-ipv6 --enable-http --enable-nonblocking --enable-crypto-auth --enable-hidden-symbols --enable-soname-bump --enable-static --disable-shared --disable-dict --disable-ares --disable-telnet --disable-tftp --disable-manual --disable-rtsp --disable-file --disable-pop3 --disable-imap --disable-smtp --disable-ldap --disable-ldaps --disable-sspi --disable-ntlm --without-libssh2 --without-zlib --without-zstd --without-gnutls --without-nss --without-libidn --without-libidn2 --without-nghttp2 --without-librtmp --without-brotli --without-libpsl 

thanks

LE: not sure if I should post here, because I got the #11179 error, i will open another bug.

@micwinxx
Copy link
Author

which is exactly why I asked:

A variation of #11179 perhaps?

... and this is fixed already in master with #11180 ...

As I said, I'm not sure it has anything todo with a fix, since on the tag "curl-8_1_1" I cannot reproduce this behavior, see my post above.

As @tawmoto write, in the package I just use the provided configure script directly, on the git ckeckout version I use the autoreconf -fi command to create the configure script. So either the configure script in the packages was created differently, or the tag was changed later on, or he bug has not been addressed.

@micwinxx
Copy link
Author

It looks like what @Badger referred to in #11179 is a correct. The interesting thing is that even without this fix, autoreconf -i with version 2.69 still works, maybe just by pure luck, because it won't add the gnu11 or gnu99 test and $CC just ends up being gcc without any flags.
I verified that autoreconf version 2.69 with the fix from #11179 also works.

So the configure.ac script of version 8.1.1 did not work correctly with autoreconf version 2.71.
The bug seems to be fixed correctly.

@Badger, thank you for pointing it out twice and being persistent. The interplay of the autotools did not make it obvious it the beginning.

We can close this.

@tawmoto, you can apply the change of #11179 which is in the configure.ac script also directly in the configure script that comes with the tar.gz packages.
In particular you should verify that the block below looks the same in your configure script

compilersh="run-compiler"
echo "CC=\"$CC\"" > $compilersh
echo "LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH\"" >> $compilersh
echo 'exec $CC $@' >> $compilersh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants