Contribute
Register

Failure to create WAG kext

  • Thread starter Deleted member 188658
  • Start date
Status
Not open for further replies.
D

Deleted member 188658

Guest
@miliuco

Hi,

Not sure where to post this question, but since a google brought up your avator, I thought I would post it here, where you seem to be very active.

I have followed (what I believe to be) your instructions at: https://github.com/acidanthera/bugtracker/issues/1913

When I get to the final step of building WAG's kext from within Xcode applicaton, the Build says it worked, but I the .kext does not get created. The only error I see in the app is:

ResourceConverter: Invalid usage
Program ended with exit code: 1


Building from the command line I get these warnings, and no .kext generated:
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -configuration Debug

User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES

note: Using new build system
note: Planning
Analyze workspace

Create build description
Build description signature: 4fabe993aec526108111c57d6f9c5c8e
Build description path: /Users/me/Projects/WhateverGreen/build/XCBuildData/4fabe993aec526108111c57d6f9c5c8e-desc.xcbuild

note: Build preparation complete
warning: Building targets in manual order is deprecated - check "Parallelize build for command-line builds" in the project editor, or set DISABLE_MANUAL_TARGET_ORDER_BUILD_WARNING in any of the targets in the current build to suppress this warning
warning: ONLY_ACTIVE_ARCH=YES requested with multiple ARCHS and no active architecture could be computed; building for all applicable architectures (in target 'ResourceConverter' from project 'WhateverGreen')
warning: ONLY_ACTIVE_ARCH=YES requested with multiple ARCHS and no active architecture could be computed; building for all applicable architectures (in target 'WhateverGreen' from project 'WhateverGreen')
/Users/me/Projects/WhateverGreen/WhateverGreen.xcodeproj: error: The linked library 'libkmod.a' is missing one or more architectures required by this target: arm64e. (in target 'WhateverGreen' from project 'WhateverGreen')
** BUILD FAILED **

I do see libkmod.a in

../MacKernelSDK/Library/universal/libkmod.a
../MacKernelSDK/Library/x86_64/libkmod.a

I have created a symlink in WhateverGreen directory to ../MacKernalSDK

% pwd
/Users/me/Projects/WhateverGreen
Z390-iMac WhateverGreen % ls MacKernelSDK/Library/universal
libkmod.a libkmodc++.a


Any suggestions on how to build version 1.6.1 successfully?
 
Why not download the prebuilt release of WhateverGreen.kext (WEG) 1.6.1?

 
Why not download the prebuilt release of WhateverGreen.kext (WEG) 1.6.1?

Cause

  1. I'm a nerd wanting to know what I may be doing wrong
  2. I wanted the flexibility of self compiles, if I want to attempt supporting other AMD graphics cards
Given the volume of responses to my question, you are likely correct in suggesting I follow the standard path.
 
Cause

  1. I'm a nerd wanting to know what I may be doing wrong
  2. I wanted the flexibility of self compiles, if I want to attempt supporting other AMD graphics cards
Given the volume of responses to my question, you are likely correct in suggesting I follow the standard path.
Nothing wrong with any of that. I build a custom AppleALC.kext with a different layout for my laptop. Anyway I was able to build the current WhateverGreen.kext as follows:

Open Terminal change to your working directory and enter the following:
Code:
git clone https://github.com/acidanthera/WhateverGreen
Change to the WhateverGreen directory.
Code:
git clone https://github.com/acidanthera/MacKernelSDK (Or symlink to the existing folder)
Download the debug version of Lilu.kext and extract to the WhateverGreen directory. Then build WEG.
Code:
xcodebuild -configuration Debug
The kext will be under WhateverGreen/build/Debug
 
@jpz4085
Thanks for the help, but still not compiling....
Code:
% xcodebuild -configuration Debug
2022-08-02 10:05:24.499 xcodebuild[58578:801029] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-08-02 10:05:24.499 xcodebuild[58578:801029] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -configuration Debug

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

note: Using new build system
note: Planning
Analyze workspace

Create build description
Build description signature: 8990193fcd5e2c08ade8e3203b9ab005
Build description path: /Users/me/Projects/WhateverGreen/build/XCBuildData/8990193fcd5e2c08ade8e3203b9ab005-desc.xcbuild

note: Build preparation complete
warning: Building targets in manual order is deprecated - check "Parallelize build for command-line builds" in the project editor, or set DISABLE_MANUAL_TARGET_ORDER_BUILD_WARNING in any of the targets in the current build to suppress this warning
warning: ONLY_ACTIVE_ARCH=YES requested with multiple ARCHS and no active architecture could be computed; building for all applicable architectures (in target 'ResourceConverter' from project 'WhateverGreen')
warning: ONLY_ACTIVE_ARCH=YES requested with multiple ARCHS and no active architecture could be computed; building for all applicable architectures (in target 'WhateverGreen' from project 'WhateverGreen')
/Users/me   /Projects/WhateverGreen/WhateverGreen.xcodeproj: error: The linked library 'libkmod.a' is missing one or more architectures required by this target: arm64e. (in target 'WhateverGreen' from project 'WhateverGreen')
** BUILD FAILED **

% pwd
/Users/me/Projects/WhateverGreen

%
% ls -la
total 96
drwxr-xr-x  19 me     staff    608 Aug  2 10:05 .
drwxr-xr-x  18 me     staff    576 Jul 25 15:27 ..
-rw-r--r--@  1 me     staff   6148 Jul 26 13:29 .DS_Store
drwxr-xr-x  15 me     staff    480 Aug  2 09:56 .git
drwxr-xr-x   3 me     staff     96 Jul 23 19:22 .github
-rw-r--r--   1 me     staff    333 Jul 23 19:22 .gitignore
-rw-r--r--   1 me     staff  15548 Jul 23 19:22 Changelog.md
-rw-r--r--@  1 me     staff   1479 Jul 23 19:22 LICENSE.txt
lrwxr-xr-x   1 me     staff     29 Aug  2 10:05 Lilu.kext -> ../Lilu/build/Debug/Lilu.kext
lrwxr-xr-x   1 me     staff     15 Jul 26 09:55 MacKernelSDK -> ../MacKernelSDK
drwxr-xr-x  19 me     staff    608 Jul 23 19:22 Manual
drwxr-xr-x   7 me     staff    224 Jul 23 19:28 Prebuilt
-rw-r--r--   1 me     staff  12371 Jul 23 19:22 README.md
drwxr-xr-x   4 me     staff    128 Jul 23 19:22 ResourceConverter
drwxr-xr-x   3 me     staff     96 Jul 23 19:22 Resources
drwxr-xr-x   8 me     staff    256 Jul 23 19:28 Tools
drwxr-xr-x  40 me     staff   1280 Jul 26 13:29 WhateverGreen
drwxr-xr-x@  5 me     staff    160 Jul 26 10:01 WhateverGreen.xcodeproj
drwxr-xr-x@  3 me     staff     96 Jul 26 09:55 build

% find . -follow -name  libkmod\*
./MacKernelSDK/Library/universal/libkmod.a
./MacKernelSDK/Library/universal/libkmodc++.a
./MacKernelSDK/Library/kmod/libkmodtest
./MacKernelSDK/Library/kmod/libkmodtest/libkmodtest.h
./MacKernelSDK/Library/kmod/libkmodtest/libkmodtest.cpp
./MacKernelSDK/Library/kmod/libkmodtest/libkmodtest-Info.plist
./MacKernelSDK/Library/kmod/libkmod.xcodeproj
./MacKernelSDK/Library/x86_64/libkmod.a

I hope you can see that the find command sees libkmod.a. So I'm not sure what is wrong with the build failure seen at the top.
 
I hope you can see that the find command sees libkmod.a. So I'm not sure what is wrong with the build failure seen at the top.
The linked library 'libkmod.a' is missing one or more architectures required by this target: arm64e.
Looks like it's attempting to compile for ARM because no active architecture could be determined. Try the build command below:
Code:
xcodebuild -configuration Debug ARCHS=x86_64
 
I have a debug build, success!
Awesome!
I would why the default build config doesn't have the ARCHS defined by default?
Good question. The architecture is defined correctly in the Xcode project configuration at least on my machine. Open the project file and check Architectures under Build Settings.
Am I the only person who's come across this?
Probably not. I vaguely recall seeing something similar happen with VoodooPS2Controller.kext a long time ago. Haven't since then but my build environment probably isn't identical to yours either.
 
The architecture is defined correctly in the Xcode project configuration at least on my machine. Open the project file and check Architectures under Build Settings.

Checked. It used to be ACID32 Architecture. I have changed all of these to Intel X64-bit architecture.

The Xcode GUI now fails with:

ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)

Tried, unsuccessfully to find if there is a definition for ARCHS variable in the project settings but I couldn't find one.

I have changed so much now, I will have to do a clean install (git reset --hard HEAD), and start again.
 
Here is the full command line I am using to compile without warnings (or errors )

Code:
%   /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -configuration Debug ARCHS=x86_64 --stdlib=libc++

Funny when I grep in the WhateverGreen repository I find:

% grep -R ARCHS * |less
WhateverGreen.xcodeproj/project.pbxproj: ARCHS = x86_64;

So it seems like it is correct (?) by default.
 
Last edited by a moderator:
Status
Not open for further replies.
Back
Top