diff options
author | jperkin <jperkin@pkgsrc.org> | 2020-10-09 16:00:16 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2020-10-09 16:00:16 +0000 |
commit | 813ca3f29d3cfd38bbfaab53d33d6047d40f31fc (patch) | |
tree | 732435334056d016c8dc29a43d6f5fb73662aa49 /mk/platform | |
parent | e0aeccc1444a3c2e58134e0216d3b7ead5afc215 (diff) | |
download | pkgsrc-813ca3f29d3cfd38bbfaab53d33d6047d40f31fc.tar.gz |
mk: Handle missing system libraries on Big Sur.
The new release of macOS removes system libraries from the file system, only
providing access to them via a linker cache and dlopen(). This obviously
breaks many assumptions about how libraries work on Unix systems, and so we
unfortunately need to cripple various checks when running on those systems.
Introduce DARWIN_NO_SYSTEM_LIBS which, when defined, will trigger alternate
behaviour in the infrastructure. Currently this is in two places:
* In CHECK_SHLIBS, skip any path beginning with /usr/lib.
* In registered package metadata, any path beginning with /usr/lib is
removed from REQUIRES.
The former fixes all package builds, while the second will be necessary for
package managers such as pkgin, as they will no longer be able to verify that
those files are available on the target system.
This is obviously a gross hack, and removes our ability to ensure that the
target system is suitable for the packages we are attempting to install, but
Apple have left us with no alternative, and users will unfortunately be left
to find out at runtime instead.
It's likely this will need to be extended to /System/Library paths too, but
this is required first to actually get packages building before we can start
running bulk builds.
Diffstat (limited to 'mk/platform')
-rw-r--r-- | mk/platform/Darwin.mk | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/mk/platform/Darwin.mk b/mk/platform/Darwin.mk index 412e3fb66fd..dbdab98d3cd 100644 --- a/mk/platform/Darwin.mk +++ b/mk/platform/Darwin.mk @@ -1,4 +1,4 @@ -# $NetBSD: Darwin.mk,v 1.98 2020/08/21 21:29:16 sjmulder Exp $ +# $NetBSD: Darwin.mk,v 1.99 2020/10/09 16:00:16 jperkin Exp $ # # Variable definitions for the Darwin operating system. @@ -120,6 +120,16 @@ PKG_FAIL_REASON+= "No suitable Xcode SDK or Command Line Tools installed." . endif .endif +# +# Newer macOS releases remove library files from the file system. The only way +# to test them is via dlopen(), which is obviously impractical for many things. +# +# This define turns off anything that can't reasonably supported this. +# +.if ${OS_VERSION:R} >= 20 +DARWIN_NO_SYSTEM_LIBS= # defined +.endif + .if ${OS_VERSION:R} >= 6 _OPSYS_HAS_INET6= yes # IPv6 is standard .else |