Closed foozmeat closed 10 years ago
lsif.c is where we detect network interfaces for the various platforms we support. I guess it's not that surprising that we'll need to tweak this process for iOS.
I think netinet/if_ether.h is related to reading the ARP table. Which we aren't actually doing in this file, though I believe we did a long time ago. It should be safe to just remove it.
On Sat, Apr 5, 2014 at 10:11 AM, James Moore notifications@github.comwrote:
It appears I've hit a wall get servald to cross-compile for iOS and the iOS simulator. Some key headers are missing from the iOS SDK. The specific error I'm hitting is
lsif.c:46:10: fatal error: 'netinet/if_ether.h' file not found
include <netinet/if_ether.h>
Can anyone offer some guidance about this problem. Does this mean that building for iOS is a non-starter?
$ dir /Applications/Xcode5.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/include/net/ total 32 -rw-r--r-- 1 root wheel 4.0K Mar 10 15:19 ethernet.h -rw-r--r-- 1 root wheel 16K Mar 10 15:19 if.h -rw-r--r-- 1 root wheel 5.0K Mar 10 15:19 if_dl.h -rw-r--r-- 1 root wheel 9.2K Mar 10 15:19 if_var.h -rw-r--r-- 1 root wheel 15K Mar 10 15:19 pfkeyv2.h
$ dir /Applications/Xcode5.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/usr/include/net/ total 96 -rw-r--r-- 1 root wheel 36K Mar 10 15:20 bpf.h -rw-r--r-- 1 root wheel 1.3K Mar 10 15:20 dlil.h -rw-r--r-- 1 root wheel 4.0K Mar 10 15:20 ethernet.h -rw-r--r-- 1 root wheel 16K Mar 10 15:20 if.h -rw-r--r-- 1 root wheel 6.5K Mar 10 15:20 if_arp.h -rw-r--r-- 1 root wheel 5.0K Mar 10 15:20 if_dl.h -rw-r--r-- 1 root wheel 5.9K Mar 10 15:20 if_llc.h -rw-r--r-- 1 root wheel 15K Mar 10 15:20 if_media.h -rw-r--r-- 1 root wheel 7.3K Mar 10 15:20 if_mib.h -rw-r--r-- 1 root wheel 6.5K Mar 10 15:20 if_types.h -rw-r--r-- 1 root wheel 2.2K Mar 10 15:20 if_utun.h -rw-r--r-- 1 root wheel 9.2K Mar 10 15:20 if_var.h -rw-r--r-- 1 root wheel 2.1K Mar 10 15:20 kext_net.h -rw-r--r-- 1 root wheel 5.6K Mar 10 15:20 ndrv.h -rw-r--r-- 1 root wheel 15K Mar 10 15:20 pfkeyv2.h -rw-r--r-- 1 root wheel 11K Mar 10 15:20 route.h
$ dir /Applications/Xcode5.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/include/netinet/ total 24 -rw-r--r-- 1 root wheel 27K Mar 10 15:19 in.h -rw-r--r-- 1 root wheel 3.9K Mar 10 15:19 in_systm.h -rw-r--r-- 1 root wheel 7.9K Mar 10 15:19 ip.h -rw-r--r-- 1 root wheel 8.4K Mar 10 15:19 tcp.h
$ dir /Applications/Xcode5.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/usr/include/netinet/ total 56 -rw-r--r-- 1 root wheel 4.1K Mar 10 15:20 bootp.h -rw-r--r-- 1 root wheel 24K Mar 10 15:20 icmp6.h -rw-r--r-- 1 root wheel 4.5K Mar 10 15:20 icmp_var.h -rw-r--r-- 1 root wheel 5.7K Mar 10 15:20 if_ether.h -rw-r--r-- 1 root wheel 6.9K Mar 10 15:20 igmp.h -rw-r--r-- 1 root wheel 5.7K Mar 10 15:20 igmp_var.h -rw-r--r-- 1 root wheel 27K Mar 10 15:20 in.h -rw-r--r-- 1 root wheel 9.2K Mar 10 15:20 in_pcb.h -rw-r--r-- 1 root wheel 3.9K Mar 10 15:20 in_systm.h -rw-r--r-- 1 root wheel 5.1K Mar 10 15:20 in_var.h -rw-r--r-- 1 root wheel 7.9K Mar 10 15:20 ip.h -rw-r--r-- 1 root wheel 11K Mar 10 15:20 ip6.h -rw-r--r-- 1 root wheel 9.2K Mar 10 15:20 ip_icmp.h -rw-r--r-- 1 root wheel 7.8K Mar 10 15:20 ip_mroute.h -rw-r--r-- 1 root wheel 6.1K Mar 10 15:20 ip_var.h -rw-r--r-- 1 root wheel 8.4K Mar 10 15:20 tcp.h -rw-r--r-- 1 root wheel 5.1K Mar 10 15:20 tcp_fsm.h -rw-r--r-- 1 root wheel 4.4K Mar 10 15:20 tcp_seq.h -rw-r--r-- 1 root wheel 5.9K Mar 10 15:20 tcp_timer.h -rw-r--r-- 1 root wheel 22K Mar 10 15:20 tcp_var.h -rw-r--r-- 1 root wheel 4.2K Mar 10 15:20 tcpip.h -rw-r--r-- 1 root wheel 3.6K Mar 10 15:20 udp.h -rw-r--r-- 1 root wheel 5.5K Mar 10 15:20 udp_var.h
— Reply to this email directly or view it on GitHubhttps://github.com/servalproject/serval-dna/issues/76 .
Perfect, that did the trick. I was worried that more low-level features were required by servald. I've got it building now for all the necessary platforms.
It appears I've hit a wall getting servald to cross-compile for iOS and the iOS simulator. Some key headers are missing from the iOS SDK. The specific error I'm hitting is
Can anyone offer some guidance about this problem. Does this mean that building for iOS is a non-starter?