Looking for building instructions for xnu repo
Looking for building instructions for xnu repo
- Subject: Looking for building instructions for xnu repo
- From: Jaikiran Pai via Darwin-kernel <email@hidden>
- Date: Wed, 16 Oct 2024 19:13:24 +0530
Hello everyone,
I am looking for some inputs on building the xnu source that's published
at https://github.com/apple-oss-distributions/xnu/. The README.md in
that repo seems to indicate that it should be buidable locally
https://github.com/apple-oss-distributions/xnu/blob/main/README.md.
However, I have tried various times to get the build to work on my local
macosx M1 but haven't been able to.
I initially tried with:
make SDKROOT=/
and that runs into a lot of errors, the last one saying:
"Could not determine xnu version from SDK or KDK! Set
RC_DARWIN_KERNEL_VERSION environment variable.. Stop."
So I then find out what the RC_DARWIN_KERNEL_VERSION value is in
/System/Library/Extensions/System.kext/Info.plist and then launch the
build as follows:
RC_DARWIN_KERNEL_VERSION=23.6.0 make SDKROOT=/
That too fails with an error and surprising it seems to have picked up
x86_64 as the architecture even though I am on macosx M1 (arm64). That
seems to contradict the README.md which states that it defaults to the
architecture of the current system. The build errors are:
CC mkmakefile.o
GENERATE kasan-blacklist-x86_64
GENERATE kasan-blacklist-arm64
GENERATE kcov-blacklist-arm64
GENERATE kcov-blacklist-x86_64
GENERATE bsd/sys/_symbol_aliasing.h
Unable to locate
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk//usr/local/libexec/availability.pl
(or not executable)
make[5]: *** [_symbol_aliasing.h] Error 1
make[4]: *** [build_setup] Error 2
make[3]: *** [build_setup_recurse_into_sys] Error 2
make[2]: *** [build_setup_recurse_into_bsd] Error 2
make[2]: *** Waiting for unfinished jobs....
/xnu/SETUP/config/mkmakefile.c:701:6: warning: variable 'lpos' set but
not used [-Wunused-but-set-variable]
int lpos, len = 0; /* dvw: init to 0 */
^
1 warning generated.
LD config
CODESIGN config
make[1]: *** [build_setup_bootstrap_DEVELOPMENT^X86_64^NONE] Error 2
So I then decide to explicitly set the arch as follows:
RC_DARWIN_KERNEL_VERSION=23.6.0 make SDKROOT=/ ARCH_CONFIGS=arm64
but that too fails (although this time it seems to have picked up arm
architecture):
GENERATE bsd/sys/_symbol_aliasing.h
Unable to locate
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk//usr/local/libexec/availability.pl
(or not executable)
make[5]: *** [_symbol_aliasing.h] Error 1
make[4]: *** [build_setup] Error 2
make[3]: *** [build_setup_recurse_into_sys] Error 2
make[2]: *** [build_setup_recurse_into_bsd] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [build_setup_bootstrap_DEVELOPMENT^ARM64^VMAPPLE] Error 2
make: *** [all] Error 2
So, are the instructions in the README.md not up-to-date? Is there a way
I can build that repo locally?
-Jaikiran
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden