kivy-ios won't build in xcode - ios
I have ran through this at least 100 times now... trying various combinations of builds, orders, while trying different 'fixes' each time... I think i've narrowed down to two errors that prevent me from moving forward.
Also, i've had this same Kivy app build successfully a few weeks ago. Only changes to the app were more screens, no new python libraries.
-->
Versions
i've tried all these combinations...
Python : 3.9.15
python: 3.10
python: 3.11
MacOS version : Monterey 12.6.1
XCode Version : 14.1
Cython version : 0.29.32
Cython version: 0.29.28
To Reproduce first Error
$ cd usr/dev/projects
$ git clone https://github.com/kivy/kivy-ios.git
$ cd kivy-ios/
$ python3 -m venv venv
$ . venv/bin/activate
$ pip install -e .
$ pip install cython
$ toolchain build python3 kivy pillow
$ toolchain status
$ toolchain status
audiostream - Not built
audiostream - Not built
click - Not built
curly - Not built
cymunk - Not built
ffmpeg - Not built
ffpyplayer - Not built
flask - Not built
freetype - Build OK (built at 2022-11-15 04:16:58.707553)
host_setuptools - Not built
host_setuptools3 - Build OK (built at 2022-11-15 04:35:28.742929)
hostopenssl - Build OK (built at 2022-11-15 04:18:11.112986)
hostpython3 - Build OK (built at 2022-11-15 04:28:05.637191)
ios - Build OK (built at 2022-11-15 04:35:43.519411)
itsdangerous - Not built
jinja2 - Not built
kivent_core - Not built
kivy - Build OK (built at 2022-11-15 04:41:37.035634)
libcurl - Not built
libffi - Build OK (built at 2022-11-15 04:20:59.996058)
libjpeg - Build OK (built at 2022-11-15 04:21:38.399225)
libpng - Not built
libzbar - Not built
markupsafe - Not built
netifaces - Not built
numpy - Not built
openssl - Build OK (built at 2022-11-15 04:23:50.211809)
photolibrary - Not built
pillow - Build OK (built at 2022-11-15 04:42:27.446835)
plyer - Not built
py3dns - Not built
pycrypto - Not built
pykka - Not built
pyobjus - Build OK (built at 2022-11-15 04:36:40.557163)
python3 - Build OK (built at 2022-11-15 04:35:23.642768)
pyyaml - Not built
sdl2 - Build OK (built at 2022-11-15 04:24:49.676846)
sdl2_image - Build OK (built at 2022-11-15 04:28:21.407035)
sdl2_mixer - Build OK (built at 2022-11-15 04:28:35.747256)
sdl2_ttf - Build OK (built at 2022-11-15 04:29:49.730854)
werkzeug - Not built
zbarlight - Not built
$ toolchain pip list
[DEBUG ] Package Version
[DEBUG ] ---------- ----------
[DEBUG ] certifi 2022.9.24
[DEBUG ] ios 1.1
[DEBUG ] Kivy 2.2.0.dev0
[DEBUG ] Pillow 8.2.0
[DEBUG ] pip 21.2.4
[DEBUG ] pyobjus 1.2.2.dev0
[DEBUG ] setuptools 58.1.0
$ toolchain create myapp /usr/dev/projects/company/app
$ open myapp-ios/myapp.xcodeproj/
In Xcode
CMD + SHIFT + K : Clean Successful
target -> signing and capabilities : Set Team
Run app.
Build Fail
error:
ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk/System/Library/Frameworks/Metal.framework/Metal.tbd) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk/System/Library/Frameworks/QuartzCore.framework/QuartzCore.tbd) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk/System/Library/Frameworks/Accelerate.framework/Accelerate.tbd) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk/System/Library/Frameworks/CoreHaptics.framework/CoreHaptics.tbd) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk/System/Library/Frameworks/WebKit.framework/WebKit.tbd) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk/System/Library/Frameworks/OpenGLES.framework/OpenGLES.tbd) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk/System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth.tbd) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices.tbd) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk/System/Library/Frameworks/CoreMedia.framework/CoreMedia.tbd) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk/System/Library/Frameworks/CoreMotion.framework/CoreMotion.tbd) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk/System/Library/Frameworks/CoreServices.framework/CoreServices.tbd) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk/System/Library/Frameworks/FileProvider.framework/FileProvider.tbd) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/System/Library/PrivateFrameworks/DocumentManager.framework/DocumentManager) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/System/Library/PrivateFrameworks/PrintKitUI.framework/PrintKitUI) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/System/Library/PrivateFrameworks/ShareSheet.framework/ShareSheet) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/System/Library/PrivateFrameworks/WebKitLegacy.framework/WebKitLegacy) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libcache.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libcommonCrypto.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libcompiler_rt.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libcopyfile.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libcorecrypto.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libdispatch.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libdyld.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libmacho.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libremovefile.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_asl.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_blocks.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_c.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_collections.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_configuration.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_containermanager.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_coreservices.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_darwin.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_dnssd.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_featureflags.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_info.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_m.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_malloc.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_networkextension.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_notify.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_sandbox.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_sim_kernel.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_sim_platform.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_sim_pthread.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_trace.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libunwind.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libxpc.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk/usr/lib/libc++abi.tbd) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libBLAS.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libBNNS.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLAPACK.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLinearAlgebra.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libQuadrature.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libSparse.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libSparseBLAS.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvMisc.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/System/Library/PrivateFrameworks/CollectionViewCore.framework/CollectionViewCore) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/System/Library/PrivateFrameworks/UIFoundation.framework/UIFoundation) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_sim_kernel_host.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_sim_platform_host.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_sim_pthread_host.dylib) built for iOS Simulator
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_kernel.dylib) built for macOS/Mac Catalyst
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_platform.dylib) built for macOS/Mac Catalyst
ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libsystem_pthread.dylib) built for macOS/Mac Catalyst
duplicate symbol '_FT_Get_BDF_Charset_ID' in:
/Users/theokoester/dev/projects/TheCWA/kivy-ios/dist/lib/libfreetype.a(ftbdf.o)
/Users/theokoester/dev/projects/TheCWA/kivy-ios/dist/lib/libsdl2_ttf.a(ftbdf.o)
duplicate symbol '_FT_Get_BDF_Property' in:
/Users/theokoester/dev/projects/TheCWA/kivy-ios/dist/lib/libfreetype.a(ftbdf.o)
/Users/theokoester/dev/projects/TheCWA/kivy-ios/dist/lib/libsdl2_ttf.a(ftbdf.o)
duplicate symbol '_FTC_SBitCache_New' in:
/Users/theokoester/dev/projects/TheCWA/kivy-ios/dist/lib/libfreetype.a(ftcache.o)
/Users/theokoester/dev/projects/TheCWA/kivy-ios/dist/lib/libsdl2_ttf.a(ftcache.o)
ld: 407 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've done a lot of research on this, can't find anything that relates to kivy. I tried to delete either one of those files and neither fixed the problem. I'm not familiar with xcode and new to programming so if this is an obvious fix I apologize in advance for wasting your time lol... I didn't see anything about this in issues either.
Expected behavior
These three builds alone shouldn't have any error. It should build successfully but fail to open and prompt me with a module not found error looking for Kivymd, Pandas, etc to install through toolchain pip install
**To Reproduce other Error **
$ cd usr/dev/projects
$ git clone https://github.com/kivy/kivy-ios.git
$ cd kivy-ios/
$ python3 -m venv venv
$ . venv/bin/activate
$ pip install -e .
$ pip install cython
$ toolchain build python3 kivy
$ toolchain pip install kivymd
$ toolchain status
audiostream - Not built
click - Not built
curly - Not built
cymunk - Not built
ffmpeg - Not built
ffpyplayer - Not built
flask - Not built
freetype - Not built
host_setuptools - Not built
host_setuptools3 - Build OK (built at 2022-11-15 07:22:16.960791)
hostopenssl - Build OK (built at 2022-11-15 07:06:20.473683)
hostpython3 - Build OK (built at 2022-11-15 07:15:12.857374)
ios - Build OK (built at 2022-11-15 07:22:29.949586)
itsdangerous - Not built
jinja2 - Not built
kivent_core - Not built
kivy - Build OK (built at 2022-11-15 07:27:38.583888)
libcurl - Not built
libffi - Build OK (built at 2022-11-15 07:08:57.115738)
libjpeg - Not built
libpng - Not built
libzbar - Not built
markupsafe - Not built
netifaces - Not built
numpy - Not built
openssl - Build OK (built at 2022-11-15 07:11:11.841915)
photolibrary - Not built
pillow - Not built
plyer - Not built
py3dns - Not built
pycrypto - Not built
pykka - Not built
pyobjus - Build OK (built at 2022-11-15 07:23:22.322053)
python3 - Build OK (built at 2022-11-15 07:22:12.422587)
pyyaml - Not built
sdl2 - Build OK (built at 2022-11-15 07:12:10.832230)
sdl2_image - Build OK (built at 2022-11-15 07:15:27.163816)
sdl2_mixer - Build OK (built at 2022-11-15 07:15:41.012560)
sdl2_ttf - Build OK (built at 2022-11-15 07:16:55.338599)
werkzeug - Not built
zbarlight - Not built
$ toolchain pip list
[DEBUG ] Package Version
[DEBUG ] ------------------ ----------
[DEBUG ] certifi 2022.9.24
[DEBUG ] charset-normalizer 2.1.1
[DEBUG ] docutils 0.19
[DEBUG ] idna 3.4
[DEBUG ] ios 1.1
[DEBUG ] Kivy 2.2.0.dev0
[DEBUG ] Kivy-Garden 0.1.5
[DEBUG ] kivymd 1.1.1
[DEBUG ] Pillow 9.3.0
[DEBUG ] pip 21.2.4
[DEBUG ] Pygments 2.13.0
[DEBUG ] pyobjus 1.2.2.dev0
[DEBUG ] requests 2.28.1
[DEBUG ] setuptools 58.1.0
[DEBUG ] urllib3 1.26.12
$ toolchain create myapp /location
$ open myapp/xcodeproj
In Xcode
CMD + SHIFT + K : Clean Successful
target -> signing and capabilities : Set Team
Run app.
Build Successfull
Installs, then brings up black screen and crashes
2022-11-15 02:33:35.371824-0500 myapp[2401:836449] Available orientation: KIVY_ORIENTATION=LandscapeLeft LandscapeRight Portrait PortraitUpsideDown
2022-11-15 02:33:35.371888-0500 myapp[2401:836449] Initializing python
2022-11-15 02:33:35.436466-0500 myapp[2401:836449] Running main.py: /private/var/containers/Bundle/Application/E33C15A2-786F-42FA-9DF4-E38BE71E8D94/myapp.app/YourApp/main.pyc
[WARNING] [Config ] Older configuration version detected (0 instead of 24)
[WARNING] [Config ] Upgrading configuration in progress.
[INFO ] [Logger ] Record log in /private/var/mobile/Containers/Data/Application/0D7745A7-2A9D-45E4-845F-DAE7D022B9A2/Documents/.kivy/logs/kivy_22-11-15_0.txt
[INFO ] [Kivy ] v2.2.0.dev0
[INFO ] [Kivy ] Installed at "/private/var/containers/Bundle/Application/E33C15A2-786F-42FA-9DF4-E38BE71E8D94/myapp.app/lib/python3.9/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.9.9 (main, Nov 15 2022, 02:21:14)
[Clang 14.0.0 (clang-1400.0.29.202)]
[INFO ] [Python ] Interpreter at "/private/var/containers/Bundle/Application/E33C15A2-786F-42FA-9DF4-E38BE71E8D94/myapp.app/myapp"
[INFO ] [Logger ] Purge log fired. Processing...
[INFO ] [Logger ] Purge finished!
[INFO ] [KivyMD ] 1.1.1, git-Unknown, 2022-11-10 (installed at "/private/var/containers/Bundle/Application/E33C15A2-786F-42FA-9DF4-E38BE71E8D94/myapp.app/lib/python3.9/site-packages/kivymd/__init__.py")
[INFO ] [Factory ] 189 symbols loaded
[INFO ] [Image ] Providers: img_imageio, img_tex, img_sdl2 (img_dds, img_ffpyplayer, img_pil ignored)
[INFO ] [Text ] Provider: sdl2
[INFO ] [Window ] Provider: sdl2
2022-11-15 02:33:35.756170-0500 myapp[2401:836449] You need UIApplicationSupportsIndirectInputEvents in your Info.plist for mouse support
2022-11-15 02:33:35.883694-0500 myapp[2401:836449] Metal GPU Frame Capture Enabled
2022-11-15 02:33:35.884590-0500 myapp[2401:836449] Metal API Validation Enabled
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used <sdl2>
[INFO ] [GL ] OpenGL version <b'OpenGL ES 2.0 Metal - 99'>
[INFO ] [GL ] OpenGL vendor <b'Apple Inc.'>
[INFO ] [GL ] OpenGL renderer <b'Apple A14 GPU'>
[INFO ] [GL ] OpenGL parsed version: 2, 0
[INFO ] [GL ] Shading version <b'OpenGL ES GLSL ES 1.00'>
[INFO ] [GL ] Texture max size <4096>
[INFO ] [GL ] Texture max units <8>
2022-11-15 02:33:36.001447-0500 myapp[2401:836449] fopen failed for data file: errno = 2 (No such file or directory)
2022-11-15 02:33:36.001560-0500 myapp[2401:836449] Errors found! Invalidating cache...
2022-11-15 02:33:36.012163-0500 myapp[2401:836449] fopen failed for data file: errno = 2 (No such file or directory)
2022-11-15 02:33:36.012232-0500 myapp[2401:836449] Errors found! Invalidating cache...
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
Got dlopen error on Foundation: dlopen(/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation, 0x0001): tried: '/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation' (errno=2), '/private/preboot/Cryptexes/OS/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation' (errno=2), '/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation' (errno=2, not in dyld cache)
Got fallback dlopen error on Foundation: dlopen(/Groups/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation, 0x0001): tried: '/Groups/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation' (errno=2), '/private/preboot/Cryptexes/OS/Groups/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation' (errno=2), '/Groups/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation' (errno=2), '/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation' (errno=2, not in dyld cache)
Traceback (most recent call last):
File "<string>", line 44, in load_module
File "/Users/theokoester/dev/projects/TheCWA/kivy-ios/dist/root/python3/lib/python3.9/imp.py", line 342, in load_dynamic
File "<frozen importlib._bootstrap>", line 711, in _load
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 565, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1173, in create_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
ImportError: dynamic module does not define module export function (PyInit_PIL__imaging)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/theokoester/dev/projects/TheCWA/kivy-ios/myapp-ios/YourApp/main.py", line 116, in <module>
File "/Users/theokoester/dev/projects/TheCWA/kivy-ios/myapp-ios/YourApp/View/screens.py", line 4, in <module>
File "/Users/theokoester/dev/projects/TheCWA/kivy-ios/myapp-ios/YourApp/Controller/admin_screen.py", line 3, in <module>
File "/Users/theokoester/dev/projects/TheCWA/kivy-ios/myapp-ios/YourApp/View/AdminScreen/admin_screen.py", line 3, in <module>
File "/Users/theokoester/dev/projects/TheCWA/kivy-ios/myapp-ios/YourApp/View/AdminScreen/components/Create/Contests/create_contest.py", line 5, in <module>
File "/private/var/containers/Bundle/Application/E33C15A2-786F-42FA-9DF4-E38BE71E8D94/myapp.app/lib/python3.9/site-packages/kivymd/uix/pickers/__init__.py", line 1, in <module>
from .colorpicker import MDColorPicker # NOQA F401
File "/private/var/containers/Bundle/Application/E33C15A2-786F-42FA-9DF4-E38BE71E8D94/myapp.app/lib/python3.9/site-packages/kivymd/uix/pickers/colorpicker/__init__.py", line 1, in <module>
from .colorpicker import MDColorPicker # NOQA F401
File "/private/var/containers/Bundle/Application/E33C15A2-786F-42FA-9DF4-E38BE71E8D94/myapp.app/lib/python3.9/site-packages/kivymd/uix/pickers/colorpicker/colorpicker.py", line 97, in <module>
from PIL import Image as PilImage
File "/private/var/containers/Bundle/Application/E33C15A2-786F-42FA-9DF4-E38BE71E8D94/myapp.app/lib/python3.9/site-packages/PIL/Image.py", line 100, in <module>
from . import _imaging as core
File "<string>", line 48, in load_module
File "/Users/theokoester/dev/projects/TheCWA/kivy-ios/dist/root/python3/lib/python3.9/imp.py", line 342, in load_dynamic
ImportError: dynamic module does not define module export function (PyInit__imaging)
2022-11-15 02:33:36.265865-0500 myapp[2401:836449] Application quit abnormally!
2022-11-15 02:33:36.281447-0500 myapp[2401:836449] Leaving
So for this error code, i found kiy-ios issue #644 where the solution is to build pillow before toolchain pip install kivymd, but that's what i did in my first attempt.
So now I could try to $ toolchain build pillow
and $ toolchain update myapp-ios
rerun app in xcode
407 duplicate error from above
but now I have mismatched versions of Pillow
Build: 8.2.0
Pip: 9.3
I fix that, and still 407 duplicates.
So i'm in a circle and can't find my way out. Any help would be greatly appreciated.
I fixed the 407 duplicates issue by uninstalling and reinstalling Xcode
Related
EAS iOS build fails with Fastlane error: “error extracting version from module interface”
Managed Workflow eas-cli version is 0.60.0 Goal: embed third-party native library as npm package to a managed Expo project. What I have: the library provided by vendor as a .xcframework for iOS (Swift) and .aab file for Android. What I did: generated a template for custom React Native library using npx create-react-native-library command. added .aab and .xcframework files to appropriate folders. provided implementation in Java and Swift for both platforms. built library locally. prior to publish my RN package to a private GH repo I tested library in example app which was generated by create-react-native-library, to ensure that everything works right. example app works as expected. published RN package to a repo and installed it into my Expo project. STUCK ON THIS STEP: I try to build custom dev client using eas build command. And the build fails. ❌ (/Users/expo/workingdir/build/app/node_modules/#bridgemoney/react-native-sardine/ios/ReactNativeSardine.swift:2:8) 1 | import Foundation > 2 | import MobileIntelligence | ^ error extracting version from module interface 3 | 4 | #objc(ReactNativeSardine) 5 | class ReactNativeSardine: RCTEventEmitter { ❌ (/Users/expo/Library/Developer/Xcode/DerivedData/BridgeGo-cyholdfvmztnmecppglqrfgqcshq/Build/Intermediates.noindex/ArchiveIntermediates/BridgeGo/BuildProductsPath/Debug-iphoneos/XCFrameworkIntermediates/bridgemoney-react-native-sardine/MobileIntelligence.framework/Modules/MobileIntelligence.swiftmodule/arm64-apple-ios.swiftinterface:1:1) > 1 | // swift-interface-format-version: 1.0 | ^ error extracting version from module interface 2 | // swift-compiler-version: Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) 3 | // swift-module-flags: -target arm64-apple-ios11.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name MobileIntelligence 4 | import AdSupport ▸ ** ARCHIVE FAILED ** ▸ The following build commands failed: ▸ CompileSwift normal arm64 /Users/expo/workingdir/build/app/node_modules/#bridgemoney/react-native-sardine/ios/ReactNativeSardine.swift (in target 'bridgemoney-react-native-sardine' from project 'Pods') ▸ EmitSwiftModule normal arm64 (in target 'bridgemoney-react-native-sardine' from project 'Pods') ▸ CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'bridgemoney-react-native-sardine' from project 'Pods') ▸ (3 failures) Do anyone know what does this mean and how to fix this? More context: I use latest image for iOS in eas.json file with XCode 13.4 and Swift 5.6.1 example RN app compiles and works as expected with my custom library. On my local Mac I use XCode 13.4.1 and Swift 5.6.1 as well.
Bitcode recompilation of WebRTC targeting tvOS
I am trying to recompile the bitcode of my tvOS app, including the bundled WebRTC framework, for the purpose of being able to successfully submit the app to the App Store. This same process with the iOS app succeeds. Upon pushing the tvOS app to the App Store, an email alerts me that: ITMS-90562: Invalid Bundle - One or more dynamic libraries that are referenced by your app are not present in the dylib search path. To diagnose the issue, I switched to an Ad Hoc distribution with bitcode rebuilding locally. I did this with both iOS and tvOS so that I could compare the resulting log files. The earliest difference in the process is this, seen below, where it is apparently putting together a linkage graph. iOS Scanning IPA... Complete LinkageGraph: Streamie.app/PlugIns/StreamieNotificationService-iOS.appex/StreamieNotificationService-iOS arm64 -> Streamie.app/Streamie arm64 -> Streamie.app/Frameworks/WebRTC.framework/WebRTC arm64 Streamie.app/Frameworks/WebRTC.framework/WebRTC arm64 -> tvOS (note the warning...) Scanning IPA... warning: Failed to resolve linkage dependency Streamie arm64 -> #rpath/WebRTC.framework/WebRTC: Could not find MachO for /private/var/folders/43/rmt6yww10fg1dbs9tzlfwvlh0000gn/T/XcodeDistPipeline.~~~nvA8Ku/Root/Payload/Streamie.app/Frameworks/WebRTC.framework/WebRTC Complete LinkageGraph: Streamie.app/Streamie arm64 -> $ otool -L WebRTC.framework/WebRTC (system libs and such removed) WebRTC.framework/WebRTC (architecture arm64): #rpath/WebRTC.framework/WebRTC (compatibility version 0.0.0, current version 0.0.0) $ file WebRTC.framework/WebRTC /[snip]/webrtc/WebRTC.framework/WebRTC: Mach-O universal binary with 1 architecture: [arm64:Mach-O 64-bit dynamically linked shared library arm64] /[snip]/WebRTC.framework/WebRTC (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64 When the bitcode building process finally fails, the log file concludes with: /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:372:in `run' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2886:in `block in CompileOrStripBitcodeInBundle' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2825:in `each' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2825:in `CompileOrStripBitcodeInBundle' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3112:in `block in ProcessIPA' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3073:in `each' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3073:in `ProcessIPA' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:4035:in `<main>'" UserInfo={NSLocalizedDescription=ipatool failed with an exception: #<CmdSpec::NonZeroExitException: $ /Applications/Xcode.app/Contents/Developer/usr/bin/python3 /Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool -v -t /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin -L --sdk /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS15.2.sdk -o /var/folders/43/rmt6yww10fg1dbs9tzlfwvlh0000gn/T/ipatool20220214-66770-pw6k3b/thinned-out/arm64/Payload/Streamie.app/Streamie --generate-dsym /var/folders/43/rmt6yww10fg1dbs9tzlfwvlh0000gn/T/ipatool20220214-66770-pw6k3b/thinned-out/arm64/Payload/Streamie.app/Streamie.dSYM --strip-swift-symbols /var/folders/43/rmt6yww10fg1dbs9tzlfwvlh0000gn/T/ipatool20220214-66770-pw6k3b/thinned-in/arm64/Payload/Streamie.app/Streamie Status: pid 66874 exit 1 [snip thousands of lines] Search Path: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/lib/darwin, /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/appletvos, /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS15.2.sdk/usr/lib, /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS15.2.sdk/System/Library/Frameworks WebRTC not found in dylib search path Some additional notes: I can build-and-run to an Apple TV without issue. I can archive the app and side-load it, and run it on an Apple TV just fine. The resulting iOS and tvOS WebRTC frameworks are each around 620MB, which is roughly the expected size with bitcode enabled. To build WebRTC targeting tvOS, I'm using a modification of this script, seen below, combined with the build script here. #!/bin/bash GN_OUT_PATH=$1 ${GN_OUT_PATH}/obj/pc/peerconnection.ninja | awk '{ print $47 }') IPHONE_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk TV_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS15.2.sdk IPHONE_SYSROOT_SED=$(echo "${IPHONE_SYSROOT//\//\\/}") TV_SYSROOT_SED=$(echo "${TV_SYSROOT//\//\\/}") ninjas=`find ${GN_OUT_PATH} -name '*.ninja'` ninjas=$(echo "$ninjas" | tr ' ' '\n' | sort -u | tr '\n' ' ') for ninja in $ninjas; do sed -i -- "s/${IPHONE_SYSROOT_SED}/${TV_SYSROOT_SED}/g" $ninja sed -i -- "s/iphoneos-version/appletvos-version/g" $ninja sed -i -- "s/arm64-apple-ios/arm64-apple-tvos/g" $ninja done My best guess at this point is that somehow the bitcode support in the WebRTC framework (for tvOS) is broken, but I don't know how verify that.
flutter build ios hava some problems library not found for -lBSGridCollectionViewLayout
Build ios have some error T.T Xcode's output: ↳ url_launcher-fgttqlawlkztnfglsqslrmrivxkq Building AOT snapshot in release mode (ios-release)... Building App.framework for arm64... Building App.framework for armv7... Building AOT snapshot in release mode (ios-release)... 38.2s Built to build/aot/. warning: parsing line table prologue at offset 0x6f697463 found unsupported version 0x00 warning: line table parameters mismatch. Cannot emit. note: while processing /Users/a./Desktop/business-b/business-b/build/aot/armv7/snapshot_assembly.o Project /Users/a./Desktop/business-b/business-b/ios/.. built and packaged successfully. ld: library not found for -lBSGridCollectionViewLayout clang: error: linker command failed with exit code 1 (use -v to see invocation) url_launcher-fgttqlawlkztnfglsqslrmrivxkq note: Using new build systemnote: Planning buildnote: Constructing build description
In this link Flutter ios release build failed with exit code 1 I found a reference to reinstall Flutter SDK, but it didn't work for me.
Code pipeline library not found for -lGoogleToolboxForMac
I'm getting the library not found for -lGoogleToolboxForMac while running the xcodebuild command from commandline. Most of the suggestions for this issue is resolving using xcode project. The pipeline calls the Cloud based MacOS agent and doesn't have any physical access to Mac system. I tried this suggestion command line option but no luck. How do I include lGoogleToolboxForMac part of the build command? 2018-12-10T01:51:35.9852980Z 2018-12-10T01:51:35.9853530Z ▸ Compiling main.m 2018-12-10T01:51:35.9854040Z ▸ Compiling UniversalAnalyticsPlugin.m 2018-12-10T01:51:35.9854790Z ▸ Compiling TouchID.m 2018-12-10T01:51:35.9855390Z ▸ Compiling TextResponseSerializer.m 2018-12-10T01:51:35.9856130Z ▸ Compiling TextRequestSerializer.m 2018-12-10T01:51:35.9856920Z ▸ Linking MyApp 2018-12-10T01:51:35.9857780Z ⚠️ ld: directory not found for option '-L/Users/vsts/Library/Developer/Xcode/DerivedData/MyApp-hjgdkeujtihqvvhkvkijivuagzlb/Build/Products/Release-iphoneos/GoogleToolboxForMac' 2018-12-10T01:51:35.9858710Z ⚠️ ld: directory not found for option '-L/Users/vsts/Library/Developer/Xcode/DerivedData/MyApp-hjgdkeujtihqvvhkvkijivuagzlb/Build/Products/Release-iphoneos/Protobuf' 2018-12-10T01:51:35.9859570Z ⚠️ ld: directory not found for option '-L/Users/vsts/Library/Developer/Xcode/DerivedData/MyApp-hjgdkeujtihqvvhkvkijivuagzlb/Build/Products/Release-iphoneos/nanopb' 2018-12-10T01:51:35.9860760Z ⚠️ ld: directory not found for option '-Liphoneos' 2018-12-10T01:51:35.9861030Z 2018-12-10T01:51:35.9861860Z ❌ ld: library not found for -lGoogleToolboxForMac 2018-12-10T01:51:35.9861920Z 2018-12-10T01:51:35.9862190Z 2018-12-10T01:51:35.9862290Z 2018-12-10T01:51:35.9862870Z ❌ clang: error: linker command failed with exit code 1 (use -v to see invocation) My code pipeline includes the below steps: Install Apple Certificate Install Mobile Provision file Install Node JS Install Ionic Install Cordova Install NPM Install Pod Ionic Cordova Platform Add ios Ionic Cordova Build ios What I'm missing here?
I have the same situation, but I have an extra step between 6 and 7 to install cocoapods.
I had fixed a similar problem by running the command pod install in the platforms/ios/ directory after iOS has been added.
How can I test iOS apps in XCode without it breaking my Rust toolchain?
I recently tested an IPhone application, written in Swift, with XCode using the built-in iPhone Simulator. Since then I get compile errors when I try to build any Rust project, even after updating Rust with rustup. There are warnings too which mention the iOS Simulator. I'm not familiar with the C or XCode toolchains, so I'm not sure what is the best way to fix it or how to prevent this happening again in the future. Note: my Rust projects are not targeting iOS. Here's what happens with a new project: $ cargo new test1 $ cd test1 $ cargo build Compiling test1 v0.1.0 (file:///Users/peter/dev/test1) error: linking with `cc` failed: exit code: 1 | = note: "cc" "-m64" "-L" "/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/peter/dev/test1/target/debug/deps/test1-7fe1ce40b6cf488e.1y16o1qfye96o7m0.rcgu.o" "/Users/peter/dev/test1/target/debug/deps/test1-7fe1ce40b6cf488e.3k2zkvohnahk04y3.rcgu.o" "/Users/peter/dev/test1/target/debug/deps/test1-7fe1ce40b6cf488e.3rngp6bm2u2q5z0y.rcgu.o" "/Users/peter/dev/test1/target/debug/deps/test1-7fe1ce40b6cf488e.4oc10dk278mpk1vy.rcgu.o" "/Users/peter/dev/test1/target/debug/deps/test1-7fe1ce40b6cf488e.4xq48u46a1pwiqn7.rcgu.o" "/Users/peter/dev/test1/target/debug/deps/test1-7fe1ce40b6cf488e.oa3rad818d8sgn4.rcgu.o" "-o" "/Users/peter/dev/test1/target/debug/deps/test1-7fe1ce40b6cf488e" "/Users/peter/dev/test1/target/debug/deps/test1-7fe1ce40b6cf488e.crate.allocator.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/peter/dev/test1/target/debug/deps" "-L" "/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-73671a9242f94467.rlib" "/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-5a05d0933700ddb1.rlib" "/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib" "/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-64fd20ce4af6fbad.rlib" "/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_system-2c5b1969da7ded68.rlib" "/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-c80953af6722fea1.rlib" "/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-2ed0d380199e717d.rlib" "/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-8c87fbf7e0bce62b.rlib" "/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-9b97130153f6d410.rlib" "-l" "System" "-l" "resolv" "-l" "pthread" "-l" "c" "-l" "m" = note: ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(jemalloc.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(jemalloc.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-73671a9242f94467.rlib(state.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-73671a9242f94467.rlib(state.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-73671a9242f94467.rlib(fileline.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-73671a9242f94467.rlib(fileline.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(arena.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(arena.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(base.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(base.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(chunk.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(chunk.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(chunk_dss.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(chunk_dss.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(ctl.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(ctl.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(huge.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(huge.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(mutex.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(mutex.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(util.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(util.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(tsd.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(tsd.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(tcache.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(tcache.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(stats.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(stats.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(pages.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(pages.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(prof.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(prof.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(quarantine.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(quarantine.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(witness.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(witness.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-73671a9242f94467.rlib(alloc.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-73671a9242f94467.rlib(alloc.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-73671a9242f94467.rlib(macho.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-73671a9242f94467.rlib(macho.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-73671a9242f94467.rlib(posix.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-73671a9242f94467.rlib(posix.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(bitmap.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(bitmap.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(chunk_mmap.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(chunk_mmap.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(ckh.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(ckh.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(extent.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(extent.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(nstime.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(nstime.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(rtree.pic.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3913d194bc6184af.rlib(rtree.pic.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-73671a9242f94467.rlib(dwarf.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-73671a9242f94467.rlib(dwarf.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-73671a9242f94467.rlib(read.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-73671a9242f94467.rlib(read.o)) was built for newer OSX version (10.7) than being linked (8.0) ld: warning: URGENT: building for iOS simulator, but linking in object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-73671a9242f94467.rlib(sort.o)) built for OSX. Note: This will be an error in the future. ld: warning: object file (/Users/peter/.rustup/toolchains/1.27.1-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-73671a9242f94467.rlib(sort.o)) was built for newer OSX version (10.7) than being linked (8.0) Undefined symbols for architecture x86_64: "_opendir$INODE64", referenced from: _macho_try_dsym in libstd-73671a9242f94467.rlib(macho.o) _macho_add in libstd-73671a9242f94467.rlib(macho.o) "_readdir$INODE64", referenced from: _macho_try_dsym in libstd-73671a9242f94467.rlib(macho.o) _macho_add in libstd-73671a9242f94467.rlib(macho.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) error: aborting due to previous error error: Could not compile `test1`. CC: $ cc --version Apple LLVM version 9.1.0 (clang-902.0.39.2) Target: x86_64-apple-darwin17.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin GCC: $ gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/c++/4.2.1 Apple LLVM version 9.1.0 (clang-902.0.39.2) Target: x86_64-apple-darwin17.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin Rust: $ rustup show active-toolchain 1.27.1-x86_64-apple-darwin Other information: $ echo $SDKROOT /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk $ echo $DEVELOPER_DIR /Applications/Xcode.app/Contents/Developer $ xcrun --show-sdk-path /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk $ xcode-select -p /Applications/Xcode.app/Contents/Developer I found this Rust issue, which sounds similar, but it's very old and also resolved: https://github.com/rust-lang/rust/issues/34617
You have overridden $SDKROOT to use the iPhone Simulator SDK. One simple fix would be undefining it before invoking the C compiler, which should make it use the macOS SDK instead. $ export SDKROOT= $ cargo build