• Building alping on MacOS fails looking for OpenSSL_version_num

    From John Levine@21:1/5 to All on Sat Sep 9 14:26:01 2023
    I'm trying to build alpine from the github repo. It never worked very well with libressl
    so I've installed openssl from homebrew. When I adjust the include and lib paths, the
    config script fails:

    checking if OpenSSL is LibreSSL... no
    checking Openssl library version >= 1.0.0c... yes
    checking Openssl library version >= 1.1.0... yes
    checking for library containing OpenSSL_version_num... no
    configure: error: crypto library NOT found

    It is trying to compile a test program that calls OpenSSL_version_num() but poking around stackoverflow it looks like that routine has been deprecated and maybe undeprecated. I've tried both openssl 1.1 and 3, same problem.

    Any suggestions? Using nm on the openssl libraries I don't see that routine.

    --
    Regards,
    John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
    Please consider the environment before reading this e-mail. https://jl.ly

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kalevi Kolttonen@21:1/5 to John Levine on Sat Sep 9 18:21:06 2023
    John Levine <johnl@taugh.com> wrote:
    I'm trying to build alpine from the github repo. It never worked very well with libressl
    so I've installed openssl from homebrew. When I adjust the include and lib paths, the
    config script fails:

    checking if OpenSSL is LibreSSL... no
    checking Openssl library version >= 1.0.0c... yes
    checking Openssl library version >= 1.1.0... yes
    checking for library containing OpenSSL_version_num... no
    configure: error: crypto library NOT found

    It is trying to compile a test program that calls OpenSSL_version_num() but poking around stackoverflow it looks like that routine has been deprecated and
    maybe undeprecated. I've tried both openssl 1.1 and 3, same problem.

    Any suggestions? Using nm on the openssl libraries I don't see that routine.

    Well, if you don't see that symbol, then obviously
    the library does not have it, right? Anyway:

    1) You did not mention github URL, so assuming
    https://github.com/alpinemail/alpine
    2) You did not mention OS, so guessing MacOS
    3) You did not mention the exact OpenSSL 3 version

    First of all, after I did "git clone", I can see that
    there is a directory called "openssl" and according to
    the README, it is OpenSSL 3.0.0-dev. So it seems to
    me that alpine ships with this library. But when I
    built alpine, it was not used.

    On my Fedora Linux 38, just running:

    ./configure
    make

    produces a working executable with OpenSSL dynamically
    linked in:

    foo$ ~/tmp/alp/alpine/alpine$ ldd alpine
    linux-vdso.so.1 (0x00007fff59cb9000)
    libcrypt.so.2 => /lib64/libcrypt.so.2 (0x00007f18a0eda000)
    libssl.so.3 => /lib64/libssl.so.3 (0x00007f18a0e37000)
    libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007f18a0a00000)
    libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007f18a09cd000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f18a07ef000)
    libz.so.1 => /lib64/libz.so.1 (0x00007f18a07d5000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f18a0f2c000)

    OpenSSL is 3.0.9:

    foo$ ~/tmp/alp/alpine/alpine$ rpm -qf /lib64/libcrypto.so.3 openssl-libs-3.0.9-2.fc38.x86_64

    I'd suggest installing OpenSSL 3.0.9 and trying to build
    against that.

    br,
    KK

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kalevi Kolttonen@21:1/5 to Kalevi Kolttonen on Sat Sep 9 18:22:12 2023
    Kalevi Kolttonen <kalevi@kolttonen.fi> wrote:
    2) You did not mention OS, so guessing MacOS

    Oops, sorry. It was mentioned in the Subject.

    br,
    KK

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Levine@21:1/5 to All on Sun Sep 10 03:17:10 2023
    According to Kalevi Kolttonen <kalevi@kolttonen.fi>:
    John Levine <johnl@taugh.com> wrote:
    I'm trying to build alpine from the github repo. It never worked very well with libressl
    so I've installed openssl from homebrew. When I adjust the include and lib paths, the
    config script fails:

    checking if OpenSSL is LibreSSL... no
    checking Openssl library version >= 1.0.0c... yes
    checking Openssl library version >= 1.1.0... yes
    checking for library containing OpenSSL_version_num... no
    configure: error: crypto library NOT found

    It is trying to compile a test program that calls OpenSSL_version_num() but >> poking around stackoverflow it looks like that routine has been deprecated and
    maybe undeprecated. I've tried both openssl 1.1 and 3, same problem.

    Any suggestions? Using nm on the openssl libraries I don't see that routine.

    Well, if you don't see that symbol, then obviously
    the library does not have it, right? Anyway:

    Well, duh. It used to work, dunno whether I just happened to have
    a different library or what.

    1) You did not mention github URL, so assuming
    https://github.com/alpinemail/alpine
    3) You did not mention the exact OpenSSL 3 version

    It's OpenSSL 3.1.2 from homebrew, the Mac ports collection. Installing
    random older versions of openssl would be rather painful so I'd rather
    figure out why it doesn't work with the current version.

    I built alpine from github source in May on an x86 Mac and it worked.
    Now I have an Apple silicon Mac and I'm trying to build a native
    version and I can't figure out what's changed.

    --
    Regards,
    John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
    Please consider the environment before reading this e-mail. https://jl.ly

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eduardo Chappa@21:1/5 to John Levine on Sun Sep 10 08:34:40 2023
    On Sat, 9 Sep 2023, John Levine wrote:

    I'm trying to build alpine from the github repo. It never worked very
    well with libressl so I've installed openssl from homebrew.

    What problems did you have?

    When I adjust the include and lib paths, the config script fails:

    checking if OpenSSL is LibreSSL... no
    checking Openssl library version >= 1.0.0c... yes
    checking Openssl library version >= 1.1.0... yes
    checking for library containing OpenSSL_version_num... no
    configure: error: crypto library NOT found

    Can you send me offline a copy of the file crypto.h from the headers of openssl. Mine are at /usr/include/openssl. Yours are at the adjusted
    location of your lib path.

    Thank you.

    --
    Eduardo
    https://alpineapp.email (web)
    http://repo.or.cz/alpine.git (Git)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Levine@21:1/5 to All on Sun Sep 17 22:08:36 2023
    Still can't get it to compile.

    I'm trying to build alpine on an M1 Mac from the github repo. The
    system for some reason includes the libressl version of the openssl
    program, but none of the libraries or include files, so I've installed
    openssl 1.1 from homebrew.

    I build it like this:

    ./configure \
    --enable-from-encoding --with-local-password-cache-method \
    --with-ssl-dir=/usr/local/opt/openssl@1.1

    The config script still fails:

    checking if OpenSSL is LibreSSL... no
    checking Openssl library version >= 1.0.0c... yes
    checking Openssl library version >= 1.1.0... yes
    checking for library containing OpenSSL_version_num... no
    configure: error: crypto library NOT found

    It is trying to compile a test program that calls
    OpenSSL_version_num() which I see got undeprecated. It's in the
    include files, and it's there in the libcrypto library, but I can't
    get the test build to work. LIBS=-lcrypto to force it to search the
    library didn't help.

    Advice would be appreciated. IF you want I can send you an sh -x trace of what config does.



    --
    Regards,
    John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
    Please consider the environment before reading this e-mail. https://jl.ly

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eduardo Chappa@21:1/5 to John Levine on Sun Sep 17 21:06:53 2023
    On Sun, 17 Sep 2023, John Levine wrote:

    It is trying to compile a test program that calls OpenSSL_version_num()
    which I see got undeprecated. It's in the include files, and it's there
    in the libcrypto library, but I can't get the test build to work. LIBS=-lcrypto to force it to search the library didn't help.

    Advice would be appreciated. IF you want I can send you an sh -x trace
    of what config does.

    The file confi.log has the information that is needed. Would you mind
    sharing it with me?

    Thank you.

    --
    Eduardo
    https://alpineapp.email (web)
    http://repo.or.cz/alpine.git (Git)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Levine@21:1/5 to All on Tue Sep 19 22:40:23 2023
    According to Eduardo Chappa <chappa@washington.edu>:
    On Sun, 17 Sep 2023, John Levine wrote:

    It is trying to compile a test program that calls OpenSSL_version_num()
    which I see got undeprecated. It's in the include files, and it's there
    in the libcrypto library, but I can't get the test build to work.
    LIBS=-lcrypto to force it to search the library didn't help.

    Advice would be appreciated. IF you want I can send you an sh -x trace
    of what config does.

    The file confi.log has the information that is needed. Would you mind
    sharing it with me?

    Aha, that explained it. Something is screwed up with homebrew, so it
    is installing x86 libraries on an arm64 Mac.

    I'll let you know if I figure it out,

    --
    Regards,
    John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
    Please consider the environment before reading this e-mail. https://jl.ly

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)