[MacPorts] #68095: yorick: Outdated embedded SDK path in macOS 11 binaries causes build failure of dependents
MacPorts
noreply at macports.org
Wed Aug 30 08:39:52 UTC 2023
#68095: yorick: Outdated embedded SDK path in macOS 11 binaries causes build
failure of dependents
------------------------+----------------------
Reporter: ryandesign | Owner: paumard
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Keywords: bigsur | Port: yorick
------------------------+----------------------
Ports depending on yorick fail to build on macOS 11, e.g. yorick-
optimpack:
https://build.macports.org/builders/ports-
11_x86_64-builder/builds/125665/steps/install-port/logs/stdio
{{{
/usr/bin/clang -O2 -pipe
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -arch
x86_64 -DOP_INTEGER=long -DPLUG_IN -I. -I/opt/local/lib/yorick/include -o
op_lnsrch.o -c ../op_lnsrch.c
/usr/bin/clang -O2 -pipe
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -arch
x86_64 -DOP_INTEGER=long -DPLUG_IN -I. -I/opt/local/lib/yorick/include -o
op_utils.o -c ../op_utils.c
/usr/bin/clang -O2 -pipe
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -arch
x86_64 -DOP_INTEGER=long -DPLUG_IN -I. -I/opt/local/lib/yorick/include -o
op_vmlmb.o -c ../op_vmlmb.c
/opt/local/lib/yorick/lib/codger w OptimPack1 OptimPack1.i
found OptimPack1.i in current directory
/usr/bin/clang -O2 -pipe
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -arch
x86_64 -DOP_INTEGER=long -DPLUG_IN -I. -I/opt/local/lib/yorick/include
-c -o ywrap.o ywrap.c
clang: warning: no such sysroot directory:
'/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk' [-Wmissing-
sysroot]
clang: warning: no such sysroot directory:
'/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk' [-Wmissing-
sysroot]
clang: warning: no such sysroot directory:
'/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk' [-Wmissing-
sysroot]
clang: warning: no such sysroot directory:
'/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk' [-Wmissing-
sysroot]
../op_lnsrch.c:38:10: fatal error: 'math.h' file not found
../op_utils.c:35:../op_vmlmb.c:#include <math.h>
^~~~~~~~
42:10:10: fatal error: fatal error: 'math.h' file not found'math.h' file
not found
#include <math.h>
#include <math.h>
^~~~~~~~
^~~~~~~~
1 error generated.
1 error generated.
1 error generated.
make: *** [op_utils.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [op_lnsrch.o] Error 1
make: *** [op_vmlmb.o] Error 1
}}}
This happens because /opt/local/lib/yorick/Make.cfg contains:
{{{
Y_CFLAGS=-pipe
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -arch
arm64
Y_LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names
-Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk
-arch arm64
}}}
Specifically, the reference to MacOSX11.0.sdk is the problem because there
is no such SDK anymore in current versions of Xcode for macOS 11. There is
a MacOSX11.3.sdk directory and a MacOSX11.sdk symlink pointing to it.
The yorick 2.2.04 binaries for Big Sur were built in January 2021 at which
time MacPorts 2.6.4 was in use, which was not fully compatible with the
changes in version numbering Apple made in macOS 11. At the time, we did
not yet know how Apple would number future macOS and SDK versions.
Corrected version handling was implemented in MacPorts 2.7.0 released in
May 2021 (#61866).
The immediate solution for the build failures on macOS 11 is to increase
the revision of the yorick port which will rebuild it with a fixed version
of MacPorts base so that a usable SDK path is used, and then to schedule
new builds on the macOS 11 buildbot workers for the ports that depend on
yorick.
However, baking the SDK path into Make.cfg is probably wrong; it should
probably be removed entirely e.g. with `reinplace`.
--
Ticket URL: <https://trac.macports.org/ticket/68095>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list