WWDC sessions from previous years discuss building and deploying kexts for OS X for multiple major OS versions. Shantonu
On May 23, 2014, at 7:53 AM, Jeff Schindler <jas001@gmail.com> wrote:
Thanks for the reply. I was really hoping to avoid hacking Xcode, but might resort to that if necessary. The two-system build setup is a fairly big pain, so I'd like to get this working. Were you having build (compile/link) or runtime issues with the kext that caused you to move to this?
I actually thought I had a breakthrough. Analyzing my kext with kextlibs gave me the following:
jass-macbook-pro:~ jas$ kextlibs -all-symbols /System/Library/Extensions/mykext.kext/ com.apple.kpi.mach = 9.8.0 com.apple.kpi.libkern = 9.8.0 com.apple.kpi.iokit = 9.8.0 com.apple.driver.AppleSM56KUSBAudio = 1.9.15 com.apple.driver.DspFuncLib = 1.7.1a2 com.apple.iokit.IOUSBFamily = 3.4.9 com.apple.iokit.IOFireWireFamily = 3.4.9 com.apple.iokit.IOFireWireAVC = 2.2.3 com.apple.iokit.IOAudioFamily = 1.6.9fc5 com.apple.driver.AppleUSBAudio = 2.6.4b17 com.apple.driver.AppleFWAudio = 2.4.6fc8 com.apple.driver.Apple16X50Serial = 1.9 2 symbols found in more than one library kext: __ZdaPv: in SM56KUSBAudioFamily.kext/Contents/PlugIns/AppleSM56KUSBAudio.kext (1.9.15), AppleHDA.kext/Contents/PlugIns/DspFuncLib.kext (1.7.1a2), IOFireWireFamily.kext (3.4.9), AppleUSBAudio.kext (2.6.4b17), AppleFWAudio.kext (2.4.6fc8), Apple16X50Serial.kext (1.9) kextlibs(257) malloc: *** error for object 0x4f3aa0: double free *** set a breakpoint in malloc_error_break to debug __Znam: in SM56KUSBAudioFamily.kext/Contents/PlugIns/AppleSM56KUSBAudio.kext (1.9.15), AppleHDA.kext/Contents/PlugIns/DspFuncLib.kext (1.7.1a2), IOFireWireFamily.kext (3.4.9), IOFireWireAVC.kext (2.2.3), AppleUSBAudio.kext (2.6.4b17), AppleFWAudio.kext (2.4.6fc8), Apple16X50Serial.kext (1.9) kextlibs(257) malloc: *** error for object 0x4f3aa0: double free *** set a breakpoint in malloc_error_break to debug
seeming to indicated that if I just included one of those libs where the undefined symbols were defined, it'd fix my problem. So, I tried adding one, then added them all, but *still* get the same undefined symbols, which is a bit baffling...
Jeff
On 5/23/14, Benjamin Fleischer <fleiben@gmail.com> wrote:
Hi,
I’ve been using using a slightly modified Xcode 3.2.6 to build 10.5 kernel extensions (including ppc support) on Mavericks for some time now. Here is what I did to make this work:
To set things up you need a Mac running 10.6 and install Xcode 3.2.6. Then tar the /Developer directory:
tar -cjvf ~/Desktop/Developer.tbz /Developer
On Mavericks extract the tar:
cd / sudo tar -xjvpf /path/to/Developer.tbz
Now delete the following SVN plugins on Mavericks. They don’t seem to be compatible with Mavericks.
/Developer/Library/Xcode/Plug-ins/XcodeSubversionIDEPlugin.xcplugin /Developer/Library/Xcode/Plug-ins/XcodeSubversionPlugin.xcplugin
Then copy the following tools from 10.6 over to /Developer on Mavericks. Make sure owner an group are set to root:wheel.
/usr/bin/codesign from 10.6 to /Developer/usr/bin/codesign on Mavericks /usr/bin/codesign_allocate from 10.6 to /Developer/usr/bin/codesign_allocate on Mavericks /usr/bin/ld from 10.6 to /Developer/usr/bin/ld on Mavericks /usr/bin/lipo from 10.6 to /Developer/usr/bin/lipo on Mavericks
Clear xcrun’s cache:
DEVELOPER_DIR=/Developer xcrun —kill-cache
This should be all. After doing this I was able to build 10.5 kernel extensions using xcodebuild:
DEVELOPER_DIR=/Developer xcodebuild ...
I hope this helps.
Regards, Benjamin
Am 23.05.2014 um 12:55 schrieb Jeff Schindler <jas001@gmail.com>:
Hi Nick,
Thanks for the response and the clue. It's frustrating because I *was* using 2 build systems and just migrated to a single one before encountering this. I will dig a little deeper and let you know if I find anything.
Thanks, Jeff
On May 22, 2014, at 11:39 PM, Nick Blievers wrote:
I gave up on this and use two separate build machines. Not what you want to hear I know. As a possible hint, the missing symbols are:
$ c++filt __Znam operator new[](unsigned long) __ZdaPv operator delete[](void*)
hope this helps, and if you do figure it out, please post it!
Nick
On 23 May 2014, at 12:56 pm, Jeff Schindler <jas001@gmail.com> wrote:
I'm trying to build a 10.5 kext under Mavericks and am getting some undefined symbols upon loading the kext under 10.5:
kld(): Undefined symbols: __ZdaPv __Znam
I'm using Xcode 4.6 and have tried both compilers (llvm and gcc). I had been building it under 10.6.8 with Xcode 4.3 with no problems (haven't changed any project settings). Anyone have any pointers?
Thanks, Jeff _______________________________________________ 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/nblievers%40threatmetr...
This email sent to nblievers@threatmetrix.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/fleiben%40gmail.com
This email sent to fleiben@gmail.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/ssen%40apple.com
This email sent to ssen@apple.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