Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Building alping on MacOS fails looking for OpenSSL_version_num

29 views
Skip to first unread message

John Levine

unread,
Sep 9, 2023, 10:26:04 AM9/9/23
to
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, jo...@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly

Kalevi Kolttonen

unread,
Sep 9, 2023, 2:21:09 PM9/9/23
to
John Levine <jo...@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

Kalevi Kolttonen

unread,
Sep 9, 2023, 2:22:14 PM9/9/23
to
Kalevi Kolttonen <kal...@kolttonen.fi> wrote:
> 2) You did not mention OS, so guessing MacOS

Oops, sorry. It was mentioned in the Subject.

br,
KK

John Levine

unread,
Sep 9, 2023, 11:17:13 PM9/9/23
to
According to Kalevi Kolttonen <kal...@kolttonen.fi>:
>John Levine <jo...@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.

Eduardo Chappa

unread,
Sep 10, 2023, 10:34:45 AM9/10/23
to
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)

John Levine

unread,
Sep 17, 2023, 6:08:38 PM9/17/23
to
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.

Eduardo Chappa

unread,
Sep 17, 2023, 11:06:59 PM9/17/23
to
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?

John Levine

unread,
Sep 19, 2023, 6:40:26 PM9/19/23
to
According to Eduardo Chappa <cha...@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,
0 new messages