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

Crypto Configure Fails When Using --with-ssl Path on Windows #6024

Closed
andrewcln opened this issue May 26, 2022 · 3 comments
Closed

Crypto Configure Fails When Using --with-ssl Path on Windows #6024

andrewcln opened this issue May 26, 2022 · 3 comments
Assignees
Labels
bug Issue is reported as a bug team:PS Assigned to OTP team PS

Comments

@andrewcln
Copy link

Describe the bug

When building on Windows, and using a custom SSL static library path, the logic in configure.ac does not set the lib_bits variable. This causes configure to look for libraries of the form libcryptoMD rather than libcrypto<bitness>MD.

To Reproduce

In lib/crypto run ./configure --with_ssl="/cygdrive/c/your-static-ssl-lib-build" --disable-dynamic-ssl-lib

Expected behavior

I believe the code should search in the supplied path using the relevant <bitness> token in the library names.

Affected versions
Seen in lib/crypto/configure.in in OTP 24.3.4 but is also in OTP 25 lib/crypto/configure.ac

Additional context

The configure.in/ac script sets lib_bits if with_ssl=yes, as well as standard Windows SSL search paths. This logic could be repeated in the case clause that covers when with_ssl is a path as show in the OTP 24.3.4 diff below (configure.ac in OTP 25 is similar):

--- otp-24.3.4/lib/crypto/configure.in          2022-05-02 11:26:51.000000000 +0100
+++ otp-24.3.4/lib/crypto/configure.in.new      2022-05-26 14:37:12.886100205 +0100
@@ -563,6 +563,12 @@
     else
        AC_MSG_ERROR([no OpenSSL header found in $with_ssl_incl])
     fi
+    if test "$host_os" = "win32" ; then
+        lib_bits=32
+        if test "x$ac_cv_sizeof_void_p" = "x8"; then
+            lib_bits=64
+        fi
+    fi
     SSL_INCDIR="$with_ssl_incl"
     AC_MSG_CHECKING([for OpenSSL in $with_ssl])
     ERL_CRYPTO_CHECK_LIB(["$with_ssl_incl"], [""], ["$with_ssl"])
@andrewcln andrewcln added the bug Issue is reported as a bug label May 26, 2022
@rickard-green rickard-green added the team:PS Assigned to OTP team PS label May 26, 2022
@sverker
Copy link
Contributor

sverker commented Jun 7, 2022

@andrewcln Thanks for the report and proposed solution. Could you test #6056 and see that also solves your problem.

@andrewcln
Copy link
Author

Yes, that works well, thanks.

@IngelaAndin
Copy link
Contributor

#6056 Merged

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:PS Assigned to OTP team PS
Projects
None yet
Development

No branches or pull requests

5 participants