macOS cmake based project backward compatibility - macos

I've got a CMake based project that that compiles in MacOS Monterey and produces an application and its dependency dynamic library (dylib file)
When trying to run it macOS bigSur I get the following error :
dyld: Symbol not found: __ZTTNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE
Referenced from: /Applications/myapp.app/Contents/MacOS/../Frameworks/libMylib.dylib
Expected in: /usr/lib/libc++.1.dylib
in /Applications/myapp.app/Contents/MacOS/../Frameworks/libMylib.dylib
Abort trap: 6
even tough I specifically used the following settings when building the library
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0" CACHE STRING "Minimum OS X deployment version" FORCE)
Perhaps anybody encountered similar behavior ? the only thing that's works for my is to build the target in BigSur machine.

Related

AdaCore gnatstudio builds but won't run

Mac mini (2018)
OSX 10.15.5
XCode 11.5
GNAT 2020
Miniconda environment python 3.7.7
I have built gnatstudio from https://github.com/AdaCore/gps-master.
However, the command gnatstudio/obj/gnatstudio fails with:
dyld: Library not loaded: /gnatmail/sandbox/a2c2/x86_64-darwin/gcc-c/pkg/lib/libstdc++.6.dylib
Referenced from: /System/Volumes/Data/Applications_Packages/gps-master/gnatstudio/obj/gnatstudio
Reason: image not found
zsh: abort gnatstudio/obj/gnatstudio
I can find no reference to /gnatmail/sandbox/a2c2/x86_64-darwin/gcc-c/pkg/lib/libstdc++.6.dylib in my gps build instructions; not in any Makefile or gpr.
I have found libstdc++.6.dylib in /opt/GNAT/2020/lib, /opt/GNAT/2019/lib/gps and a few other less relevant locations.

Oculus Rift and Processing 2.0

I am trying to get the Oculus Rift working in processing.I am using a library called "SimpleOculusRift" created by the amazing Max Rheiner. However, whenever I run the example sketch I get this error:
dyld: lazy symbol binding failed: Symbol not found: ___sincos_stret
Referenced from: /Users/jasontibi/CalArts/Spring
2015/Processing/libraries/SimpleOculusRift/library/libSimpleOculusRift.jnilib
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: ___sincos_stret Referenced from:
/Users/jasontibi/CalArts/Spring
2015/Processing/libraries/SimpleOculusRift/library/libSimpleOculusRift.jnilib
Expected in: /usr/lib/libSystem.B.dylib
Could not run the sketch (Target VM failed to initialize). For more
information, read revisions.txt and Help → Troubleshooting.
I am running Mac OS 10.8.5
I am using Oculus Rift DK1
I am using the latest firmware
and I am on a 64bit intel core i7
Any idea whats happening?
The sketch just crashes and says that processing quit unexpectedly.
Thank you!
I just had to upgrade OSX to Yosemite. There was a file that the library used, that only worked in Yosemite because of some native plugin that comes with Yosemite.

Blank project in XCode 5 compilation error: Main.Storyboard red in Build Phases

I'm having big troubles compiling in XCode 5. First of all, I recently upgraded from Xcode 4 to XCode 5 and for some time had both versions intalled. I only have Xcode 5 now (trashed both versions and reinstalled XCode 5 again).
Creating a blank project will not compile showing me the error below:
CompileStoryboard test-**/Base.lproj/Main.storyboard
cd /Users/user***/test-**/test-**
setenv IBSC_MINIMUM_COMPATIBILITY_VERSION 7.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv XCODE_DEVELOPER_USR_PATH /Applications/Xcode.app/Contents/Developer/usr/bin/..
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool --errors --warnings --notices --minimum-deployment-target 7.0 --output-format human-readable-text --compile /Users/user***/Library/Developer/Xcode/DerivedData/test-**-czkmrxqmivlfarcpibzviisatxkr/Build/Products/Debug-iphonesimulator/test-nogit.app/Base.lproj/Main.storyboardc /Users/user***/test-**/test-**/test-**/Base.lproj/Main.storyboard
dyld: Symbol not found: _CGYmageGetRenderingIntent
Referenced from: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
Expected in: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
in /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool failed with exit code 5
I am new to the XCode environment, any insights would be very appretiated.
Thanks,
It looks to me like you need to add a couple frameworks to your project, starting with the CoreGraphics framework.
Open up the "Frameworks" section of your project and make certain "CoreGraphics" exists, like this:
The clue to resolving this issue was the following line:
dyld: Symbol not found: _CGYmageGetRenderingIntent
The class _CGYmageGetRenderingIntent actually does not exist, it should be _CGImageGetRenderingIntent. So my local XCode library's cache was corrupted at some point either when upgrading OS X or upgrading to Xcode 5.
Had to restart in Safe Mode in order to "flush" the Xcode library's cache.

SFML 2.1 & "lazy symbol binding failed"

I've compiled my SFML program with g++ and that seems to be working fine now (had issues with it previously), however when I try to run the resulting output, I get the following error message:
dyld: lazy symbol binding failed: Symbol not found: __ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE
Referenced from: /Users/fabricecastel/Work/Game_Projects/SFML_tutorials/./a.out
Expected in: /usr/local/lib/libsfml-graphics.2.dylib
dyld: Symbol not found: __ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE
Referenced from: /Users/fabricecastel/Work/Game_Projects/SFML_tutorials/./a.out
Expected in: /usr/local/lib/libsfml-graphics.2.dylib
Trace/BPT trap: 5
I've checked the folder in question and libsfml-graphics.2.dylib isn't missing. Besides that I'm at a total loss as to what the issue is and how I'm supposed to fix it. Seems to me that the RenderWindow symbol isn't included in the dylib but it should be. We're talking SFML 2.1 here, not some obscure amateur project. What's up with that?
The only way I could reproduce these errors is when GCC and Clang version of SFML are mixed. Here are two procedures that create the same errors.
First procedure
install the GCC version
compile your application (successfully)
install the Clang version
run your application
Second procedure
install the Clang version
compile your application (successfully)
install the GCC version
run your application
When you install another runtime, you need to carefully rebuild from scratch your application. That is, remove the final binary as well as any .o files before compiling.

Having a issue accessing/loading QJSon dylib at runtime on Mac OS X

I compiled the QJSon code from the command line and it generated a dylib (libqjson.0.7.1.dylib) I then added this file as an external dependency to one of the libraries in my app. (using Xcode 4.3 as the IDE) everything seems to compile correctly. When i go to run the app i get the following error:
dyld: Library not loaded: /Users/shawneckley/Mac_Dev/Development/build/thirdparty/qjson/src/lib/libqjson.0.dylib
Referenced from: /Users/shawneckley/Mac_Dev/Development/Build/bin/Debug/libstonewedgeaccountandclient.dylib
Reason: image not found
(lldb)
any idea why this could be happening?

Resources