-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
./configure command with custom OpenSSL directory is ommitting any "-L" in the path #5519
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
Comments
Check your When I build OpenSSL with a custom dir I get this logged:
|
I get similar logs with the correct directories (i.e. the "-L" in the path is not ommited).
After that the build script keeps performing checks.. the very first check goes like this (with the correct path passed to the gcc command)..
Then right after that this happens..
Notice the directory is supposed to be Project-Linux but the -L gets ommited. I found this line in the configure file..
which does ommit the -L in the path. |
Removing the But the "checking for HMAC_Update in -lcrypto" looks suspicious and is the true reason for your problem. Why does that fail? It looks like a pthread problem: |
Or perhaps it succeeds a little further down. in the later checks? |
What OpenSSL version are you trying to link with like this? |
Removing the first The build script as far as I understand, performs many checks that don't necessarily succeed, so the first check that fails is because of missing libraries (pthread and dl) in the compilation command. I tried removing the line I mentioned above (the one that removes the I'm using OpenSSL version 1.1.1g |
Again, the problem happens when the OpenSSL path contains -L in it. The linking command for this path should look like this but after performing this line
it becomes Notice the A-L became just A. |
Oh. So then isn't this the fix? --- a/configure.ac
+++ b/configure.ac
@@ -1719,11 +1719,11 @@ if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
AC_SUBST(SSL_LIBS)
AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"])
AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"])
- LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'`
+ LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/^-L//'`
dnl use the values pkg-config reported. This is here
dnl instead of below with CPPFLAGS and LDFLAGS because we only
dnl learn about this via pkg-config. If we only have
dnl the argument to --with-ssl we don't know what |
Assuming of course there's only one -L and that's firsrt... |
I believe so, yes. |
In the logic that works out if a given OpenSSL path works, it stripped off a possibly leading -L flag using an incorrect sed pattern which would remove all instances of -L in the string, including if the path itself contained that two-letter sequence! The same pattern was used and is now updated in multiple places. Now it only removes -L if it starts the strings. Reported-by: Mohamed Osama Fixes #5519
I'm trying to build curl with OpenSSL installed in a custom directory using the command
./configure PKG_CONFIG_PATH=/home/mosa/dev/Project-Linux/libs/openssl/lib/pkgconfig --disable-shared --enable-static --enable-ipv6 --with-ssl=/home/mosa/dev/Project-Linux/libs/openssl/
and it gives the error
configure: error: --with-ssl was given but OpenSSL could not be detected
OpenSSL is installed in:
/home/mosa/dev/Project-Linux/libs/openssl/
Also openssl.pc in
/home/mosa/dev/Project-Linux/libs/openssl/lib/pkgconfig
hasprefix=/home/mosa/dev/Project-Linux/libs/openssl/
After reading the config.log file I found this part
Notice the gcc command is ommiting the "-L" part in the path "Project-Linux".
curl version is: 7.70.0
uname -a: Linux mosa-Inspiron-3593 5.4.0-33-generic #37-Ubuntu SMP Thu May 21 12:53:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: