AnhTVc / OpenVPN-IOS

Build OpenVPN source for IOS
GNU General Public License v3.0
124 stars 53 forks source link

Xcode 9.0.1 does not compile #11

Open liloew opened 6 years ago

liloew commented 6 years ago

I use Xcode 9.0.1, but it dos not have bpf.h and if_media.h.

~/OpenVPN-IOS ❯❯❯ xcode-select -print-path                                                                 ⏎
/Applications/Xcode.app/Contents/Developer
~/OpenVPN-IOS ❯❯❯ ll /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/net/
total 48
-r--r--r--  7 lilo  staff   4.1K Sep 30 09:24 ethernet.h
-r--r--r--  7 lilo  staff    15K Sep 30 09:24 if.h
-r--r--r--  7 lilo  staff   5.0K Sep 30 09:13 if_dl.h
-r--r--r--  7 lilo  staff   6.5K Sep 30 09:02 if_types.h
-r--r--r--  7 lilo  staff   9.2K Sep 30 09:02 if_var.h
-r--r--r--  7 lilo  staff   4.5K Sep 30 09:13 net_kev.h
-r--r--r--  7 lilo  staff    15K Sep 30 08:53 pfkeyv2.h
~/OpenVPN-IOS ❯❯❯ ll /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/usr/include/net
total 48
-r--r--r--  7 lilo  staff   4.1K Sep 30 09:24 ethernet.h
-r--r--r--  7 lilo  staff    15K Sep 30 09:24 if.h
-r--r--r--  7 lilo  staff   5.0K Sep 30 09:13 if_dl.h
-r--r--r--  7 lilo  staff   6.5K Sep 30 09:02 if_types.h
-r--r--r--  7 lilo  staff   9.2K Sep 30 09:02 if_var.h
-r--r--r--  7 lilo  staff   4.5K Sep 30 09:13 net_kev.h
-r--r--r--  7 lilo  staff    15K Sep 30 08:53 pfkeyv2.h
~/OpenVPN-IOS ❯❯❯

Does it mean couldn't build libpcap using Xcode 9 ?

My environment is: macOS Sierra 10.12.6 and Xcode 9.0.1

AnhTVc commented 6 years ago

Try again with real device (not Simulator)

liloew commented 6 years ago

It does the same.

~/OpenVPN-IOS ❯❯❯ ll /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/net
total 48
-r--r--r--  7 lilo  staff   4.1K  9 30 09:24 ethernet.h
-r--r--r--  7 lilo  staff    15K  9 30 09:24 if.h
-r--r--r--  7 lilo  staff   5.0K  9 30 09:13 if_dl.h
-r--r--r--  7 lilo  staff   6.5K  9 30 09:02 if_types.h
-r--r--r--  7 lilo  staff   9.2K  9 30 09:02 if_var.h
-r--r--r--  7 lilo  staff   4.5K  9 30 09:13 net_kev.h
-r--r--r--  7 lilo  staff    15K  9 30 08:53 pfkeyv2.h
~/OpenVPN-IOS ❯❯❯ ll /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/net
total 48
-r--r--r--  7 lilo  staff   4.1K  9 30 09:24 ethernet.h
-r--r--r--  7 lilo  staff    15K  9 30 09:24 if.h
-r--r--r--  7 lilo  staff   5.0K  9 30 09:13 if_dl.h
-r--r--r--  7 lilo  staff   6.5K  9 30 09:02 if_types.h
-r--r--r--  7 lilo  staff   9.2K  9 30 09:02 if_var.h
-r--r--r--  7 lilo  staff   4.5K  9 30 09:13 net_kev.h
-r--r--r--  7 lilo  staff    15K  9 30 08:53 pfkeyv2.h
~/OpenVPN-IOS ❯❯❯
AnhTVc commented 6 years ago

You can use OpenVPN-IOS / dependencies / lib / libpcap.a. I have build for all versions