jwise / HoRNDIS

Android USB tethering driver for Mac OS X
Other
2.98k stars 328 forks source link

Building on Sierra Fails #73

Open 4ydx opened 6 years ago

4ydx commented 6 years ago

I get the following error:

'IOKit/usb/IOUSBBus.h' file not found

Are the deploy packages not being built on a machine running Sierra or is there something I need to change/install?

tmagik commented 6 years ago

The API was removed..

https://developer.apple.com/library/content/releasenotes/General/APIDiffsMacOSX10_11/Objective-C/Kernel.html

Removed IOUSBBus Removed IOUSBBus::getMetaClass()

seems like it would have to be re-implemented using some new api??

d235j commented 6 years ago

yeah, Apple rewrote the USB stack in 10.11 (and left in place a compatibility layer for which headers are not available, but for which the old headers would work).

If you want to use the new API, look at the additions on that page.

Alternatively you can use xcodelegacy to install the older SDKs.

tmagik commented 6 years ago

Is there any sort of implementation/migration guide for the USB stack rewrite? … If I had the source code I wouldn’t need to ask stupid questions on how to use equipment I paid a lot of money for :-/

On May 3, 2018, at 12:52 PM, David Ryskalczyk notifications@github.com wrote:

yeah, Apple rewrote the USB stack in 10.11 (and left in place a compatibility layer for which headers are not available, but for which the old headers would work).

If you want to use the new API, look at the additions on that page.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jwise/HoRNDIS/issues/73#issuecomment-386381250, or mute the thread https://github.com/notifications/unsubscribe-auth/AGAQEI4pq6uN4jkYK2PWWRlC_iloe79Tks5tu0P5gaJpZM4QKlhA.

d235j commented 6 years ago

There's documentation for the new API (IOUSBHostDevice, IOUSBHostInterface, and the rest) at https://developer.apple.com/documentation/kernel?language=objc, but I don't know of any migration guide, and source code for this stack is not available.

It might be worth putting in a radar ticket, but I don't know if that will lead to any responses, unfortunately.

jwise commented 6 years ago

Yep. I filed a developer technical support request for it two or so years ago, and the answer was "we don't have any sample code for that, good luck, sucker". But if you have a patch set that actually brings us up to the latest APIs, that would be a good thing, I think.

mikhailai commented 6 years ago

The latest version of "master" builds fine on Sierra or High Sierra. For all who are interested:

include <IOKit/usb/IOUSBHostDevice.h>

include <IOKit/usb/IOUSBHostInterface.h>

include <IOKit/usb/IOUSBHostFamily.h>

include <IOKit/usb/IOUSBHostPipe.h>

Note, the HoRNDIS itself was updated for the new API, but if you're up to hacking up something else, then have fun!

brandonros commented 4 years ago

These files work for Mac OS X, but what about trying to import/include + link against IOKit for iPhoneOS?