Use dyld to link in frameworks at runtime. Use ld to make your programs and link archive libraries at build time.

Linker Documentation

Pinned Posts

Posts under Linker tag

165 Posts
Sort by:
Post not yet marked as solved
3 Replies
904 Views
open Terminal.app export DYLD_INSERT_LIBRARIES="path_to_dylib" env Result: x86: no DYLD_INSERT_LIBRARIES environment is printed. M1 pro: dyld[1393]: tried: '/usr/local/lib/***.dylib' (fat file, but missing compatible architecture (have 'x86_64,arm64', need '')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/***.dylib' (no such file), '/usr/local/lib/***.dylib' (fat file, but missing compatible architecture (have 'x86_64,arm64', need ''))
Posted
by
Post not yet marked as solved
24 Replies
19k Views
Hi, I am getting a linking error when building my app to run against an iOS17 device, using Xcode15. Same project builds and runs fine with Xcode 14 and iOS16. The linking error just says: clang: error: unable to execute command: Segmentation fault: 11 clang: error: linker command failed due to signal (use -v to see invocation) Not sure what I should try to overcome this. I can't run my app on an iOS17 device. It builds, links and runs just fine on a simulator.
Posted
by
Post not yet marked as solved
1 Replies
380 Views
In the recent Penetration test of our iOS app we found a vulnerability that {appName}.app/Frameworks/libswiftCoreImage.dylib does not enforce automatic reference counting protection.How to enable the ARC for .dylib files, I could not find the file anywhere in the project, please help me in fixing this.
Posted
by
Post not yet marked as solved
3 Replies
692 Views
Let's say there is a dylib whose source code is available in a repository of https://github.com/apple-oss-distributions. I can see a version/tag for this release in github. Now I want to find which versions of macOS include this version of the dylib. This requires to be able to tell which version of the lib is distributed with a specific macOS version. And this is already being a problem. If I create a small executable that is linked to this library and I use otool -L to see the version of the dylib, I get 1.0.0. Which definitely does not match a version/tag from github. If I use dlopen and the mach-o/dylib.h APIs to find the version listed in the appropriate segment/section, I also get 1.0.0. The next step I'm looking at is to spend some time to successfully build the dyld_shared_cache_util to extract the dylib from the cache and hope there will be more info. But, maybe, there is a document on Apple's website or a feature in the github repository that I missed. So the question is: is there a simple way to get this info?
Post not yet marked as solved
3 Replies
954 Views
Running an executable with DYLD_INSERT_LIBRARIES set and SIP disabled causes dyld to fail with the following error: (fat file, but missing compatible architecture (have 'x86_64,arm64', need '')). The same command succeeds without error when SIP is enabled. Is this intended behavior? If not, how can I solve the issue? Both the library to be inserted and the target binary are code signed, and the target binary has "Allow DYLD Environment Variables" enabled. This issue is not limited to my code, either- when setting DYLD_INSERT_LIBRARIES with launchctl setenv DYLD_INSERT_LIBRARIES <dylib path>, most apps fail to launch if SIP is disabled. In this case, I was able to launch Safari and Finder, but no third-party apps launched, and I could not find any other system apps that launched. macOS 13.3.1 (a), but this issue has existed for a while.
Posted
by
Post marked as solved
5 Replies
1.2k Views
App crashes at launch for some of our live users (NOT TESTFLIGHT). I have managed to extract the error log: Incident Identifier: B1F06CCD-4AAB-402F-9909-11FA7E1C54F3 Hardware Model: iPhone14,3 Process: *** [549] Path: /private/var/containers/Bundle/Application/DAE1AAC4-2150-46EF-B7B9-29553EA7346E/***.app/*** Identifier: com.XX.XX Version: 9.0 (70) AppStoreTools: 14E221 AppVariant: 1:iPhone14,3:15 Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.XX [580] Date/Time: 2023-06-12 15:59:45.2595 +1000 Launch Time: 2023-06-12 15:59:45.2060 +1000 OS Version: iPhone OS 15.6.1 (19G82) Release Type: User Baseband Version: 1.70.01 Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: DYLD 4 Symbol missing Symbol not found: (_objc_claimAutoreleasedReturnValue) Referenced from: '/Volumes/VOLUME/*/***.app/Frameworks/GoogleUtilities.framework/GoogleUtilities' Expected in: '/usr/lib/libobjc.A.dylib' (terminated at launch; ignore backtrace) Triggered by Thread: 0 Thread 0 Crashed: 0 dyld 0x00000001034bcb14 __abort_with_payload + 8 1 dyld 0x00000001034c26cc abort_with_payload_wrapper_internal + 104 (terminate_with_reason.c:102) 2 dyld 0x00000001034c2700 abort_with_payload + 16 (terminate_with_reason.c:124) 3 dyld 0x0000000103492a00 dyld4::halt(char const*) + 580 (DyldProcessConfig.cpp:2102) 4 dyld 0x000000010348fa20 dyld4::prepare(dyld4::APIs&amp;, dyld3::MachOAnalyzer const*) + 3560 (dyldMain.cpp:0) 5 dyld 0x000000010348dd84 start + 488 (dyldMain.cpp:864) Thread 0 crashed with ARM Thread State (64-bit): x0: 0x0000000000000006 x1: 0x0000000000000004 x2: 0x000000016ddc56c8 x3: 0x00000000000000e4 x4: 0x000000016ddc52c8 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x000000016ddc4d40 x8: 0x0000000000000020 x9: 0x0000000000000009 x10: 0x000000016ddc53b8 x11: 0x0000000000000108 x12: 0x0000000000000000 x13: 0x0000000000000035 x14: 0x0000000248f2d99d x15: 0x000000016ddc47e8 x16: 0x0000000000000209 x17: 0x00000001034b71c8 x18: 0x0000000000000000 x19: 0x0000000000000000 x20: 0x000000016ddc52c8 x21: 0x00000000000000e4 x22: 0x000000016ddc56c8 x23: 0x0000000000000004 x24: 0x0000000000000006 x25: 0x000000016ddc52c8 x26: 0x0000000000000400 x27: 0x0000000000000400 x28: 0x00000000000000f0 fp: 0x000000016ddc5290 lr: 0x00000001034c26cc sp: 0x000000016ddc5250 pc: 0x00000001034bcb14 cpsr: 0x1000 esr: 0x56000080 Address size fault Binary Images: 0x103474000 - 0x1034cbfff dyld arm64e &lt;66e1fb2668f8379ba052eb8b8291b5e1&gt; /usr/lib/dyld EOF Any help in fixing this issue with GoogleUtilities.framework/GoogleUtilities will be highly appreciated.
Posted
by
Post not yet marked as solved
1 Replies
515 Views
During our pen-test we have found an issue for a coreImage file stating that File Payload/Jeenie.app/Frameworks/libswiftCoreImage.dylib does not enforce automatic reference counting protection. How can we enable ARC for this particular file?
Posted
by
Post not yet marked as solved
0 Replies
832 Views
iOS app has been Build successfully but during launch on iOS Simulator application crashs with "signal SIGABRT" on Xcode 14.2 and iOS 16.2. FBSnapshotTestCase is already added to embed framework. Framework search path has the correct path. Frameworks are available on dependencies folder. Logs: dyld[32948]: Library not loaded: @rpath/XCTest.framework/XCTest Referenced from: &lt;E8E24ECE-C759-3CF6-AA8C-754959DB29F6&gt; /Users/&lt;user home&gt;/Library/Developer/Xcode/DerivedData/&lt;SDK Name&gt;-aoofobgnguypdxgcfjihpmsqhxjt/Build/Products/Debug-iphonesimulator/FBSnapshotTestCase.framework/FBSnapshotTestCase Reason: tried: '/Users/&lt;user home&gt;/Library/Developer/Xcode/DerivedData/&lt;SDK Name&gt;-aoofobgnguypdxgcfjihpmsqhxjt/Build/Products/Debug-iphonesimulator/XCTest.framework/XCTest' (errno=2), '/Users/&lt;userHome&gt;/Library/Developer/CoreSimulator/Devices/BD21B3CE-8869-4DFE-8994-F158B31A7D44/data/Containers/Bundle/Application/24BC3D00-E2E6-46B6-821F-B290665CF820/SampleApp.app/Frameworks/XCTest.framework/XCTest' (errno=2), '/Users/&lt;user home&gt;/Library/Developer/Xcode/DerivedData/&lt;SDK Name&gt;-aoofobgnguypdxgcfjihpmsqhxjt/Build/Products/Debug-iphonesimulator/FBSnapshotTestCase.framework/Frameworks/XCTest.framework/XCTest' (errno=2), '/Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/XCTest.framework/XCTest' (errno=2), '/usr/lib/swift/XCTest.framework/XCTest' (errno=2, not in dyld cache), '/Users/&lt;user home&gt;/Library/Developer/CoreSimulator/Devices/BD21B3CE-8869-4DFE-8994-F158B31A7D44/data/Containers/Bundle/Application/24BC3D00-E2E6-46B6-821F-B290665CF820/SampleApp.app/Frameworks/XCTest.framework/XCTest' (errno=2), '/Users/&lt;user home&gt;/Library/Developer/CoreSimulator/Devices/BD21B3CE-8869-4DFE-8994-F158B31A7D44/data/Containers/Bundle/Application/24BC3D00-E2E6-46B6-821F-B290665CF820/SampleApp.app/Frameworks/XCTest.framework/XCTest' (errno=2), '/Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/XCTest.framework/XCTest' (errno=2), '/usr/lib/swift/XCTest.framework/XCTest' (errno=2, not in dyld cache), '/Users/&lt;user home&gt;/Library/Developer/CoreSimulator/Devices/BD21B3CE-8869-4DFE-8994-F158B31A7D44/data/Containers/Bundle/Application/24BC3D00-E2E6-46B6-821F-B290665CF820/SampleApp.app/Frameworks/XCTest.framework/XCTest' (errno=2), '/Users/&lt;user home&gt;/Library/Developer/CoreSimulator/Devices/BD21B3CE-8869-4DFE-8994-F158B31A7D44/data/Containers/Bundle/Application/24BC3D00-E2E6-46B6-821F-B290665CF820/SampleApp.app/Frameworks/XCTest.framework/XCTest' (errno=2), '/Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/XCTest.framework/XCTest' (errno=2) Library not loaded: @rpath/XCTest.framework/XCTest Referenced from: &lt;E8E24ECE-C759-3CF6-AA8C-754959DB29F6&gt; /Users/&lt;user home&gt;/Library/Developer/Xcode/DerivedData/&lt;SDK Name&gt;-aoofobgnguypdxgcfjihpmsqhxjt/Build/Products/Debug-iphonesimulator/FBSnapshotTestCase.framework/FBSnapshotTestCase Reason: tried: '/Users/&lt;user home&gt;/Library/Developer/Xcode/DerivedData/&lt;SDK Name&gt;-aoofobgnguypdxgcfjihpmsqhxjt/Build/Products/Debug-iphonesimulator/XCTest.framework/XCTest' (errno=2), '/Users/&lt;user home&gt;/Library/Developer/CoreSimulator/Devices/BD21B3CE-8869-4DFE-8994-F158B31A7D44/data/Containers/Bundle/Application/24BC3D00-E2E6-46B6-821F-B290665CF820/SampleApp.app/Frameworks/XCTest.framework/XCTest' (errno=2), '/Users/&lt;user home&gt;/Library/Developer/Xcode/DerivedData/&lt;SDK Name&gt;-aoofobgnguypdxgcfjihpmsqhxjt/Build/Products/Debug-iphonesimulator/FBSnapshotTestCase.framework/Frameworks/XCTest.framework/XCTest' (errno=2), '/Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhon dyld config: DYLD_SHARED_CACHE_DIR=/Users/&lt;user home&gt;/Library/Developer/CoreSimulator/Caches/dyld/22F66/com.apple.CoreSimulator.SimRuntime.iOS-16-2.20C52 DYLD_ROOT_PATH=/Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/&lt;user home&gt;/Library/Developer/Xcode/DerivedData/&lt;SDK Name&gt;-aoofobgnguypdxgcfjihpmsqhxjt/Build/Products/Debug-iphonesimulator:/Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/usr/lib/libRPAC.dylib:/Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib DYLD_FRAMEWORK_PATH=/Users/&lt;user home&gt;/Library/Developer/Xcode/DerivedData/&lt;SDK Name&gt;-aoofobgnguypdxgcfjihpmsqhxjt/Build/Products/Debug-iphonesimulator DYLD_FALLBACK_FRAMEWORK_PATH=/Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks DYLD_FALLBACK_LIBRARY_PATH=/Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib (lldb)
Posted
by
Post not yet marked as solved
0 Replies
798 Views
I am using RxCocoa in custom framework, so I am trying to inject dependencies with SPM and make that .xcframework. I made the .xcframework, but the following error keeps appearing. The process of creating and configuring the framework project and creating the xcframework was as follows. Development Environment CPU : Apple slicon (M1 PRO) MacOS : Ventura 13.1 Xcode : 14.1 Step Create framework project (sdk-sample) Set Build Active Architecture Only YES from NO Mach-O Type is Dynamic Library Write simple code using RxSwift, Rxcocoa Create .xcarchive and .xcframework xcodebuild archive \ -scheme sdk-sample \ -archivePath ./archive/sdk-sample.framework-iphoneos.xcarchive \ -sdk iphoneos \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ xcodebuild archive \ -scheme sdk-sample \ -archivePath ./archive/sdk-sample.framework-iphonesimulator-arm64.xcarchive \ -sdk iphonesimulator \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ xcodebuild -create-xcframework \ -framework './archive/sdk-sample.framework-iphoneos.xcarchive/Products/Library/Frameworks/sdk_sample.framework' \ -framework './archive/sdk-sample.framework-iphonesimulator arm64.xcarchive/Products/Library/Frameworks/sdk_sample.framework' \ -output './MySDK.xcframework' Created Package.swift as below and uploaded it to git let package = Package( name: "MySDK", platforms: [ .iOS(.v13) ], products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. .library( name: "MySDK", targets: ["sdk-sample-target"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. // .package(url: /* package url */, from: "1.0.0"), .package( url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "6.5.0") ) ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. // Targets can depend on other targets in this package, and on products in packages this package depends on. // .bin .binaryTarget(name: "MySDK", path: "MySDK.xcframework"), .target( name: "sdk-sample-target", dependencies: [ .target(name: "MySDK"), .product(name: "RxSwift", package: "RxSwift"), .product(name: "RxCocoa", package: "RxSwift"), ], path: "Sources" ), ], swiftLanguageVersions: [ .v5 ] ) When I download the SDK I made with spm, an error occurs Is there any way to solve it?
Posted
by
Post not yet marked as solved
12 Replies
3.2k Views
Hi, team I have a problem with validating the app after finishing an archive. Please help to check this issue. Thank you. Full errors The app links to non-public libraries in Payload/Runner.app/Frameworks/image_picker_ios.framework/image_picker_ios: /System/Library/PrivateFrameworks/AVFCapture.framework/AVFCapture, /System/Library/PrivateFrameworks/AVFCore.framework/AVFCore (ID: 99d7af6c-ad1f-4af6-962f-944fee3f9996) System details macOS: 14.0 Beta (23A5257q) Xcode: 15.0 beta (15A5160n) Flutter & Dart: 3.10.5 | 3.0.5
Posted
by
Post not yet marked as solved
1 Replies
551 Views
Hi, I have a project where I want to load a library dynamically, I know this is possible since iOS 8 but I want to make something different. I want to ship that library encrypted and only decrypt it in runtime. Is this allowed according to Apple's guidelines? Thank you.
Posted
by
Post not yet marked as solved
2 Replies
1.9k Views
The third party library began to support only the static cocoapods library. Before that, it was connected as dynamic After changing the dynamic library to a static one, such an error began to appear Please help me figure this out: ld: warning: Could not find or use auto-linked library 'swiftCompatibility56' ld: warning: Could not find or use auto-linked framework '&lt;Name&gt;' ld: warning: Could not find or use auto-linked framework '&lt;Name&gt;' ld: warning: Could not find or use auto-linked framework '&lt;Name&gt;' Undefined symbols for architecture arm64: "__swift_FORCE_LOAD_$_swiftCompatibility56", referenced from: __swift_FORCE_LOAD_$_swiftCompatibility56_$_&lt;someName&gt; in &lt;ThirdPartyLibrary&gt;.a(File.o) __swift_FORCE_LOAD_$_swiftCompatibility56_$&lt;ThirdPartyLibrary&gt; in &lt;ThirdPartyLibrary&gt;.a(File.o) __swift_FORCE_LOAD_$_swiftCompatibility56_$&lt;ThirdPartyLibrary&gt; in &lt;ThirdPartyLibrary&gt;.a(File.o) __swift_FORCE_LOAD_$_swiftCompatibility56_$&lt;ThirdPartyLibrary&gt; in &lt;ThirdPartyLibrary&gt;.a(File.o) __swift_FORCE_LOAD_$_swiftCompatibility56_$&lt;ThirdPartyLibrary&gt; in &lt;ThirdPartyLibrary&gt;.a(File.o) __swift_FORCE_LOAD_$_swiftCompatibility56_$&lt;ThirdPartyLibrary&gt; in &lt;ThirdPartyLibrary&gt;.a(File.o) __swift_FORCE_LOAD_$_swiftCompatibility56_$&lt;ThirdPartyLibrary&gt; in &lt;ThirdPartyLibrary&gt;.a(File.o) ... (maybe you meant: __swift_FORCE_LOAD_$_swiftCompatibility56_$_&lt;ThirdPartyLibrary&gt;, __swift_FORCE_LOAD_$_swiftCompatibility56_$_&lt;ThirdPartyLibrary&gt; , __swift_FORCE_LOAD_$_swiftCompatibility56_$_&lt;ThirdPartyLibrary&gt; ) ld: symbol(s) not found for architecture arm64
Posted
by
Post not yet marked as solved
4 Replies
2.4k Views
Second attempt to publish the Mac version of my App, but it was rejected again due to the same error: 'Library missing'. The library IS included with the build. The extracted .app from .xcarchive runs without a problem on different machines, both M1 and Intel. So, I don't know what's wrong. Can somebody please help me? I can provide the complete .ips from Apple if needed. { "code": 1, "flags": 518, "namespace": "DYLD", "indicator": "Library missing", "details": [ "(terminated at launch; ignore backtrace)" ], "reasons": [ "Library not loaded: @rpath/TitaniumKit.framework/Versions/A/TitaniumKit", "Referenced from: &lt;85BA8613-0157-3B28-99AF-E73F1E579B72&gt; /Applications/TiDesigner.app/Contents/MacOS/TiDesigner", "Reason: tried: '/usr/lib/swift/TitaniumKit.framework/Versions/A/TitaniumKit' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/TitaniumKit.framework/Versions/A/TitaniumKit' (no such file), '/usr/lib/swift/TitaniumKit.framework/Versions/A/TitaniumKit' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/TitaniumKit.framework/Versions/A/TitaniumKit' (no such file), '/System/Library/Frameworks/TitaniumKit.framework/Versions/A/TitaniumKit' (no such file, not in dyld cache), (security policy does not allow @ path expansion)" ] }
Posted
by
Post not yet marked as solved
1 Replies
713 Views
clang: error: unable to execute command: Segmentation fault: 11 clang: error: linker command failed due to signal (use -v to see invocation) here is the crash log on ~/Library/Logs/DiagnosticReports: Thread 8 Crashed:: Dispatch queue: com.apple.root.user-interactive-qos 0 ld-prime 0x1040c8d90 ld::DynamicAtomFile::addObjCAtoms(ld::DynamicAtomFile*, ld::ObjCClassAtom*, unsigned long long) + 300 1 ld-prime 0x1040a1a60 invocation function for block in ld::InputFiles::parseObjectFile(ld::File::ReadOnlyMapping const&, ld::FileInfo const&, ld::AtomFile const*&) const + 624 2 ld-prime 0x10409ef9c ld::InputFiles::parseObjectFile(ld::File::ReadOnlyMapping const&, ld::FileInfo const&, ld::AtomFile const*&) const + 11068 3 ld-prime 0x1040aa658 ld::InputFiles::parseThinFile(ld::File::ReadOnlyMapping const&, ld::FileInfo const&, ld::AtomFile const*&, std::__1::optionalld::File::ReadOnlyMapping&, bool) const + 1084 4 ld-prime 0x1040ac418 ld::InputFiles::parseAllFiles(void (ld::AtomFile const*) block_pointer)::$_5::operator()(ld::InputFiles::ArchiveMember const&) const + 76 5 ld-prime 0x1040ac31c ld::InputFiles::parseAllFiles(void (ld::AtomFile const*) block_pointer)::$_6::operator()(unsigned long, ld::FileInfo const&) const + 384 6 libdispatch.dylib 0x189670440 _dispatch_client_callout2 + 20 7 libdispatch.dylib 0x189683f1c _dispatch_apply_invoke + 224 8 libdispatch.dylib 0x189670400 _dispatch_client_callout + 20 9 libdispatch.dylib 0x189681fb8 _dispatch_root_queue_drain + 684 10 libdispatch.dylib 0x1896826c0 _dispatch_worker_thread2 + 164 11 libsystem_pthread.dylib 0x18981c038 _pthread_wqthread + 228 12 libsystem_pthread.dylib 0x18981ad94 start_wqthread + 8
Posted
by
Post not yet marked as solved
2 Replies
423 Views
Hello. (hold for a moment, I'll get to the point) I'm developing addon for Blender and I'm trying to make it work on MacOS m1 too. I'm using hppfcl library for the addon and whenever I'm trying to import it from python I get the error below. Error: Python: Traceback (most recent call last): File "<string>", line 1, in <module> File "/Users/m1/Library/Application Support/Blender/3.6/scripts/addons/blenderbim/libs/site/packages/hppfcl/__init__.py", line 34, in <module> from .hppfcl import * ImportError: dlopen(/Users/m1/Library/Application Support/Blender/3.6/scripts/addons/blenderbim/libs/site/packages/hppfcl/hppfcl.cpython-310-darwin.so, 0x0002): Symbol not found: __ZN5boost6python15instance_holder8allocateEP7_objectmm Referenced from: /Users/m1/Library/Application Support/Blender/3.6/scripts/addons/blenderbim/libs/site/packages/hppfcl/hppfcl.cpython-310-darwin.so Expected in: /Applications/Blender.app/Contents/Resources/lib/libboost_python310.dylib The error is caused by the fact that /Applications/Blender.app/Contents/Resources/lib/libboost_python310.dylib is incompatible with hppfcl. I have compatible version in /Users/m1/Library/Application Support/Blender/3.6/scripts/addons/blenderbim/libs/libboost_python310.dylib. ❓Mine question is how to make scripts/addons/blenderbim/libs/libboost_python310.dylib either main library to be loaded for hppfcl or for the entire Blender (this will work too)? What I've tried and researched: If I check hppfcl library with otool -l hppfcl.cpython-310-darwin.so it's referring to the correct library that should be compatible given that /scripts/addons/blenderbim/libs/site/packages/hppfcl/../../../libboost_python310.dylib => /scripts/addons/blenderbim/libs/libboost_python310.dylib. Load command 20 cmd LC_RPATH cmdsize 40 path @loader_path/../../../ (offset 12) If i run otool -l /Applications/Blender.app/Contents/MacOS/Blender I see why error is referring to /Resources/lib/libboost_python310.dylib. So it seems that hppfcl @loader_path is overriden by Blender's @loader_path. Load command 65 cmd LC_RPATH cmdsize 48 path @loader_path/../Resources/lib (offset 12) I tried to use export DYLD_LIBRARY_PATH="/Users/m1/Library/Application Support/Blender/3.6/scripts/addons/blenderbim/libs/:$DYLD_LIBRARY_PATH" (and same thing with DYLD_FALLBACK_LIBRARY_PATH) before starting Blender which lead to no success - DYLD_LIBRARY_PATH is purged when I start Blender (deduced it by checking os.environ from python). I guess it's because Blender is protected process and the only way around it so either rebuild with different build settings or to disable system integrity protection (both are very bad options for the addon).
Posted
by
Post not yet marked as solved
1 Replies
732 Views
I have built a mergeable framework for distribution using Xcode 15. But when I try to merge it into an App target using -merge_framework in "Other linker flags", I get the error "Unknown argument: '-merge_framework'"? I'm not sure if the new linker is being used, but I assumed it would be used by default and I'm not sure of a way to enable it if not.
Posted
by
Post marked as solved
4 Replies
719 Views
We recently updated our deployment target from iOS 13 to iOS 14 and have no problems running on simulators. However, app would crash right after we tried to launch it and this only happens to our app running on physical devices. The crash would happen before AppDelegate's 'didFinishLaunchingWithOptions' and it happens every time we launch the app on a device. We tried keeping everything else's, such as Pods dependencies, deployment target in iOS 13 while only having the deployment target of the app in iOS 14 but that didn't help and the crash still happened with the same stack trace. We also tried to check the Console app on Mac to see if there is any useful information but didn't find anything useful besides messages from SpringBoard such as 'application state changed to Terminated'. I couldn't find articles that are about the same issue so I am posting it here to see if anyone has any idea what might be the causes and how to fix it. Thanks in advance and here's the stack trace: Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler [630] Triggered by Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 fieldwire 0x1072455cc exchg_registrar::exchg_registrar() + 36 1 fieldwire 0x1072455cc exchg_registrar::exchg_registrar() + 36 2 dyld 0x1e53e3bdc invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&amp;) const + 144 3 dyld 0x1e5432d08 invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&amp;, dyld3::MachOAnalyzer::VMAddrConverter const&amp;, void (unsigned int) block_pointer, void const*) const + 332 4 dyld 0x1e53e23d0 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&amp;, bool, bool&amp;) block_pointer) const + 516 5 dyld 0x1e53e1868 dyld3::MachOFile::forEachLoadCommand(Diagnostics&amp;, void (load_command const*, bool&amp;) block_pointer) const + 280 6 dyld 0x1e53e0d7c dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&amp;, bool, bool&amp;) block_pointer) const + 164 7 dyld 0x1e53eb94c dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&amp;, dyld3::MachOAnalyzer::VMAddrConverter const&amp;, void (unsigned int) block_pointer, void const*) const + 376 8 dyld 0x1e53e8758 dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&amp;) const + 148 9 dyld 0x1e53e2100 dyld4::PrebuiltLoader::runInitializers(dyld4::RuntimeState&amp;) const + 40 10 dyld 0x1e53e5388 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&amp;, dyld3::Array&lt;dyld4::Loader const*&gt;&amp;) const + 212 11 dyld 0x1e53ea0bc dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&amp;) const + 176 12 dyld 0x1e5419608 dyld4::APIs::runAllInitializersForMain() + 292 13 dyld 0x1e53f2648 dyld4::prepare(dyld4::APIs&amp;, dyld3::MachOAnalyzer const*) + 2876 14 dyld 0x1e53f0d88 start + 1992 ```.
Posted
by
Post not yet marked as solved
13 Replies
8.8k Views
Hello, In Xcode 15 beta 3, if a project embedded a Swift package (no matter static or dynamic), and the package has its own dependencies, the linker will always emit following warning: ld: warning: duplicate -rpath '/Users/.../Library/Developer/Xcode/DerivedData/MyApp.../Build/Products/Debug-iphonesimulator/PackageFrameworks' ignored The warning is not appeared on beta 2 and beta 1. Reproduce Steps [1] Create a new iOS project in Xcode 15 beta 3 [2] Create a new Swift package MyLibrary, and add any dependency in the Package.swift. Example: // swift-tools-version: 5.9 import PackageDescription let package = Package( name: "MyLibrary", platforms: [.iOS(.v16)], products: [ .library(name: "MyLibrary", targets: ["MyLibrary"]), ], dependencies: [ // 👀 Add any dependency to this package. // Here I use "Version" which is a simple pure swift package: .package(url: "https://github.com/mxcl/Version.git", .upToNextMajor(from: "2.0.0")), ], targets: [ .target(name: "MyLibrary", dependencies: ["Version",]), ] ) [3] In the project page, embed MyLibrary into the iOS app target. [4] Build the project. It will succeed but with link warnings. In addition, if you create a dynamic framework and embed MyLibrary, the warnings also reproduce. And this is only a simple case. In my real project, the linker will also emit a lot of warnings like this: ld: warning: could not associate debug note to atom l_OBJC_LABEL_PROTOCOL_$__TtP10SPConfetti18SPConfettiDelegate_ ld: warning: could not associate debug note to atom l_OBJC_PROTOCOL_REFERENCE_$__TtP10SPConfetti18SPConfettiDelegate_ ld: warning: could not associate debug note to atom l_OBJC_LABEL_PROTOCOL_$_NSURLSessionDelegate ld: warning: could not associate debug note to atom l_OBJC_LABEL_PROTOCOL_$_NSURLSessionTaskDelegate ld: warning: could not associate debug note to atom l_OBJC_LABEL_PROTOCOL_$_NSURLSessionDataDelegate ld: warning: could not associate debug note to atom l_OBJC_LABEL_PROTOCOL_$_NSURLSessionDownloadDelegate ld: warning: could not associate debug note to atom l_OBJC_LABEL_PROTOCOL_$_NSObject ld: warning: could not associate debug note to atom l_OBJC_PROTOCOL_REFERENCE_$_NSURLSessionDelegate ld: warning: could not associate debug note to atom l_OBJC_PROTOCOL_REFERENCE_$_NSURLSessionTaskDelegate ld: warning: could not associate debug note to atom l_OBJC_PROTOCOL_REFERENCE_$_NSURLSessionDataDelegate ld: warning: could not associate debug note to atom l_OBJC_PROTOCOL_REFERENCE_$_NSURLSessionDownloadDelegate ld: warning: could not associate debug note to atom l_OBJC_PROTOCOL_REFERENCE_$_NSObject
Posted
by
Post not yet marked as solved
1 Replies
508 Views
Hello! I am currently Programming a Game Engine with C++ and Xcode. It has iOS and Mac support! The Engine compiles into a .dylib file. My Program linked with the Engine works just fine on my Mac. It also works in the iOS Simulator. But when i try to execute it on my Device it crashes. The Output: dyld[2932]: Library not loaded: /usr/local/lib/libGameGears.dylib Referenced from: <DD6C5269-FC7E-34C0-98E6-4E57F8A3C98E> /private/var/containers/Bundle/Application/2EE68390-F98A-483B-B3DC-99680A1060A0/GameGears-iOS.app/GameGears-iOS Reason: tried: '/usr/lib/system/introspection/libGameGears.dylib' (errno=2, not in dyld cache), '/usr/local/lib/libGameGears.dylib' (errno=2), '/private/preboot/Cryptexes/OS/usr/local/lib/libGameGears.dylib' (errno=2), '/usr/local/lib/libGameGears.dylib' (errno=2), '/usr/lib/libGameGears.dylib' (errno=2, not in dyld cache)
Posted
by