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=gmail.com; s=20230601; t=1729086207; x=1729691007; darn=lists.apple.com; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=T+tEFwuEHDy5v2p+00pTQ2hxCJp/syZ5sQwSsnB1Lz4=; b=G9dV/dYUnb3rzLoIb+ZA5s5fxuh3Ga3ggXYrt8CWv9Tsyq5LrWrQ17ylqMigTP1quH 8fxZ7BwObsi7Qg2LhPlJSiRoNkQtAoGpBj8UMLclrKmRxFuwwBt2TGVm9xg/Zhvg2l2n SO7Y5ZsU/fu4n45TGzBH+4vbgfAmixNFrMNUMxwB7w38w3n33scou4vGWs0YTl4Rf2Rc 5KXqXVuQMePdBNcfxHtaStA2Yp7Ynj8UdAbfgFHP2WecNIi9t9Y9uo6cm6qjGDg96mL7 0s8o7VPqKez73J5J6L38VVcauRKnWOBYxgYxqoNuJMGYYu3plBJao0bqkSSnFpVWiW2W W7BA== User-agent: Mozilla Thunderbird Hello everyone, I initially tried with: make SDKROOT=/ and that runs into a lot of errors, the last one saying: RC_DARWIN_KERNEL_VERSION=23.6.0 make SDKROOT=/ 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 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.... 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 GENERATE bsd/sys/_symbol_aliasing.h 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 -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/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com 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. "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: 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: Unable to locate /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk//usr/local/libexec/availability.pl (or not executable) /xnu/SETUP/config/mkmakefile.c:701:6: warning: variable 'lpos' set but not used [-Wunused-but-set-variable] but that too fails (although this time it seems to have picked up arm architecture): Unable to locate /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk//usr/local/libexec/availability.pl (or not executable) So, are the instructions in the README.md not up-to-date? Is there a way I can build that repo locally?
participants (1)
-
Jaikiran Pai via Darwin-kernel