Opened 2 years ago

#65275 new defect

openssl11 @1.1.1n_0+universal: does not respect macosx_deployment_target configuration option

Reported by: pierswalter (Piers Uso Walter) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: Cc: larryv@…, larryv (Lawrence Velázquez), cal@…, neverpanic (Clemens Lang)
Port: openssl11

Description

I am trying to build OpenSSL 1.1 static libraries that will be linked into an application that will run on older operating systems. Specifically, I would like the x86_64 version to support macOS 10.12 or higher (and possibly the arm64 version to support macOS 11 or higher, but I could do without arm for the time being).

Since I'm building on macOS 12, the deployment target in the built library is automatically set to minos 12.0. So the library can only be used on macOS 12.0 or higher.

Xcode provides the MACOSX_DEPLOYMENT_TARGET setting to control this.

When I last built OpenSSL libraries via MacPorts (in Nov. 2020), I used the openssl port, which built OpenSSL 1.1.1h at the time. This port allowed to use the unsupported configuration option macosx_deployment_target to achieve what I wanted.

To do so, I added the following line to /opt/local/etc/macports/macports.conf:
macosx_deployment_target 10.12

Nowadays, however, the openssl port has been updated to OpenSSL 3, so I'm using the openssl11 port instead.

Unfortunately, the openssl11 port seems to ignore the configuration option macosx_deployment_target, so I am not able to build a library version that would support macOS 10.12.

I've spent the better part of the day trying to understand the port file in an attempt to add support for this configuration option, but I must admit that I still don't really understand how the system works, so I was unsuccessful.

Hence I'm writing this ticket, hoping that there is an easy way to achieve what I'm looking for.
If not, would this be considered a bug that could be fixed? (I tentatively classify this ticket as type defect)

Change History (0)

Note: See TracTickets for help on using tickets.