Re: Looking for building instructions for xnu repo
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1729090028; x=1729176428; bh=fH/TJGuj2t11e8atd4aEAnJPF7ZB l+Clg+R+aQKQ8hI=; b=jQCMKUKxPi5u61pET6Qf76gm1ExwPsaMgTnI1zjRm1y2 ARhb6XK3A1sfD0espegchmCaXhdveKHFn9z338XzjLwlK2+ZiQ1knpFcmju2BNOn kphY42Jfy8LETaAe5RwDM47l8rbLiaEdhIB26OYcEB6Bknj2WCiVUwmw1m/GdWY0 lRm+PZPt6FpGo49UJwEoKY5WuSE/POjfSz++tRfJQwJ92ClC39FoFjIarTUdjV5j ivbr3MywtpwrDF2gRfxVGtmUWaA6TgnRL8t+ppUvs69JAupHWfKI7R7fZ6D1CEa+ iEVw8E8YsPxABo19ysI7g5+2hPo7DLhRHXwyLLsTpg== Feedback-id: i414946fb:Fastmail Install Xcode and point the SDK root to a macOS SDK with the Xcode bundle. I can’t get a path this moment, but that should get you started. On Wed, Oct 16, 2024, at 9:43 AM, Jaikiran Pai via Darwin-kernel wrote:
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 (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-kernel/shon%40fyrestead.com
This email sent to shon@fyrestead.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com
participants (1)
-
Shon Frazier via Darwin-kernel