Jump to content

AppleALC — dynamic AppleHDA patching


vit9696
5,318 posts in this topic

Recommended Posts

Hi vit9696

 

Here is my report...

Compiled as per your instruction and was able to produced a kext by setting the Base SDK to either 10.7/10.8.

 

1. the kext just won't load in Lion & ML during bootup (loading it manually by kextutil will load of course).

2. the same kext works in El Capitan with no problem at all.

 

I noticed that ResourceConverter still need to be compiled using SDK10.11 else error if i set it to SDk10.7/10.8

Ld /Users/Ella/Library/Developer/Xcode/DerivedData/AppleALC-bwuabuvovatdltbdqdthxkvnzsuu/Build/Products/Release/ResourceConverter normal x86_64
    cd /Users/Ella/Desktop/AppleALC-master
    export MACOSX_DEPLOYMENT_TARGET=10.8
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/Ella/Library/Developer/Xcode/DerivedData/AppleALC-bwuabuvovatdltbdqdthxkvnzsuu/Build/Products/Release -F/Users/Ella/Library/Developer/Xcode/DerivedData/AppleALC-bwuabuvovatdltbdqdthxkvnzsuu/Build/Products/Release -filelist /Users/Ella/Library/Developer/Xcode/DerivedData/AppleALC-bwuabuvovatdltbdqdthxkvnzsuu/Build/Intermediates/AppleALC.build/Release/ResourceConverter.build/Objects-normal/x86_64/ResourceConverter.LinkFileList -mmacosx-version-min=10.8 -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -Xlinker -dependency_info -Xlinker /Users/Ella/Library/Developer/Xcode/DerivedData/AppleALC-bwuabuvovatdltbdqdthxkvnzsuu/Build/Intermediates/AppleALC.build/Release/ResourceConverter.build/Objects-normal/x86_64/ResourceConverter_dependency_info.dat -o /Users/Ella/Library/Developer/Xcode/DerivedData/AppleALC-bwuabuvovatdltbdqdthxkvnzsuu/Build/Products/Release/ResourceConverter

	Undefined symbols for architecture x86_64:
	  "_objc_readClassPair", referenced from:
	      __ARCLite__load() in libarclite_macosx.a(arclite.o)
	ld: symbol(s) not found for architecture x86_64
	clang: error: linker command failed with exit code 1 (use -v to see invocation)

Could that be the reason on why it fails to load in Lion & ML?

Im available to do some test for you.

 

Thanks

 

BTW this is my working ALC883 Codec. Hoping you can add it in the repo

 

ALC883_ellaosx.zip

Edited by ellaosx
Link to comment
Share on other sites

already set Slice.

I fixed the error by doing this https://forums.developer.apple.com/thread/17757 

 

Note from that link:

1. turning off the build setting called "Implicitly Link Objective-C Runtime Support" didn't fix it.

2. by adding "-Xlinker -U -Xlinker _objc_readClassPair" to the "Other Linker Flags" setting for those projects. Fixed it! :)

 

But the kext still won't load on its own in either Lion or ML. as if it is not doing its thing. It works in El capitan though.

Same computer, 3 OS ( Lion, ML, Elcap), same AppleALC used.

I have set MinKernel & MaxKernel to its appropriate kernel version.


*Wait… is it because AppleALC is looking for the "kernel" in /System/Library/kernel?

Edited by ellaosx
Link to comment
Share on other sites

I did not bother fixing ResourceConverter for 10.7 SDK indeed, it would have been a waste of time, since that piece of {censored} wants a rewrite after all.

 

As for the kext itself… I would like to see the verbose (-alcdbg) start and the log (/var/log/system.log).

Most likely something goes wrong but the kext must start.

 

AppleALC does load kernel at /mach_kernel as well, if it finds it, so it is supposed to be compatible with 10.7 paths.

Link to comment
Share on other sites

Hi vit9696

As much id like to send system.log, i see no point to it. -alcdbg does nothing at all as the kext won't load. system.log is empty regarding AppleALC.  Im setting up higher build ( maverick & Yosemite) atm to check if its really the OS.

 

Il report back ASAP

Link to comment
Share on other sites

Hi vit9696

sorry for the delay...

I have tried Mavericks & Yosemite, and both works on the very same kext that failed on Lion & ML. Il be updating this post with a new warning message during sdk10.7/sdk10.8 compilation in a while.

 

Update

Warnings:

/Users/Ella/Desktop/AppleALC-master/ResourceConverter/main.mm:244:4: 'auto' deduced as 'id' in declaration of 'codecDict'
/Users/Ella/Desktop/AppleALC-master/ResourceConverter/main.mm:345:2: 'auto' deduced as 'id' in declaration of 'lookup'
/Users/Ella/Desktop/AppleALC-master/ResourceConverter/main.mm:346:2: 'auto' deduced as 'id' in declaration of 'vendors'
/Users/Ella/Desktop/AppleALC-master/ResourceConverter/main.mm:347:2: 'auto' deduced as 'id' in declaration of 'kexts'
/Users/Ella/Desktop/AppleALC-master/ResourceConverter/main.mm:348:2: 'auto' deduced as 'id' in declaration of 'ctrls'
Edited by ellaosx
Link to comment
Share on other sites

Well, I did say that you are meant to compile ResourceConverter with a recent compiler/latest SDK.

All these warnings are not so important.

 

As for load issues, are you sure you install AppleALC the right way? If it is missing from kextstat and there are no lines related to it in the system log, it means that the kext was not added to kextcache. Try using Kext Utility, it automatically adds kexts to the exception list.

Link to comment
Share on other sites

I have almost tried everything just to make AppleALC load in Lion & ML. I have loaded it the same way I got loaded in Mavs,Yose & El Caps with no problem.

I should probably do fresh install of Lion & ML to make sure hahaha. Thats not a problem, as long we make this loadable :)

 

I will keep you posted ASAP

Tommorow, il report back.

 

Again, Thank You vit9696. 

Link to comment
Share on other sites

Hi vit9696

As much id like to send system.log, i see no point to it. -alcdbg does nothing at all as the kext won't load. system.log is empty regarding AppleALC.  Im setting up higher build ( maverick & Yosemite) atm to check if its really the OS.

 

Il report back ASAP

Out of curiosity, I was able to reproduced what ellaosx was pointing out. Got hold of an old 10.8, compiled using 10.7SDK in El Capitan. Viola! It doesn't want to load in 10.8 even with 10.8SDK. No message or whatsoever in debug mode as it didn't load. Loadable in kextload, but that's not gonna help debugging.

 

Just my two cents..

 

@ellaosx try xcode6.x with 10.7SDK

Link to comment
Share on other sites

Well, I have just tried myself, and I had no luck with changing pretty much everything.

My last suspect is that one needs a much older Xcode version to build for 10.7.

I tried downloading 4.3.3, but its compiler support is terrible, and I have no will in rewriting stuff.

 

Perhaps, one could find a working version with OS X 10.7/10.8 SDK in between? Maybe something close to 4.5…

  • Like 1
Link to comment
Share on other sites

Well, I have just tried myself, and I had no luck with changing pretty much everything.

My last suspect is that one needs a much older Xcode version to build for 10.7.

I tried downloading 4.3.3, but its compiler support is terrible, and I have no will in rewriting stuff.

 

Perhaps, one could find a working version with OS X 10.7/10.8 SDK in between? Maybe something close to 4.5…

Same problem.

To compile VoodooHDA and HWSensors I have 10.7.5 system with XCode 4.4.1 (CLT 4.5.2).

Link to comment
Share on other sites

@vit9696
latest commit fixed the error in resourceconverter, but still cant be loaded in Lion & ML using xcode 5,6 & 7.
I will try to use old version of xcode when i find time in my work.

 

Update:

Xcode 4.6.3 (SDK10.7) = same issue as xcode 5,6 & 7

 

Xcode 4.6.3 (SDk10.8)

/Users/Ella/Desktop/AppleALC-master/ResourceConverter/generate.sh: line 14:   309 Segmentation fault: 11  "${TARGET_BUILD_DIR}/ResourceConverter" "${PROJECT_DIR}/Resources" "${PROJECT_DIR}/AppleALC/kern_resources.cpp"
Failed to build kern_resources.cpp
Command /bin/sh failed with exit code 1

Edited by ellaosx
Link to comment
Share on other sites

Using Xcode 4.6.3 with SDK7:

As expected, it will not load in Lion & ML. But i have different result if i install it in Mavs,Yose & ElCap.

 

The kext that was made is Xcode 4.6.3 SDK7 loaded in Mavs,Yose & ElCap but no sound showing up in preference.

 

Here is the log..

For some reason, i can't upload the file...

 

Pastebin here http://pastebin.com/U5qMGx4j

Edited by ellaosx
Link to comment
Share on other sites

Same problem.

To compile VoodooHDA and HWSensors I have 10.7.5 system with XCode 4.4.1 (CLT 4.5.2).

Errrrk, that sounds between disgusting and unpleasant. Why the hell would not it build just with a sane SDK :/

 

ellaosx, could you pass me the crash report? Also, did you try loading AppleALC built with Xcode 5.0 in 10.8?

 

-UPD-

I see no HDEF detection in the log, did something happen to your DSDT? I do not see a reason for something like to fail specifically for some build. Did you check the latest revision?

Link to comment
Share on other sites

Errrrk, that sounds between disgusting and unpleasant. Why the hell would not it build just with a sane SDK :/

 

ellaosx, could you pass me the crash report? Also, did you try loading AppleALC built with Xcode 5.0 in 10.8?

Yes, i have tried xcode5 in 10.8. same result, not loading.

 

What crash report? of this? 

/Users/Ella/Desktop/AppleALC-master/ResourceConverter/generate.sh: line 14:   309 Segmentation fault: 11  "${TARGET_BUILD_DIR}/ResourceConverter" "${PROJECT_DIR}/Resources" "${PROJECT_DIR}/AppleALC/kern_resources.cpp"
Failed to build kern_resources.cpp
Command /bin/sh failed with exit code 1
Link to comment
Share on other sites

  • Allan pinned this topic
×
×
  • Create New...