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

162 Posts
Sort by:
Post not yet marked as solved
2 Replies
1.8k Views
Hello, I am trying to run the GNU Scientific Libraries on a M1 MacBook, using the Eclipse IDE. The source code is minimal: #include <stdio.h> #include <stdlib.h> #include <gsl/gsl_sf_bessel.h> int main(void) { puts("Simple GSL Test"); double x = 5.0; double y = gsl_sf_bessel_J0 (x); printf ("J0(%g) = %.18e\n", x, y); return EXIT_SUCCESS; } Linking runs without warnings: 17:02:47 **** Incremental Build of configuration Debug for project TestGSL **** make all Building file: ../src/TestGSL.c Invoking: GCC C Compiler gcc -I/opt/homebrew/Cellar/gsl/2.7.1/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/TestGSL.d" -MT"src/TestGSL.o" -o "src/TestGSL.o" "../src/TestGSL.c" Finished building: ../src/TestGSL.c Building target: TestGSL Invoking: MacOS X C Linker gcc -L/opt/homebrew/lib/ -L/opt/homebrew/Cellar/gsl/2.7.1/lib -o "TestGSL" ./src/TestGSL.o -lgsl Finished building target: TestGSL 17:02:47 Build Finished. 0 errors, 0 warnings. (took 516ms) Running gives the following error: dyld[34729]: symbol not found in flat namespace (_cblas_caxpy) I was unable to find the proper solution. Does someone know how to fix it ? Many thanks, Luca
Posted
by
Post not yet marked as solved
5 Replies
665 Views
In the MacOS bigsur environment of M1, an application compiled using Xcode (12.5) reported an error when running on the Terminals of Recovery or other new machine, with "dyld: library not loaded:/usr/lib/swift/libswift AppKit. dylib". May I ask if there are any compilation options that need to be changed for Xcode? In the past, on Macs with Intel chips, I could have Xcode automatically add the swift dynamic library to the app by changing the compatible system version to 10.13. However, on M1, changing the compatible minimum system version of Xcode no longer automatically adds the swift dynamic library to the frameworks. I attempted to manually add the Swift dynamic library to the application, but found that starting from OS11, the Swift dynamic library no longer exists in the/usr/lib/swift directory, and all the built-in dynamic libraries in the system are bound together and placed in Dyld_ Shared_ Cache_ In arm64e, and I am unable to extract the correct and available dylib from this file. May I ask what I need to do to successfully run the Xcode generated application in the recovery ? Or how to manually add libswiftxxx.dylib to the application.
Posted
by
Post marked as solved
1 Replies
1.7k Views
Not sure if it's specific to me only. I tried to build a framework project using Xcode 14.3.1 RC but got a strange error: File not found: /Users/USERNAME/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_macosx.a The project was created several years ago and was upgraded all the way to Xcode 14.2. I remember last time I posted a question about getting an empty xcarchive when doing archive build. The remedy is quite simple - setting SKIP_INSTALL to no. I wonder if this problem also has a simple remedy.
Posted
by
Post not yet marked as solved
3 Replies
881 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
18k 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
372 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
674 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
931 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
506 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
808 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
786 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
536 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.3k 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
699 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
412 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
709 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