Open mjl5007 opened 4 years ago
I'm having the exact same issue with openssl on macOS. My application is crashing on previous macOS version (I built using 10.15) because I'm unable to use VCPKG_OSX_DEPLOYMENT_TARGET to force openssl to build targetting a previous version of macOS. I'll try @mjl5007 solution though, as I already have setup a custom triplet file.
Like it's said in the Triplets documentation, a triplet is used to specify all the required cross-compilation options. Targetting an older version of the OS is part of those cross-compilation options. Please give us a clean way to set the deployment target, thanks a lot.
Edit: Proposed solution is working, thanks
Unfortunately, this isn't a priority for the team. However, if you would like to make these changes, I'll be more than willing to review them and help out :)
Could you please add a note to the documentation at least, as proposed in the original report?
Is this still an issue? Most ports should forward now.
cc @LilyWangLL
Doesn't work with zlib.
Is this still an issue? Most ports should forward now.
This appears to still affect (at minimum) the following ports:
Yes still and issue -- struggling with openssl. The OP suggested solution does not appear to be working as this port uses configure/make/perl to build itself. Any suggestion on how to get these flags to be respected by vcpkg_configure_make
?
Is your feature request related to a problem? Please describe. When building non-CMake-based ports on macOS (e.g.
openssl-unix
which is built withmake
), settingVCPKG_OSX_DEPLOYMENT_TARGET
in a triplet file has no effect on the build. That is, the port is built without the-mmacosx-version-min
compiler flag, which results in targeting the macOS version of the building machine rather than the version specified byVCPKG_OSX_DEPLOYMENT_TARGET
.Proposed solution Setting
VCPKG_OSX_DEPLOYMENT_TARGET
in a triplet file should set the deployment target (-mmacosx-version-min
compiler flag) for builds of non-CMake-based ports the same way it does for CMake-based ports.Describe alternatives you've considered At the very least, update the
triplet.md
documentation to call out thatVCPKG_OSX_DEPLOYMENT_TARGET
is ineffective for non-CMake-based ports.Alternatively, provide and/or document a different or additional way to specify the deployment target in a triplet file that works for non-CMake-based ports. For example, I was able to build
openssl-unix
on macOS 10.15 with a deployment target of 10.14 by adding the following to a triplet file: