Post not yet marked as solved
Hello
First at all a need to say that I'm new using macOs and Xcode. My problem is this.
I'm trying to create a Core Audio driver, I'm using the sample code for creating an Audio Server Driver Plug-in for building a virtual audio device and everything is fine with this example, but when I adding portaudio c++ library and copy the .driver to /Library/Audio/Plug-Ins/HAL and after reboot my Mac the driver disappear from the Audio MIDI Setup.
I had triad to add NDI library to but I got the same problem.
My question if that
Is it possible to add a c++ library to the core audio driver example ? and what is the proper way to do that?
Thanks you
Alvaro
Post not yet marked as solved
Hi there.
I'm trying to run objc app with Iobfs4proxy framework.
I got such error.
ld: warning: directory not found for option '-F/Users/ivan/Projects/buddy-onion/Tob/../Carthage/Build/iOS'
ld: in /Users/ivan/Projects/buddy-onion/Tob/Iobfs4proxy.framework/Iobfs4proxy(go.o), section __TEXT/__text address out of range file '/Users/ivan/Projects/buddy-onion/Tob/Iobfs4proxy.framework/Iobfs4proxy' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Device: Air m1(2020)
OS: Monterey 12.2.1
XCode: 13.3
iOS: 15.3.1 (real device)
Post not yet marked as solved
Hi,
'dlopen' ignores the search path that is defined for LD_LIBRARY_PATH on macOS 12.2 and 12.3, even-though the path doesn't contain slash.
LD_LIBRARY_PATH is set as follows (before the call):
export LD_LIBRARY_PATH="/Users/administrator/Desktop/Test/"
'test_library.dylib' is located under '/Users/administrator/Desktop/Test/'
The c call at the application looks as follows (The application is built by Xcode 13):
handle = dlopen("test_library.dylib", RTLD_LAZY);
I see that the error i get, when calling to dlopen, is that test_library.dylib isn't found. From the error it looks that
library loader doesn't search the library at the search path that is defined for LD_LIBRARY_PATH. During the call, the LD_LIBRARY_PATH contains the path.
If i set this path to DYLD_LIBRARY_PATH, dlopen finds 'test_library.dylib' and everything works as expected.
I didn't find any documentation for this issue, therefore, is it a known limitation? Is there a workaround?
Thx,
Moshe.
Post not yet marked as solved
Hello,
I faced a weird problem with my framework imported into my app. MyFramework uses some other frameworks like OpenSSL etc. I build MyFramework with the script:
FrameworkName="MyFramework"
rm -rf build/
xcodebuild archive -scheme "$FrameworkName" \
-configuration Debug -destination 'generic/platform=iOS' \
-archivePath "./build/$FrameworkName.framework-iphoneos.xcarchive" \
SKIP_INSTALL=NO \
BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
xcodebuild archive -scheme "$FrameworkName" \
-configuration Debug -destination 'generic/platform=iOS Simulator' \
-archivePath "./build/$FrameworkName.framework-iphonesimulator.xcarchive" \
SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
xcodebuild archive -scheme "$FrameworkName" \
-configuration Debug -destination 'generic/platform=macOS' \
-archivePath "./build/$FrameworkName.framework-macos.xcarchive" \
SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
# Fix https://bugs.swift.org/browse/SR-14195 (caused by https://bugs.swift.org/browse/SR-898)
pattern="./build/$FrameworkName.framework-iphoneos.xcarchive/Products/Library/Frameworks/$FrameworkName.framework/Modules/$FrameworkName.swiftmodule/*.swiftinterface"
grep -rli "$FrameworkName.$FrameworkName" $pattern \
| xargs sed -i '' "s,$FrameworkName.$FrameworkName,$FrameworkName,g"
# end fix
xcodebuild -create-xcframework \
-framework "./build/$FrameworkName.framework-iphoneos.xcarchive/Products/Library/Frameworks/$FrameworkName.framework" \
-framework "./build/$FrameworkName.framework-iphonesimulator.xcarchive/Products/Library/Frameworks/$FrameworkName.framework" \
-framework "./build/$FrameworkName.framework-macos.xcarchive/Products/Library/Frameworks/$FrameworkName.framework" \
-output "./build/$FrameworkName.xcframework"
# Wait for process completion and verify result
pid=$!
wait $pid
echo "Process with PID $pid has finished with Exit status: $?"
[[ ! -d "./build/$FrameworkName.xcframework/" ]] && {
msg="[ERROR] expected ./build/$FrameworkName.xcframework/ to exist"; echo -e $msg
exit 1
}
As you can see, it is also built framework for the macOS platform.
A little digression: I prefer using Carthage to build xcframeworks, but here it doesn't work, I don't the reason.
The aforementioned build solution works great, all frameworks included in MyFramework don't have any issues when I use MyFramework in my iOS App. The problem starts with using MyFramework in macOS target App. It shows two related errors, I tried some solutions but didn't find a proper way... Errors:
blablabla/DerivedData/MyApp-hdzvzxtsnsdivzcialzikxjdwidw/Build/Products/Debug/MyFramework.framework/Modules/MyFramework.swiftmodule/arm64-apple-macos.swiftinterface:9:8: error: no such module 'OpenSSL'
import OpenSSL
And the second one:
blablabla/Helpers/Injected/Services.swift:10:8: error: failed to build module 'MyFramework' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug
import MyFramework
I can import the OpenSSL framework to the macOS app and then I faced the same problem with the next framework from MyFramework's importing list - it isn't a solution...
What causes that problem?
Thanks in advance for any help... 🥺
Post not yet marked as solved
Hello folks, I am new to MacOS/iOS and ran into the following problem (IDE is Xcode13): I have made a small c++ audio library with the Juce framework that I want to integrate into an existing application running on MacOS and iOS.
So far so good, I added the Projucer library project as a subproject to my workspace, added the correct header paths, added the subproject as a dependency and linked the library in the build settings of the target, so I can directly test changes I make to the library in the app (for now it is only a small c++ console app for testing since I wanted to find out how to correctly import the library before writing the bridge, as described here: https://github.com/adamski/audioengine-demo).
The problem I am currently running into is the following linker error I cant resolve:
Undefined symbols for architecture arm64:
ld: symbol(s) not found for architecture arm64
This error occurs 101 times, for every juce function that is beeing used. I checked the target architecture settings in both the library and the console app, they are the same. If I change the build active architecture only setting to No, the error changes to
ld: symbol(s) not found for architecture x86_64
I analysed the library binary with the file command in the console, which led to following output:
mylib.a : Mach-O universal binary with 2 architectures: [arm64:current ar archivecurrent ar archive] [x86_64]
mylib.a (for architecture arm64): current ar archive
mylib.a (for architecture x86_64): current ar archive
In my understanding, the binary should support my architecture (arm64), so why cant the linker find the symbols?
Thanks for your help!
Attempting to compile dieharder from source on an M1 Max MacBookPro18,2 (macOS 12 + Xcode 13.3.1 + command line tools) and running into an error:
...
/bin/sh ../libtool --tag=CC --mode=link gcc -std=c99 -Wall -pedantic -I/usr/local/include -I/opt/local/include -L/opt/local/lib -o dieharder dieharder-add_ui_rngs.o dieharder-add_ui_tests.o dieharder-choose_rng.o dieharder-dieharder.o dieharder-dieharder_exit.o dieharder-help.o dieharder-list_rngs.o dieharder-list_tests.o dieharder-output.o dieharder-output_rnds.o dieharder-parsecl.o dieharder-rdieharder.o dieharder-run_all_tests.o dieharder-run_test.o dieharder-set_globals.o dieharder-testbits.o dieharder-time_rng.o dieharder-user_template.o ../libdieharder/libdieharder.la -lgsl -lgslcblas -lm -lgsl -lgslcblas
libtool: link: gcc -std=c99 -Wall -pedantic -I/usr/local/include -I/opt/local/include -o dieharder dieharder-add_ui_rngs.o dieharder-add_ui_tests.o dieharder-choose_rng.o dieharder-dieharder.o dieharder-dieharder_exit.o dieharder-help.o dieharder-list_rngs.o dieharder-list_tests.o dieharder-output.o dieharder-output_rnds.o dieharder-parsecl.o dieharder-rdieharder.o dieharder-run_all_tests.o dieharder-run_test.o dieharder-set_globals.o dieharder-testbits.o dieharder-time_rng.o dieharder-user_template.o -L/opt/local/lib ../libdieharder/.libs/libdieharder.a -lm -lgsl -lgslcblas
Undefined symbols for architecture arm64:
"_insert", referenced from:
_dab_filltree in libdieharder.a(libdieharder_la-dab_filltree.o)
_main_filltree in libdieharder.a(libdieharder_la-dab_filltree.o)
"_insertBit", referenced from:
_dab_filltree2 in libdieharder.a(libdieharder_la-dab_filltree2.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
...
I got to this failure with a MacPorts installed gsl and by executing the following:
$ mkdir dieharder; cd dieharder
$ wget --no-check-certificate https://webhome.phy.duke.edu/~rgb/General/dieharder/dieharder-3.31.1.tgz
$ tar xf dieharder-3.31.1.tgz
$ cd dieharder-3.31.1
$ sudo port install gsl
$ ./configure LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include CFLAGS=-I/opt/local/include --disable-shared
...
$ make
...
I reproduced the failure with Homebrew:
$ brew install gsl
$ make distclean
$ ./configure LDFLAGS=-L/opt/homebrew/lib CPPFLAGS=-I/opt/homebrew/include CFLAGS=-I/opt/homebrew/include --disable-shared
...
$ make
...
/bin/sh ../libtool --tag=CC --mode=link gcc -std=c99 -Wall -pedantic -I/usr/local/include -I/opt/homebrew/include -L/opt/homebrew/lib -o dieharder dieharder-add_ui_rngs.o dieharder-add_ui_tests.o dieharder-choose_rng.o dieharder-dieharder.o dieharder-dieharder_exit.o dieharder-help.o dieharder-list_rngs.o dieharder-list_tests.o dieharder-output.o dieharder-output_rnds.o dieharder-parsecl.o dieharder-rdieharder.o dieharder-run_all_tests.o dieharder-run_test.o dieharder-set_globals.o dieharder-testbits.o dieharder-time_rng.o dieharder-user_template.o ../libdieharder/libdieharder.la -lgsl -lgslcblas -lm -lgsl -lgslcblas
libtool: link: gcc -std=c99 -Wall -pedantic -I/usr/local/include -I/opt/homebrew/include -o dieharder dieharder-add_ui_rngs.o dieharder-add_ui_tests.o dieharder-choose_rng.o dieharder-dieharder.o dieharder-dieharder_exit.o dieharder-help.o dieharder-list_rngs.o dieharder-list_tests.o dieharder-output.o dieharder-output_rnds.o dieharder-parsecl.o dieharder-rdieharder.o dieharder-run_all_tests.o dieharder-run_test.o dieharder-set_globals.o dieharder-testbits.o dieharder-time_rng.o dieharder-user_template.o -L/opt/homebrew/lib ../libdieharder/.libs/libdieharder.a -lm -lgsl -lgslcblas
Undefined symbols for architecture arm64:
"_insert", referenced from:
_dab_filltree in libdieharder.a(libdieharder_la-dab_filltree.o)
_main_filltree in libdieharder.a(libdieharder_la-dab_filltree.o)
"_insertBit", referenced from:
_dab_filltree2 in libdieharder.a(libdieharder_la-dab_filltree2.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [dieharder] Error 1
make: *** [dieharder.time] Error 2
Anyone know what might be going on here and how to properly configure this to complete compilation on and for Apple Silicon systems?
Post not yet marked as solved
As of Xcode 13.3, binary SPM dependencies are no longer included in our app's Frameworks folder. When our app is launched on a device, it crashes with a Library not loaded: @rpath/... error with the list of attempted framework search paths.
Is this a known issue with Xcode 13.3 and 13.3.1? Is there a workaround?
Post not yet marked as solved
I have a MacOS app with a Framework (FrameA) inside. In this FrameA there is a compiled Framework (FrameB).
The error is:
Library not loaded: @loader_path/../Frameworks/FrameB.framework/Versions/A/FrameB
Referenced from: /Users/myUsername/Desktop/AppName.app/Contents/Frameworks/FrameA.framework/Versions/A/FrameA
Reason: tried: '/Users/myUsername/Desktop/AppName.app/Contents/Frameworks/FrameA.framework/Versions/A/../Frameworks/FrameB.framework/Versions/A/FrameB' (no such file), '/Library/Frameworks/FrameB.framework/Versions/A/FrameB' (no such file), '/System/Library/Frameworks/FrameB.framework/Versions/A/FrameB' (no such file)
I have try in the FrameA to embed FrameB but it can't find it because of the path. There is always a /../ and this is the problem because it go one folder back. It should not.
You can see the problem in this part of the error:
FrameA.framework/Versions/A/../Frameworks
When i try to edit the runpath on FrameB, the app still seach on the same place. It has not effect whatever i change there.
If i change the runpath of the app to
@executable_path/Frameworks then it can't find FrameA.
This is expected but i don't understand why it ignore what i write in the runtime of FrameA.
Another try was to not embed FrameB into FrameA but directly into the App. The App (exported) still complain and want to seach FrameB after the path of FrameA. But in this test FrameB was no more embed into FrameA.
In my App runpath i have:
$(inherited)
@executable_path/../Frameworks
@loader_path/Frameworks
In the FrameA runpath i have (its completly ignored in any case):
$(inherited)
@executable_path/Frameworks
@loader_path/Frameworks
When i look into the exported app, the FrameB is on the place wanted for both try. Only the path to search it is wrong with this /../ in the middle of the path.
How can i fix this ?
Post not yet marked as solved
This might seem flippant, but it's very serious. My use case, this is literally torturing me to death:
We have a language (Allegro Common Lisp) which has a module for making SSL connections. This module is requires OpenSSL. We don't want to supply OpenSSL with our product for obvious reasons--I'm not going to go into that here.
So, what's the problem? Well, first, the problem is that Apple decided long ago to not allow developers to build against their version of SSL (which is based on LibreSSL). So, we must depend on Macports or Homebrew for the installation of OpenSSL. Those libraries are in non-standard places and require DYLD_LIBRARY_PATH to be set so that the libraries can be dynamically loaded.
The problem is, with SIP, any environment variables that start with DYLD_ or LD_ are stripped from the environment passed to programs. That is, if I set DYLD_LIBRARY_PATH in BASH and start my product, I can't load a signed .dylib that depends on some version of the OpenSSL libraries.
To make matters worse, this works on macOS 11.6.5 (20G527) x86_64:
DYLD_LIBRARY_PATH=... ./mlisp
(sys:getenv "DYLD_LIBRARY_PATH")`
That is, it returns the value ... set on the command line.
It does not work on macOS 11.6.5 (20G527) arm64.
To dynamically load the OpenSSL libraries, we have a glue library (that adds functionality) called acliss11.dylib which depends on @rpath/libssl.1.1.dylib and @rpath/libcrypto.1.1.dylib.
For x86_64 we have a solution, but the same solution does NOT work for arm64.
How are we supposed to do this?
Post not yet marked as solved
Running on the simulator & real machine will not crash, uploading Testflight installation will not crash, only Ad-hoc crash
CrashReporter Key: 853c4fc40b6de72d451a39a413a14107a39a33d8
Hardware Model: iPhone13,4
Process: Kasta [11064]
Path: /private/var/containers/Bundle/Application/488D3FA6-DAB2-47BD-9C76-F41FC9A2894C/Kasta.app/Kasta
Identifier: Kasta.xxxxxx.xxxxxx
Version: 2.6.059 (1311)
AppStoreTools: 13E113
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: Kasta.xxxxxx.xxxxxx [1653]
Date/Time: 2022-04-02 14:20:34.5538 +0800
Launch Time: 2022-04-02 14:20:34.5177 +0800
OS Version: iPhone OS 15.3.1 (19D52)
Release Type: User
Baseband Version: 2.23.02
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x1b853f964 __pthread_kill + 8
1 libsystem_pthread.dylib 0x1f21fd378 pthread_kill + 268
2 libsystem_c.dylib 0x18bd48f50 abort + 164
3 libswiftCore.dylib 0x1086f4028 swift::fatalError(unsigned int, char const*, ...) + 56
4 libswiftCore.dylib 0x1086ec1c8 checkVersion() + 60
5 dyld 0x1079f4794 invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 164
6 dyld 0x107a28510 invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 168
7 dyld 0x1079f2428 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 532
8 dyld 0x1079f1678 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 168
9 dyld 0x1079f09d0 dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 192
10 dyld 0x107a28098 dyld3::MachOAnalyzer::forEachInitializerPointerSection(Diagnostics&, void (unsigned int, unsigned int, unsigned char const*, bool&) block_pointer) const + 148
11 dyld 0x1079fddc0 dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 432
12 dyld 0x1079fa968 dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 172
13 dyld 0x1079f2144 dyld4::PrebuiltLoader::runInitializers(dyld4::RuntimeState&) const + 44
14 dyld 0x1079f6344 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 208
15 dyld 0x1079f6320 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 172
16 dyld 0x1079fc4b0 dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 124
17 dyld 0x107a1c124 dyld4::APIs::runAllInitializersForMain() + 320
18 dyld 0x107a07508 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3024
19 dyld 0x107a05a84 start + 488
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x00000000005069d0 x5: 0x0000000000000010 x6: 0x0049000004210143 x7: 0x000000000000003e
x8: 0x6315f34501847698 x9: 0x6315f3440621f318 x10: 0x0000000000000000 x11: 0x0000000000000002
x12: 0x00000000aec51855 x13: 0x000000002ec51800 x14: 0x000000002ec00000 x15: 0x0000000000000007
x16: 0x0000000000000148 x17: 0x0000000107a58580 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x0000000000000103 x21: 0x0000000107a58660 x22: 0x00000001087906f0 x23: 0x0000000108470710
x24: 0x0000000108470830 x25: 0x000000016b606210 x26: 0x0000000108470dd0 x27: 0x00000000000013a0
x28: 0x0000000107a986f0 fp: 0x000000016b605f20 lr: 0x00000001f21fd378
sp: 0x000000016b605f00 pc: 0x00000001b853f964 cpsr: 0x40001000
far: 0x00000001d7c71e50 esr: 0x56000080 Address size fault
Binary Images:
0x1b8538000 - 0x1b856bfff libsystem_kernel.dylib arm64e <ff3ee512a0bc3123b983d365a71fb06a> /usr/lib/system/libsystem_kernel.dylib
0x1f21f6000 - 0x1f2201fff libsystem_pthread.dylib arm64e <a17d07cfe86a392387c4921045898a8a> /usr/lib/system/libsystem_pthread.dylib
0x18bd29000 - 0x18bda7fff libsystem_c.dylib arm64e <9b299ee5b3793856848b524d82640dbc> /usr/lib/system/libsystem_c.dylib
0x108470000 - 0x10878ffff libswiftCore.dylib arm64 <ad0cad3b1b51332786448be1ff1f0ae9> /private/var/containers/Bundle/Application/488D3FA6-DAB2-47BD-9C76-F41FC9A2894C/Kasta.app/Frameworks/libswiftCore.dylib
0x1079ec000 - 0x107a43fff dyld arm64e <780553c7d39f322a8cb9f4f6de52610d> /usr/lib/dyld
EOF
Post not yet marked as solved
When compiling qt6webengine in debug, I am getting this link errors.
I am using macOS Monterey 12.2
Apple M1 Pro with
16G RAM
Assertion failed: (target.atom != NULL), function findTargetFromAddressAndSectionNum, file macho_relocatable_file.cpp, line 3131.
0 0x100b13bb4 __assert_rtn + 128
1 0x100b14378 mach_o::relocatable::Parser<x86_64>::addFixups(mach_o::relocatable::Parser<x86_64>::SourceLocation const&, ld::Fixup::Kind, mach_o::relocatable::Parser<x86_64>::TargetDesc const&) (.cold.1) + 0
2 0x1009db098 mach_o::relocatable::Parser<x86_64>::addFixups(mach_o::relocatable::Parser<x86_64>::SourceLocation const&, ld::Fixup::Kind, mach_o::relocatable::Parser<x86_64>::TargetDesc const&) + 0
3 0x1009da774 mach_o::relocatable::Section<x86_64>::addRelocFixup(mach_o::relocatable::Parser<x86_64>&, macho_relocation_info<Pointer64<LittleEndian> > const*) + 380
4 0x1009eca5c mach_o::relocatable::Section<x86_64>::makeFixups(mach_o::relocatable::Parser<x86_64>&, mach_o::relocatable::Parser<x86_64>::CFI_CU_InfoArrays const&) + 128
5 0x1009e8ed0 mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 2152
6 0x1009e0a50 mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 144
7 0x100a140ec archive::File<x86_64>::makeObjectFileForMember(archive::File<x86_64>::Entry const*) const + 724
8 0x100a139cc archive::File<x86_64>::justInTimeforEachAtom(char const*, ld::File::AtomHandler&) const + 108
9 0x100a32268 ld::tool::InputFiles::searchLibraries(char const*, bool, bool, bool, ld::File::AtomHandler&) const + 216
10 0x100a3e24c ld::tool::Resolver::resolveUndefines() + 172
11 0x100a4157c ld::tool::Resolver::resolve() + 76
12 0x1009d28a8 main + 288
Post not yet marked as solved
So I was trying to embed a framework to my project (Project1), and then import that project (Project1) to another project (Project2), when I tried to import the framework on one of my file it was doing fine and the build was succeded but when the app open on physical device it return these error:
dyld[2345]: Library not loaded: @rpath/frameworkName.framework/frameworkName
Referenced from: /private/var/containers/Bundle/Application/45BE4C38-1470-4B2D-97D2-CD9E678ED13B/App.app/Frameworks/Project1.framework/Project1
Reason: tried: '/usr/lib/swift/frameworkName.framework/frameworkName' (no such file), '/private/var/containers/Bundle/Application/45BE4C38-1470-4B2D-97D2-CD9E678ED13B/App.app/Frameworks/frameworkName.framework/frameworkName' (no such file)
Before those error I got another message like "Image not found" or "Invalid Provisioning" which I think I solve it because those message was gone but now there's only "No Such File" error
Post not yet marked as solved
When building the external library project, I selected "Mach-O Type" as "Dynamic Library" and built it to create a framework file (folder).
And this framework file was imported and used in our app and distributed to the App Store.
Is this situation required to release the entire source code of our app under the LGPL 2.1 (or LGPL 3.0) license?
Enter file in the Mac command line and press Enter, “dynamically linked shared library” is displayed.
Post not yet marked as solved
Hi,all
I'm writing a simple c program on my m1 MacBook with vscode ,but when I complied the project, error occurs:
Undefined symbols for architecture arm64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I installed Xcode and used vscose
and my program is :
#include <cstdio>
int main()
{
char name[100];printf("please input your name:");
scanf("%s",name);
printf("hello,%s",name);
}
Post not yet marked as solved
I'm facing a weird situation. Everytime a try to dlopen my library the application totally freezes.
Does anyone have faced the same issue or have some suggestion?
Post not yet marked as solved
I am trying to run a computer graphics code which uses "glew", "OpenGL", "Glut" frameworks. My M1 Mac cannot see "glew" which I have downloaded using homebrew.
I dragged and dropped the libGLEW2.2.0.dylib under opt/homebrew/Cellar/lib... into the "Link with libraries" part of the Build Phases of my Xcode project.
I am getting the following error
dyld[23765]: Library not loaded: /opt/homebrew/opt/glew/lib/libGLEW.2.2.dylib
Can you please help me with this? the library is already loaded but Xcode cannot see it under the directories that it checks.
Post not yet marked as solved
We are seeing a crash on launch on Xcode 13.3 which did not happen on 13.2.x.
dyld[80074]: Symbol not found: _$s10Foundation10URLRequestV10httpMethodSSSgvs
Has anyone see this kind of dynamic linking error before?
Post not yet marked as solved
Hi,
I was trying to insert dynamic library using DYLD_INSERT_LIBRARIES on Monterey 12.2.1 but it was failing.
the command i used to insert is
DYLD_INSERT_LIBRARIES="<path_to_dylib>" DYLD_FORCE_FLAT_NAMESPACE=1 <executable_name>
The same command was working fine on catalina and bigsur MacOS.
Note:
inside dynamic lib(dylib) dlopen(SYSTEM_LIBC_PATH, RTLD_LAZY) function was used.
Suddenly between 07/March/22 and 11/March/22 my entire team stopped to be able to create a non-crashing build for our macOS app.
The project builds correctly but the app crashes with:
dyld: Library not loaded: @rpath/[redacted]/Versions/A/[redacted]
Referenced from: /Users/[redacted]/Library/Developer/Xcode/DerivedData/[redacted]-afjccazdqnhlzphdcplakowpjfyi/Build/Products/Release/MyApp.app/Contents/MacOS/MyApp
Reason: no suitable image found. Did find:
/Users/[redacted]/Library/Developer/Xcode/DerivedData/[redacted]-afjccazdqnhlzphdcplakowpjfyi/Build/Products/Release/MyApp.app/Contents/MacOS/../Frameworks/[redacted].framework/Versions/A/[redacted]: code signature invalid for '/Users/[redacted]/Library/Developer/Xcode/DerivedData/[redacted]-afjccazdqnhlzphdcplakowpjfyi/Build/Products/Release/MyApp.app/Contents/MacOS/../Frameworks/[redacted].framework/Versions/A/[redacted]'
Summary:
no suitable image found. and code signature invalid
In console we see:
error 12:33:50.270929+0000 taskgated-helper ConfigurationProfiles com.apple.ManagedClient ProvisioningProfiles Disallowing org.cocoapods.[redacted] because no eligible provisioning profiles found
error 12:33:50.271244+0000 amfid amfid com.apple.MobileFileIntegrity amfid CPValidateProvisioningDictionariesExtViaBridge returned invalid result: {
success = 0;
}
This is the signature pf the above framework from inside the application bundle:
The framework crashing is a Pod and our project has a mix of pods and swift packages.
We tried to build several older commits thinking we screwed up something in the project but the result is not changing, so seems obvious the issue is in the environment.
We are using Xcode 13.2.1 on macOS 11.6.5 (yeah, IT is blocking macOS 12 upgrade)
We cleaned the project, re-downloaded all certificates and changed our signing from manual to automatic, just for testing. No changes.
I'm aware of changes in certificates and some known problems on Xcode <13.4 but the timing doesn't match exactly.
Any clue?
Additional info:
This is just one of the components crashing, other binaries are crashing for the same reason but different frameworks.
This is a comparison between the framework with the invalid signature and the same framework from an old working build
Working:
sudo codesign -dv [redacted].framework --extract-certificates
Password:
Executable=/Applications/[redacted].app/Contents/Frameworks/[redacted]g.framework/Versions/Current/[redacted]
Identifier=org.cocoapods.[redacted]
Format=bundle with Mach-O universal (x86_64 arm64)
CodeDirectory v=20400 size=1092 flags=0x0(none) hashes=27+3 location=embedded
Signature size=8960
Timestamp=1 Feb 2022 at 13:00:40
Info.plist entries=20
TeamIdentifier=[redacted]
Sealed Resources version=2 rules=13 files=1
Internal requirements count=1 size=192
Crashing:
sudo codesign -dv [redacted].framework --extract-certificates
Password:
Executable=/Users/[redacted]/Developer/[redacted]/Builds/Release/InstallerComponents.dst/Applications/[redacted].app/Contents/Frameworks/[redacted].framework/Versions/Current/[redacted]
Identifier=org.cocoapods.[redacted]
Format=bundle with Mach-O universal (x86_64 arm64)
CodeDirectory v=20500 size=1164 flags=0x10000(runtime) hashes=27+5 location=embedded
Signature size=8961
Timestamp=15 Mar 2022 at 11:15:56
Info.plist entries=20
TeamIdentifier=[redacted]
Runtime Version=12.1.0
Sealed Resources version=2 rules=13 files=1
Internal requirements count=1 size=224
When I archive my iOS app with Xcode 13.3 RC and run it on macOS Big Sur, the app crashes on launch with a DYDL error:
Termination Reason: DYLD, [0x1] Library missing
Dyld Error Message:
dyld: Using shared cache: 331F452F-2BAE-3A64-AD52-0029F44B1379
dependent dylib '@rpath/SomeFramework.framework/SomeFramework' not found for '/private/var/folders/*/SomeApp.app/SomeApp'. chained fixups, seg_count exceeds number of segments
The app runs fine on macOS Monterey and on iOS 13, 14, 15. The LD_RUNPATH_SEARCH_PATH in the build settings is correct and when inspecting the binary with otool -l the LC_RPATH entries are also correct.
When archiving the app with Xcode 13.2.1, it runs fine on macOS Big Sur.
Has anybody experienced the same and knows a workaround?
I've filed a feedback: FB9951126