Opened 2 months ago

Last modified 2 months ago

#70763 assigned defect

lftp @4.9.2_5 cannot compile with libressl installed

Reported by: SaintBol Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version: 2.10.1
Keywords: Cc:
Port: lftp

Description

Using Xcode clang compiler (Command Line Tools not present): cannot compile the port on macOS 15 Sequoia. Attached main.log

Issues:

:info:build lftp_ssl.cc:783:47: error: invalid application of 'sizeof' to an incomplete type 'X509_OBJECT' (aka 'x509_object_st')
:info:build   783 |     return (X509_OBJECT*)OPENSSL_malloc(sizeof(*ret));
:info:build       |                                               ^~~~~~

:info:build lftp_ssl.cc:789:5: error: use of undeclared identifier 'X509_OBJECT_free_contents'; did you mean 'X509_OBJECT_up_ref_count'?
:info:build   789 |     X509_OBJECT_free_contents(a);
:info:build       |     ^~~~~~~~~~~~~~~~~~~~~~~~~
:info:build       |     X509_OBJECT_up_ref_count

:info:build lftp_ssl.cc:795:10: error: member access into incomplete type 'X509_OBJECT' (aka 'x509_object_st')
:info:build   795 |     if (a->type != X509_LU_CRL) return NULL;
:info:build       |          ^

:info:build lftp_ssl.cc:796:13: error: member access into incomplete type 'X509_OBJECT' (aka 'x509_object_st')
:info:build   796 |     return a->data.crl;
:info:build       |             ^

:info:build lftp_ssl.cc:1214:43: error: member access into incomplete type 'X509_REVOKED' (aka 'x509_revoked_st')
:info:build  1214 |             const ASN1_INTEGER *revoked_serial = X509_REVOKED_get0_serialNumber(revoked);
:info:build       |                                                  ^

Attachments (1)

lftp-main.log (592.3 KB) - added by SaintBol 2 months ago.
main.log

Download all attachments as: .zip

Change History (11)

Changed 2 months ago by SaintBol

Attachment: lftp-main.log added

main.log

comment:1 Changed 2 months ago by jmroot (Joshua Root)

Keywords: sequoia added; Sequoia lftp removed
Owner: set to Schamschula
Priority: HighNormal
Status: newassigned

comment:2 Changed 2 months ago by jmroot (Joshua Root)

So this is with libressl installed, yes? Does it work with openssl?

comment:3 Changed 2 months ago by SaintBol

This is with libressl installed, as libressl is installed as a dependancy of installed ldns / rsync / libevent ports.

libressl wasn't requested, ldns / rsync / libevent were...

% sudo port -u uninstall libressl
Note: It is not recommended to uninstall/deactivate a port that has dependents as it breaks the dependents.
The following ports will break:
 ldns @1.8.3_1
 rsync @3.3.0_0
 libevent @2.1.12_2
Continue? [y/N]: n

% sudo port install openssl      
--->  Computing dependencies for openssl
Error: Can't install openssl because conflicting ports are active: libressl
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port openssl failed
Last edited 2 months ago by SaintBol (previous) (diff)

comment:4 Changed 2 months ago by jmroot (Joshua Root)

Keywords: sequoia removed
Summary: lftp @4.9.2_5 cannot compile on macOS 15 Sequoialftp @4.9.2_5 cannot compile with libressl installed

Ah, it's because of ldns being installed with +libressl. The default variant is +openssl.

comment:5 Changed 2 months ago by jmroot (Joshua Root)

This does highlight of course that libressl isn't fully compatible with openssl, and so quite a few ports probably shouldn't be using a dependency type that can be satisfied by either.

comment:6 Changed 2 months ago by Schamschula (Marius Schamschula)

On my machine I can't replicate this particular error, but I did run into the issue from ticket #70750: can't find <cmath>.

I have a local workaround for that. I just have to figure out how to best include it in the Portfile.

comment:7 Changed 2 months ago by Schamschula (Marius Schamschula)

P.S. I don't use libressl, but I have built it against both openssl and gnutls.

comment:8 Changed 2 months ago by Marius Schamschula <mschamschula@…>

In 35f96422837697c877c9388ef4bd2670eb063939/macports-ports (master):

lftp: fix build on Sequoia

See: #70763#comment:6

comment:9 Changed 2 months ago by SaintBol

Yes, it doesn't compile against libressl, but it does with openssl.

One of the followings ports triggered the installation of libressl:
 ldns @1.8.3_1
 rsync @3.3.0_0
 libevent @2.1.12_2

Uninstalled libressl (in spite of dependancy breaks complaints), installed openssl, which triggered the recompilation of the three broken ports, then lftp compiled properly.

Compiling against libressl by default is probably not (yet?) the thing to do?

Last edited 2 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:10 Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)

Ports that can use openssl or libressl use openssl by default. If you want libressl you have to install it manually first.

The ldns port has libressl and openssl variants. The openssl variant is the default. Maybe you chose the libressl variant.

It is unusual at this point for ports to offer such variants but presumably ldns needed to do so. The way that we are handling libressl in MacPorts—considering it to be a drop-in replacement for openssl—is flawed and needs to be overhauled. See #54744. After that, ports would offer variants to choose.

Note: See TracTickets for help on using tickets.