ReadyTalk / avian

[INACTIVE] Avian is a lightweight virtual machine and class library designed to provide a useful subset of Java's features, suitable for building self-contained applications.
https://readytalk.github.io/avian/
Other
1.22k stars 172 forks source link

get netinet headers from iPhoneSimulator SDK, not iPhoneOS SDK #494

Closed dicej closed 8 years ago

dicej commented 8 years ago

As of SDK 9.2 at least, the headers we need are not part of the device SDK, only the simulator SDK.

joshuawarner32 commented 8 years ago

Hmm... I'm not seeing the same files:

$ find /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform -name netinet -type d
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/netinet
dicej commented 8 years ago

The files we're interested in are e.g. ip_icmp.h, icmp6.h, etc. For example, on my machine /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/netinet/ip_icmp.h exists, whereas /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/netinet/ip_icmp.h does not, hence the PR.

joshuawarner32 commented 8 years ago

ah, gotcha. Seems like this has been going on for a while:

http://stackoverflow.com/questions/29148341/xcode-fails-to-compile-for-real-ipad-but-works-for-simulator-missing-header-fil

joshuawarner32 commented 8 years ago

According to http://blog.slaunchaman.com/2010/02/13/using-apples-simpleping-on-iphone-os/, an apple engineer confirmed that symlinking those files into the iPhoneOS SDK was the way to go. (shivers)

This seems like a good alternative to mucking with user's machines.