Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds netifaces recipe, closes #239 #488

Merged
merged 1 commit into from
May 7, 2020
Merged

Adds netifaces recipe, closes #239 #488

merged 1 commit into from
May 7, 2020

Conversation

AndreMiras
Copy link
Member

Note this is an early version working on the x86_64 simulator.
It wasn't tested on an arm device.
Requires setuptools to be installed:

python toolchain.py pip install setuptools

Tested with main.py:

import netifaces
print("interfaces:", netifaces.interfaces())

And produced the following output in the x86_64 simulator:

Available orientation: KIVY_ORIENTATION=LandscapeLeft LandscapeRight Portrait PortraitUpsideDown
Initializing python
Running main.py: /Users/vagrant/Library/Developer/CoreSimulator/Devices/.../Application/.../testnetifaces.app/YourApp/main.pyc
interfaces: ['lo0', 'gif0', 'stf0', 'en0', 'utun0', 'utun1']
Leaving

@AndreMiras
Copy link
Member Author

The recipe is far from being perfect as it contains some hardcoded path and versions, but it's a good start as it compiles and run fine on the x86_64 simulator. I'm curious to know how it goes on device.
Let's merge this first working iteration if the build gets green

@AndreMiras
Copy link
Member Author

Not too sure why the build failed on the CI, will investigate later.
See relevant build log part below:

2020-05-06T22:49:53.6496300Z [INFO    ] Download netifaces
2020-05-06T22:49:53.6498920Z [INFO    ] Downloading https://pypi.io/packages/source/n/netifaces/netifaces-0.10.9.tar.gz
2020-05-06T22:49:53.8694620Z - Download 100.01%
2020-05-06T22:49:53.8694860Z Added _sqlite to archive
2020-05-06T22:49:53.8694970Z Added _sqlite to archive
2020-05-06T22:49:53.8695800Z - Download 0.00%
2020-05-06T22:49:53.8698200Z - Download 28.40%
2020-05-06T22:49:53.8699910Z - Download 56.80%
2020-05-06T22:49:53.8722510Z - Download 85.20%
2020-05-06T22:49:53.8763100Z [DEBUG   ] New State: netifaces.download at 2020-05-06 22:49:53.875292
2020-05-06T22:49:53.8763290Z [INFO    ] Extract netifaces
2020-05-06T22:49:53.8763390Z [INFO    ] Extract netifaces for x86_64
2020-05-06T22:49:53.8767270Z [INFO    ] Extract /Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/.cache/netifaces-netifaces-0.10.9.tar.gz into /Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/build/netifaces/x86_64
2020-05-06T22:49:53.8774040Z [INFO    ] Running Shell: /usr/bin/tar ('-C', '/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/build/netifaces/x86_64', '-xv', '-z', '-f', '/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/.cache/netifaces-netifaces-0.10.9.tar.gz') {'_iter': True, '_out_bufsize': 1, '_err_to_out': True}
2020-05-06T22:49:53.8902280Z [DEBUG   ] x netifaces-0.10.9/
2020-05-06T22:49:53.8903000Z [DEBUG   ] x netifaces-0.10.9/PKG-INFO
2020-05-06T22:49:53.8903510Z [DEBUG   ] x netifaces-0.10.9/LICENSE
2020-05-06T22:49:53.8909430Z [DEBUG   ] x netifaces-0.10.9/netifaces.c
2020-05-06T22:49:53.8911390Z [DEBUG   ] x netifaces-0.10.9/MANIFEST.in
2020-05-06T22:49:53.8914640Z [DEBUG   ] x netifaces-0.10.9/setup.py
2020-05-06T22:49:53.8917820Z [DEBUG   ] x netifaces-0.10.9/netifaces.egg-info/
2020-05-06T22:49:53.8919850Z [DEBUG   ] x netifaces-0.10.9/netifaces.egg-info/PKG-INFO
2020-05-06T22:49:53.8922570Z [DEBUG   ] x netifaces-0.10.9/netifaces.egg-info/zip-safe
2020-05-06T22:49:53.8925400Z [DEBUG   ] x netifaces-0.10.9/netifaces.egg-info/SOURCES.txt
2020-05-06T22:49:53.8928260Z [DEBUG   ] x netifaces-0.10.9/netifaces.egg-info/top_level.txt
2020-05-06T22:49:53.8930800Z [DEBUG   ] x netifaces-0.10.9/netifaces.egg-info/dependency_links.txt
2020-05-06T22:49:53.8934810Z [DEBUG   ] x netifaces-0.10.9/setup.cfg
2020-05-06T22:49:53.8941750Z [DEBUG   ] x netifaces-0.10.9/README.rst
2020-05-06T22:49:53.8944630Z [INFO    ] Extract netifaces for arm64
2020-05-06T22:49:53.8948690Z [INFO    ] Extract /Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/.cache/netifaces-netifaces-0.10.9.tar.gz into /Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/build/netifaces/arm64
2020-05-06T22:49:53.8955880Z [INFO    ] Running Shell: /usr/bin/tar ('-C', '/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/build/netifaces/arm64', '-xv', '-z', '-f', '/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/.cache/netifaces-netifaces-0.10.9.tar.gz') {'_iter': True, '_out_bufsize': 1, '_err_to_out': True}
2020-05-06T22:49:53.9079010Z [DEBUG   ] x netifaces-0.10.9/
2020-05-06T22:49:53.9079950Z [DEBUG   ] x netifaces-0.10.9/PKG-INFO
2020-05-06T22:49:53.9080500Z [DEBUG   ] x netifaces-0.10.9/LICENSE
2020-05-06T22:49:53.9085300Z [DEBUG   ] x netifaces-0.10.9/netifaces.c
2020-05-06T22:49:53.9087480Z [DEBUG   ] x netifaces-0.10.9/MANIFEST.in
2020-05-06T22:49:53.9090600Z [DEBUG   ] x netifaces-0.10.9/setup.py
2020-05-06T22:49:53.9099020Z [DEBUG   ] x netifaces-0.10.9/netifaces.egg-info/
2020-05-06T22:49:53.9101430Z [DEBUG   ] x netifaces-0.10.9/netifaces.egg-info/PKG-INFO
2020-05-06T22:49:53.9102290Z [DEBUG   ] x netifaces-0.10.9/netifaces.egg-info/zip-safe
2020-05-06T22:49:53.9102830Z [DEBUG   ] x netifaces-0.10.9/netifaces.egg-info/SOURCES.txt
2020-05-06T22:49:53.9103390Z [DEBUG   ] x netifaces-0.10.9/netifaces.egg-info/top_level.txt
2020-05-06T22:49:53.9106400Z [DEBUG   ] x netifaces-0.10.9/netifaces.egg-info/dependency_links.txt
2020-05-06T22:49:53.9107700Z [DEBUG   ] x netifaces-0.10.9/setup.cfg
2020-05-06T22:49:53.9110120Z [DEBUG   ] x netifaces-0.10.9/README.rst
2020-05-06T22:49:53.9135560Z [DEBUG   ] New State: netifaces.extract at 2020-05-06 22:49:53.912521
2020-05-06T22:49:53.9135710Z [INFO    ] Build_all netifaces
2020-05-06T22:49:53.9136270Z [INFO    ] Build netifaces for x86_64, arm64 (filtered)
2020-05-06T22:49:53.9137300Z [INFO    ] Build netifaces
2020-05-06T22:49:53.9141460Z [INFO    ] Prebuild netifaces for x86_64
2020-05-06T22:49:53.9141720Z [DEBUG   ] Invoking prebuild_x86_64
2020-05-06T22:49:53.9142050Z [INFO    ] Build netifaces for x86_64
2020-05-06T22:49:53.9841110Z [INFO    ] Running Shell: /Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/hostpython3/bin/python ('setup.py', 'build') {'_env': {'CC': '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmp1r3kkcg8', 'CXX': '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpdmzwiz7a', 'AR': '/Applications/Xcode_11.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar', 'LD': '/Applications/Xcode_11.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld', 'OTHER_CFLAGS': '-I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/x86_64/hostlibffi -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/x86_64/ffi -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/x86_64/openssl -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/x86_64', 'OTHER_LDFLAGS': '-L/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/lib', 'CFLAGS': '-O3 -miphoneos-version-min=8.0 -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/x86_64/hostlibffi -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/x86_64/ffi -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/x86_64/openssl -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/x86_64', 'LDFLAGS': '-arch x86_64 -L/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/lib -L/Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/usr/lib -miphoneos-version-min=8.0', 'PYTHONPATH': '/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/root/python3/lib/python3.8/site-packages'}, '_iter': True, '_out_bufsize': 1, '_err_to_out': True}
2020-05-06T22:49:54.2022410Z [DEBUG   ] running build
2020-05-06T22:49:54.2023410Z [DEBUG   ] running build_ext
2020-05-06T22:49:54.2980680Z [DEBUG   ] checking for getifaddrs...found. 
2020-05-06T22:49:54.3672400Z [DEBUG   ] checking for getnameinfo...found. 
2020-05-06T22:49:54.4167060Z [DEBUG   ] checking for IPv6 socket IOCTLs...not found. 
2020-05-06T22:49:55.0610880Z [DEBUG   ] checking for optional header files...net/if_dl.h. 
2020-05-06T22:49:55.1567540Z [DEBUG   ] checking whether struct sockaddr has a length field...yes. 
2020-05-06T22:49:55.2055930Z [DEBUG   ] checking for routing socket support...no. 
2020-05-06T22:49:55.2600190Z [DEBUG   ] checking for sysctl(CTL_NET...) support...no. 
2020-05-06T22:49:55.3036350Z [DEBUG   ] checking for netlink support...no. 
2020-05-06T22:49:55.3050610Z [DEBUG   ] building 'netifaces' extension
2020-05-06T22:49:55.3052540Z [DEBUG   ] /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmp1r3kkcg8 -O3 -miphoneos-version-min=8.0 -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/x86_64/hostlibffi -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/x86_64/ffi -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/x86_64/openssl -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/x86_64 -DNETIFACES_VERSION=0.10.9 -DHAVE_GETIFADDRS=1 -DHAVE_GETNAMEINFO=1 -DHAVE_NET_IF_DL_H=1 -DHAVE_SOCKADDR_SA_LEN=1 -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/hostpython3/include/python3.8 -c netifaces.c -o build/temp.macosx-10.15-x86_64-3.8/netifaces.o
2020-05-06T22:49:55.4958130Z [DEBUG   ] creating build/lib.macosx-10.15-x86_64-3.8
2020-05-06T22:49:55.4959780Z [DEBUG   ] /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmp1r3kkcg8 -bundle -undefined dynamic_lookup -lsqlite3 -lffi -L/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/hostlibffi/usr/local/lib -lsqlite3 -lffi -L/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/hostlibffi/usr/local/lib -arch x86_64 -L/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/lib -L/Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/usr/lib -miphoneos-version-min=8.0 -O3 -miphoneos-version-min=8.0 -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/x86_64/hostlibffi -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/x86_64/ffi -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/x86_64/openssl -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/x86_64 build/temp.macosx-10.15-x86_64-3.8/netifaces.o -o build/lib.macosx-10.15-x86_64-3.8/netifaces.cpython-38-darwin.so
2020-05-06T22:49:55.5176820Z [DEBUG   ] ld: warning: -undefined dynamic_lookup is deprecated on iOS Simulator
2020-05-06T22:49:55.5527690Z [INFO    ] Postbuild netifaces for x86_64
2020-05-06T22:49:55.5527920Z [DEBUG   ] Invoking postbuild_x86_64
2020-05-06T22:49:55.5708150Z [DEBUG   ] New State: netifaces.build.x86_64 at 2020-05-06 22:49:55.565030
2020-05-06T22:49:55.5708350Z [INFO    ] Build netifaces
2020-05-06T22:49:55.5763040Z [INFO    ] Prebuild netifaces for arm64
2020-05-06T22:49:55.5763520Z [DEBUG   ] Invoking prebuild_arm64
2020-05-06T22:49:55.5763690Z [INFO    ] Build netifaces for arm64
2020-05-06T22:49:55.6405280Z [INFO    ] Running Shell: /Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/hostpython3/bin/python ('setup.py', 'build') {'_env': {'CC': '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpzt03z5lh', 'CXX': '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmp5o1z4a5c', 'AR': '/Applications/Xcode_11.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar', 'LD': '/Applications/Xcode_11.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld', 'OTHER_CFLAGS': '-I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/arm64/hostlibffi -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/arm64/ffi -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/arm64/openssl -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/arm64', 'OTHER_LDFLAGS': '-L/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/lib', 'CFLAGS': '-O3 -miphoneos-version-min=8.0 -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/arm64/hostlibffi -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/arm64/ffi -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/arm64/openssl -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/arm64', 'LDFLAGS': '-arch arm64 -L/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/lib -L/Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk/usr/lib -miphoneos-version-min=8.0', 'PYTHONPATH': '/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/root/python3/lib/python3.8/site-packages'}, '_iter': True, '_out_bufsize': 1, '_err_to_out': True}
2020-05-06T22:49:55.8600590Z [DEBUG   ] running build
2020-05-06T22:49:55.8601060Z [DEBUG   ] running build_ext
2020-05-06T22:49:55.9563150Z [DEBUG   ] checking for getifaddrs...found. 
2020-05-06T22:49:56.0635990Z [DEBUG   ] checking for getnameinfo...found. 
2020-05-06T22:49:56.1196980Z [DEBUG   ] checking for IPv6 socket IOCTLs...not found. 
2020-05-06T22:49:56.7621140Z [DEBUG   ] checking for optional header files...net/if_dl.h. 
2020-05-06T22:49:56.8164440Z [DEBUG   ] checking whether struct sockaddr has a length field...yes. 
2020-05-06T22:49:56.8611870Z [DEBUG   ] checking for routing socket support...no. 
2020-05-06T22:49:56.9151840Z [DEBUG   ] checking for sysctl(CTL_NET...) support...no. 
2020-05-06T22:49:56.9592750Z [DEBUG   ] checking for netlink support...no. 
2020-05-06T22:49:56.9606530Z [DEBUG   ] building 'netifaces' extension
2020-05-06T22:49:56.9609480Z [DEBUG   ] /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpzt03z5lh -O3 -miphoneos-version-min=8.0 -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/arm64/hostlibffi -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/arm64/ffi -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/arm64/openssl -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/arm64 -DNETIFACES_VERSION=0.10.9 -DHAVE_GETIFADDRS=1 -DHAVE_GETNAMEINFO=1 -DHAVE_NET_IF_DL_H=1 -DHAVE_SOCKADDR_SA_LEN=1 -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/hostpython3/include/python3.8 -c netifaces.c -o build/temp.macosx-10.15-x86_64-3.8/netifaces.o
2020-05-06T22:49:57.1482070Z [DEBUG   ] creating build/lib.macosx-10.15-x86_64-3.8
2020-05-06T22:49:57.1483950Z [DEBUG   ] /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpzt03z5lh -bundle -undefined dynamic_lookup -lsqlite3 -lffi -L/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/hostlibffi/usr/local/lib -lsqlite3 -lffi -L/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/hostlibffi/usr/local/lib -arch arm64 -L/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/lib -L/Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk/usr/lib -miphoneos-version-min=8.0 -O3 -miphoneos-version-min=8.0 -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/arm64/hostlibffi -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/arm64/ffi -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/arm64/openssl -I/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/include/arm64 build/temp.macosx-10.15-x86_64-3.8/netifaces.o -o build/lib.macosx-10.15-x86_64-3.8/netifaces.cpython-38-darwin.so
2020-05-06T22:49:57.1700330Z [DEBUG   ] ld: warning: -undefined dynamic_lookup is deprecated on iOS
2020-05-06T22:49:57.1703080Z [DEBUG   ] ld: warning: ignoring file /Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/hostlibffi/usr/local/lib/libffi.a, building for iOS-arm64 but attempting to link with file built for macOS-x86_64
2020-05-06T22:49:57.2082910Z [INFO    ] Postbuild netifaces for arm64
2020-05-06T22:49:57.2083160Z [DEBUG   ] Invoking postbuild_arm64
2020-05-06T22:49:57.2275350Z [DEBUG   ] New State: netifaces.build.arm64 at 2020-05-06 22:49:57.221708
2020-05-06T22:49:57.2275750Z [INFO    ] Create lipo library for netifaces
2020-05-06T22:49:57.2277240Z [INFO    ] Lipo netifaces to /Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/lib/libnetifaces.a
2020-05-06T22:49:57.2277400Z [INFO    ] Make_lipo netifaces
2020-05-06T22:49:57.2348330Z [INFO    ] Running Shell: /usr/bin/lipo ('-create', '-output', '/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/lib/libnetifaces.a', '-arch', 'x86_64', '/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/build/netifaces/x86_64/netifaces-0.10.9/libnetifaces.a', '-arch', 'arm64', '/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/build/netifaces/arm64/netifaces-0.10.9/libnetifaces.a') {'_iter': True, '_out_bufsize': 1, '_err_to_out': True}
2020-05-06T22:49:57.2529360Z [DEBUG   ] fatal error: /Applications/Xcode_11.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: /Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/build/netifaces/x86_64/netifaces-0.10.9/libnetifaces.a (No such file or directory)
2020-05-06T22:49:57.2578430Z Exception in thread background thread for pid 13865:
2020-05-06T22:49:57.2578580Z Traceback (most recent call last):
2020-05-06T22:49:57.2580480Z   File "/Users/runner/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/threading.py", line 926, in _bootstrap_inner
2020-05-06T22:49:57.2580720Z     self.run()
2020-05-06T22:49:57.2580960Z   File "/Users/runner/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/threading.py", line 870, in run
2020-05-06T22:49:57.2581070Z     self._target(*self._args, **self._kwargs)
2020-05-06T22:49:57.2581820Z   File "/Users/runner/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/site-packages/sh.py", line 1540, in wrap
2020-05-06T22:49:57.2581950Z     fn(*args, **kwargs)
2020-05-06T22:49:57.2582540Z   File "/Users/runner/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/site-packages/sh.py", line 2459, in background_thread
2020-05-06T22:49:57.2582680Z     handle_exit_code(exit_code)
2020-05-06T22:49:57.2583220Z   File "/Users/runner/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/site-packages/sh.py", line 2157, in fn
2020-05-06T22:49:57.2583360Z     return self.command.handle_command_exit_code(exit_code)
2020-05-06T22:49:57.2583930Z   File "/Users/runner/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/site-packages/sh.py", line 815, in handle_command_exit_code
2020-05-06T22:49:57.2584080Z     raise exc
2020-05-06T22:49:57.2584170Z sh.ErrorReturnCode_1: 
2020-05-06T22:49:57.2584220Z 
2020-05-06T22:49:57.2584920Z   RAN: /usr/bin/lipo -create -output /Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/lib/libnetifaces.a -arch x86_64 /Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/build/netifaces/x86_64/netifaces-0.10.9/libnetifaces.a -arch arm64 /Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/build/netifaces/arm64/netifaces-0.10.9/libnetifaces.a
2020-05-06T22:49:57.2585040Z 
2020-05-06T22:49:57.2585130Z   STDOUT:
2020-05-06T22:49:57.2585740Z fatal error: /Applications/Xcode_11.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: /Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/build/netifaces/x86_64/netifaces-0.10.9/libnetifaces.a (No such file or directory)
2020-05-06T22:49:57.2585850Z 
2020-05-06T22:49:57.2585900Z 
2020-05-06T22:49:57.2585990Z   STDERR:
2020-05-06T22:49:57.2586050Z 
2020-05-06T22:49:57.2586090Z 
2020-05-06T22:49:57.2619810Z Traceback (most recent call last):
2020-05-06T22:49:57.2620010Z   File "toolchain.py", line 3, in <module>
2020-05-06T22:49:57.2620110Z     main()
2020-05-06T22:49:57.2620700Z   File "/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/kivy_ios/toolchain.py", line 1486, in main
2020-05-06T22:49:57.2620830Z     ToolchainCL()
2020-05-06T22:49:57.2621360Z   File "/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/kivy_ios/toolchain.py", line 1230, in __init__
2020-05-06T22:49:57.2621490Z     getattr(self, args.command)()
2020-05-06T22:49:57.2622010Z   File "/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/kivy_ios/toolchain.py", line 1283, in build
2020-05-06T22:49:57.2622400Z     build_recipes(args.recipe, ctx)
2020-05-06T22:49:57.2623000Z   File "/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/kivy_ios/toolchain.py", line 1112, in build_recipes
2020-05-06T22:49:57.2623260Z     recipe.execute()
2020-05-06T22:49:57.2623780Z   File "/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/kivy_ios/toolchain.py", line 698, in execute
2020-05-06T22:49:57.2624090Z     self.build_all()
2020-05-06T22:49:57.2624650Z   File "/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/kivy_ios/toolchain.py", line 84, in _cache_execution
2020-05-06T22:49:57.2624770Z     f(self, *args, **kwargs)
2020-05-06T22:49:57.2625270Z   File "/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/kivy_ios/toolchain.py", line 802, in build_all
2020-05-06T22:49:57.2625400Z     self.make_lipo(static_fn)
2020-05-06T22:49:57.2625910Z   File "/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/kivy_ios/toolchain.py", line 84, in _cache_execution
2020-05-06T22:49:57.2626030Z     f(self, *args, **kwargs)
2020-05-06T22:49:57.2626550Z   File "/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/kivy_ios/toolchain.py", line 861, in make_lipo
2020-05-06T22:49:57.2627050Z     shprint(sh.lipo, "-create", "-output", filename, *args)
2020-05-06T22:49:57.2627710Z   File "/Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/kivy_ios/toolchain.py", line 66, in shprint
2020-05-06T22:49:57.2627830Z     for line in cmd:
2020-05-06T22:49:57.2628450Z   File "/Users/runner/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/site-packages/sh.py", line 863, in next
2020-05-06T22:49:57.2628580Z     self.wait()
2020-05-06T22:49:57.2629110Z   File "/Users/runner/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/site-packages/sh.py", line 792, in wait
2020-05-06T22:49:57.2629230Z     self.handle_command_exit_code(exit_code)
2020-05-06T22:49:57.2629790Z   File "/Users/runner/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/site-packages/sh.py", line 815, in handle_command_exit_code
2020-05-06T22:49:57.2629910Z     raise exc
2020-05-06T22:49:57.2630010Z sh.ErrorReturnCode_1: 
2020-05-06T22:49:57.2630070Z 
2020-05-06T22:49:57.2630760Z   RAN: /usr/bin/lipo -create -output /Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/dist/lib/libnetifaces.a -arch x86_64 /Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/build/netifaces/x86_64/netifaces-0.10.9/libnetifaces.a -arch arm64 /Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/build/netifaces/arm64/netifaces-0.10.9/libnetifaces.a
2020-05-06T22:49:57.2630890Z 
2020-05-06T22:49:57.2630970Z   STDOUT:
2020-05-06T22:49:57.2631590Z fatal error: /Applications/Xcode_11.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: /Users/runner/runners/2.169.1/work/kivy-ios/kivy-ios/build/netifaces/x86_64/netifaces-0.10.9/libnetifaces.a (No such file or directory)
2020-05-06T22:49:57.2631680Z 
2020-05-06T22:49:57.2631740Z 
2020-05-06T22:49:57.2631810Z   STDERR:
2020-05-06T22:49:57.2631870Z 
2020-05-06T22:49:57.2836300Z Traceback (most recent call last):
2020-05-06T22:49:57.2837180Z   File ".ci/rebuild_updated_recipes.py", line 48, in <module>
2020-05-06T22:49:57.2837530Z     main()
2020-05-06T22:49:57.2837950Z   File ".ci/rebuild_updated_recipes.py", line 41, in main
2020-05-06T22:49:57.2838250Z     f"python3 toolchain.py build {updated_recipes}", shell=True, check=True
2020-05-06T22:49:57.2838690Z   File "/Users/runner/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/subprocess.py", line 512, in run
2020-05-06T22:49:57.2839120Z     output=stdout, stderr=stderr)
2020-05-06T22:49:57.2840110Z subprocess.CalledProcessError: Command 'python3 toolchain.py build netifaces' returned non-zero exit status 1.
2020-05-06T22:49:57.2916930Z - Download 113.60%
2020-05-06T22:49:57.2921300Z ##[error]Process completed with exit code 1.
2020-05-06T22:49:57.3072060Z Post job cleanup.
2020-05-06T22:49:57.4308400Z [command]/usr/local/bin/git version
2020-05-06T22:49:57.4397310Z git version 2.26.2
2020-05-06T22:49:57.4446080Z [command]/usr/local/bin/git config --local --name-only --get-regexp core\.sshCommand
2020-05-06T22:49:57.4514980Z [command]/usr/local/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
2020-05-06T22:49:57.5423280Z [command]/usr/local/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2020-05-06T22:49:57.5477560Z http.https://github.com/.extraheader
2020-05-06T22:49:57.5488830Z [command]/usr/local/bin/git config --local --unset-all http.https://github.com/.extraheader
2020-05-06T22:49:57.5561630Z [command]/usr/local/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
2020-05-06T22:49:57.6501530Z Cleaning up orphan processes
```

Note this is an early version working on the `x86_64` simulator.
It wasn't tested on an arm device.
Requires setuptools to be installed:
```sh
python toolchain.py pip install setuptools
```
Tested with main.py:
```python
import netifaces
print("interfaces:", netifaces.interfaces())
```
And produced the following output in the `x86_64` simulator:
```
Available orientation: KIVY_ORIENTATION=LandscapeLeft LandscapeRight Portrait PortraitUpsideDown
Initializing python
Running main.py: /Users/vagrant/Library/Developer/CoreSimulator/Devices/.../Application/.../testnetifaces.app/YourApp/main.pyc
interfaces: ['lo0', 'gif0', 'stf0', 'en0', 'utun0', 'utun1']
Leaving
```
@AndreMiras
Copy link
Member Author

Fixed the build, merging 🚀

@AndreMiras AndreMiras merged commit c35c94a into kivy:master May 7, 2020
@AndreMiras AndreMiras deleted the feature/netifaces_recipe branch May 7, 2020 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant