Discussion:
Building alping on MacOS fails looking for OpenSSL_version_num
(too old to reply)
John Levine
2023-09-09 14:26:01 UTC
Permalink
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, ***@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly
Kalevi Kolttonen
2023-09-09 18:21:06 UTC
Permalink
Post by John Levine
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
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
Kalevi Kolttonen
2023-09-09 18:22:12 UTC
Permalink
Post by Kalevi Kolttonen
2) You did not mention OS, so guessing MacOS
Oops, sorry. It was mentioned in the Subject.

br,
KK
John Levine
2023-09-10 03:17:10 UTC
Permalink
Post by Kalevi Kolttonen
Post by John Levine
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
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
Well, duh. It used to work, dunno whether I just happened to have
a different library or what.
Post by Kalevi Kolttonen
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, ***@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly
Eduardo Chappa
2023-09-10 14:34:40 UTC
Permalink
Post by John Levine
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?
Post by John Levine
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)
John Levine
2023-09-17 22:08:36 UTC
Permalink
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 \
Post by John Levine
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, ***@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly
Eduardo Chappa
2023-09-18 03:06:53 UTC
Permalink
Post by John Levine
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)
John Levine
2023-09-19 22:40:23 UTC
Permalink
Post by Eduardo Chappa
Post by John Levine
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, ***@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly
Loading...