Uploaded image for project: 'Erlang/OTP'
  1. Erlang/OTP
  2. ERL-1025

Building Erlang with specific libcrypto library

    XMLWordPrintable

    Details

    • Type: Question
    • Status: Resolved
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 22.0
    • Fix Version/s: None
    • Component/s: crypto
    • Labels:
      None

      Description

      Hello,

      My question is about building Erlang 22.0 with a specific version of libcrypto.so (and libssl.so) than what is available on the system.The system in question is: Red Hat Enterprise Linux Server release 5.11 (Tikanga)

      The system has the following versions of the aforesaid libraries:

      [root@dev ~]$ll /lib64/libcrypto.so.6
      lrwxrwxrwx 1 root root 19 Jul 30 22:07 /lib64/libcrypto.so.6 -> libcrypto.so.0.9.8e
      [root@dev ~]$ll /lib64/libssl.so.6
      lrwxrwxrwx 1 root root 16 Jul 30 22:07 /lib64/libssl.so.6 -> libssl.so.0.9.8e

      When I build Erlang, it uses these libraries by default.

      I'd like Erlang to use different version of the libraries, so I copied the libraries and the corresponding headers in a directory, placing them together and separately under lib and include directories. Next, I ran configure as follows:

      ./configure --prefix=/root/Erlang-install --with-ssl=/root/openssl-libs-include

      ...where '/root/openssl-libs-include' is where the libraries and headers are placed. The configure went through and so did make. But when I check for crypto.so, it still points to the library in the system folder.

      [root@dev otp_src_22.0]$ldd ./lib/crypto/priv/lib/x86_64-unknown-linux-gnu/crypto.so
      linux-vdso.so.1 => (0x00007fff80bfd000)
      libcrypto.so.6 => /lib64/libcrypto.so.6 (0x00002b41e461a000)
      libc.so.6 => /lib64/libc.so.6 (0x00002b41e496b000)
      libdl.so.2 => /lib64/libdl.so.2 (0x00002b41e4cc4000)
      libz.so.1 => /usr/lib64/libz.so.1 (0x00002b41e4ec9000)
      /lib64/ld-linux-x86-64.so.2 (0x0000003790600000)

      What am I missing here?

      Next, I pointed libcrypto.so.6 and libssl.so.6 to the new libraries, and re-ran configure and make. At runtime, I see the following error:

      2019-08-14 05:17:36.698 [error] <0.409.0> Unable to load crypto library. Failed with error:
      "load, Library load-call unsuccessful (170)."

      2019-08-14 05:17:36.700 [warning] <0.410.0> The on_load function for module crypto returned:
      {error,{load,"Library load-call unsuccessful (170)."}}

      Any thoughts on what could be happening?

      Thanks a lot!
      Madhu

        Attachments

          Activity

            People

            Assignee:
            hans Hans Nilsson
            Reporter:
            madhurjf Madhusudan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: