./configure --with-ssl=/path/to/openssl broken #2586

Closed
bwalle opened this Issue May 18, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@bwalle
Contributor

bwalle commented May 18, 2018

After commit 2d4c215, configure doesn't work any more. It 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 call configure with --with-ssl=/path/to/openssl/lib/ with following contents:

engines/            libcrypto.so        libssl.a            libssl.so.1.0.0     
libcrypto.a         libcrypto.so.1.0.0  libssl.so           pkgconfig/          

The system contains

ls -l /usr/lib/x86_64-linux-gnu/libssl*
-rw-r--r-- 1 root root 357024 Okt  7  2017 /usr/lib/x86_64-linux-gnu/libssl3.so
-rw-r--r-- 1 root root 738444 Mär 29 12:51 /usr/lib/x86_64-linux-gnu/libssl.a
lrwxrwxrwx 1 root root     13 Mär 29 12:51 /usr/lib/x86_64-linux-gnu/libssl.so -> libssl.so.1.1
-rw-r--r-- 1 root root 431232 Mär 29 13:10 /usr/lib/x86_64-linux-gnu/libssl.so.1.0.2
-rw-r--r-- 1 root root 442920 Mär 29 12:51 /usr/lib/x86_64-linux-gnu/libssl.so.1.1

Even if I replace AC_TRY_RUN in CURL_VERIFY_RUNTIMELIBS with some code that sets LD_LIBRARY_PATH, the next test (AC_CHECK_SIZEOF) fails.

Reverting 2d4c215 works, but then #2492 is unresolved.

@bagder

This comment has been minimized.

Show comment
Hide comment
@bagder

bagder May 18, 2018

Member

The option wants the install prefix, not the lib directory. Which in your case probably would be configure --with-ssl=/path/to/openssl. Does that change anything?

If not, can you attach your config.log file after a failed run to let us have a look?

Member

bagder commented May 18, 2018

The option wants the install prefix, not the lib directory. Which in your case probably would be configure --with-ssl=/path/to/openssl. Does that change anything?

If not, can you attach your config.log file after a failed run to let us have a look?

@bwalle

This comment has been minimized.

Show comment
Hide comment
@bwalle

bwalle May 19, 2018

Contributor

Sorry, that was wrong in my report. I did call ./configure --with-ssl=/path/to/openssl.

Attached is the config.log.
config.log

Contributor

bwalle commented May 19, 2018

Sorry, that was wrong in my report. I did call ./configure --with-ssl=/path/to/openssl.

Attached is the config.log.
config.log

@bagder

This comment has been minimized.

Show comment
Hide comment
@bagder

bagder May 19, 2018

Member

Aha, I think I missed a line back in 2d4c215! Can you try if this fixes your problem? Run ./buildconf after applying this patch, then run ./configure again!

diff --git a/acinclude.m4 b/acinclude.m4
index 69bb6c002..81c16f9b1 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -3,11 +3,11 @@
 #  Project                     ___| | | |  _ \| |
 #                             / __| | | | |_) | |
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
 # are also available at https://curl.haxx.se/docs/copyright.html.
 #
@@ -2462,11 +2462,11 @@ AC_DEFUN([CURL_VERIFY_RUNTIMELIBS], [
   if test "x$cross_compiling" != xyes; then
 
     dnl just run a program to verify that the libs checked for previous to this
     dnl point also is available run-time!
     AC_MSG_CHECKING([run-time libs availability])
-    AC_TRY_RUN([
+    CURL_RUN_IFELSE([
 main()
 {
   return 0;
 }
 ],
Member

bagder commented May 19, 2018

Aha, I think I missed a line back in 2d4c215! Can you try if this fixes your problem? Run ./buildconf after applying this patch, then run ./configure again!

diff --git a/acinclude.m4 b/acinclude.m4
index 69bb6c002..81c16f9b1 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -3,11 +3,11 @@
 #  Project                     ___| | | |  _ \| |
 #                             / __| | | | |_) | |
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
 # are also available at https://curl.haxx.se/docs/copyright.html.
 #
@@ -2462,11 +2462,11 @@ AC_DEFUN([CURL_VERIFY_RUNTIMELIBS], [
   if test "x$cross_compiling" != xyes; then
 
     dnl just run a program to verify that the libs checked for previous to this
     dnl point also is available run-time!
     AC_MSG_CHECKING([run-time libs availability])
-    AC_TRY_RUN([
+    CURL_RUN_IFELSE([
 main()
 {
   return 0;
 }
 ],

bagder added a commit that referenced this issue May 19, 2018

configure: replace AC_TRY_RUN with CURL_RUN_IFELSE
A follow-up from 2d4c215 that omitted this line by mistake.

Fixes #2586
Reported-by: Bernhard Walle

@bagder bagder closed this in 302d537 May 21, 2018

bagder added a commit that referenced this issue May 21, 2018

configure: compile-time SIZEOF checks
... instead of exeucting code to get the size. Removes the use of
LD_LIBRARY_PATH for this.

Fixes #2586
Closes #2589
Reported-by: Bernhard Walle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment