dyld: Symbol not found: _os_release - xcode

I rarely build anything from source, so I really have no idea what's going on here, but have done good few hours of googling and still can't solve it...
I have installed xcode from app store, downloaded newest lua and here is what happens:
cd lua-5.3.0
make macosx
dyld: Symbol not found: _os_release
Referenced from: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Expected in: /usr/local/terrame/lib/libSystem.B.dylib
in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
make: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
make: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch
I then run
xcode-select -r
and still get
dyld: Symbol not found: _os_release
Referenced from: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Expected in: /usr/local/terrame/lib/libSystem.B.dylib
in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
If I then once again try
make macosx
the first error comes back at me:
dyld: Symbol not found: _os_release
Referenced from: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Expected in: /usr/local/terrame/lib/libSystem.B.dylib
in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
make: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
make: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch
I have tried installing an extension to Lua before, called terrame (terrame.org) so that's what the folder path refers to...
EDIT (answering comments)
which make
/usr/bin/make

Related

Build MEX from C/C++ in Matlab R2017b in Catalina 10.15.2 with Xcode 9.4.1

Getting the following error in Matlab R2017b:
Error using mex
dyld: Symbol not found: _OBJC_IVAR_$_NSFont._fFlags
Referenced from: /Applications/Xcode.9.4.1.app/Contents/SharedFrameworks/DVTDocumentation.framework/Versions/A/../../../../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit
Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
in /Applications/Xcode.9.4.1.app/Contents/SharedFrameworks/DVTDocumentation.framework/Versions/A/../../../../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit
xcrun: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
xcrun: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch
I've downloaded the older version of Xcode 9.4 that supposed to be compatible with Matlab R2017.b and set the path to it:
> xcode-select -p
/Applications/Xcode.9.4.1.app/Contents/Developer
any suggestions would be grand!

Can't read even though there is dylib symbol

I get this error when running my java program.
(on intellij ide.)
dyld: lazy symbol binding failed: Symbol not found:
___emutls_get_address Referenced from: /Users/xxx/.javacpp/cache/nd4j-native-1.0.0-beta5-macosx-x86_64.jar/org/nd4j/nativeblas/macosx-x86_64/libnd4jcpu.dylib
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: ___emutls_get_address Referenced from:
/Users/xxx/.javacpp/cache/nd4j-native-1.0.0-beta5-macosx-x86_64.jar/org/nd4j/nativeblas/macosx-x86_64/libnd4jcpu.dylib
Expected in: /usr/lib/libSystem.B.dylib
I checked the /usr/lib/ path but libSystem.B.dylib exists.
Do you have a solution?
Postscript
I was able to run the same version of DL4J (ND4J) on the same mac.
However, after updating mac and xcode, this error came out soon.
xcode-select --install has been executed.
Please try latest DL4J snapshots, this problem should be resolved there.
Instructions: https://deeplearning4j.org/docs/latest/deeplearning4j-config-snapshots

Link issue of ImageMagick on Mac 10.11.1

I have just installed ImageMagick on Mac 10.11.1, but can't run the command, "convert". I received the following error message. Any help would be greatly appreciated.
The DYLD_LIBRARY_PATH is not set in the .bash_profile.
dyld: Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /usr/local/ImageMagick-6.9.2/lib//libjpeg.9.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Trace/BPT trap: 5
For me at least, the answer is to simply remove the offending library (libraries in my case) from /usr/local/ImageMagick-6.9.2/lib/ as then the default ones are picked up -- no need for symlink(s).

libiconv.2.dylib not found

I get this error on my Mac OS Lion when I use gcc make:
dyld: Symbol not found: _iconv
Referenced from: /usr/lib/libcups.2.dylib
Expected in: /opt/local/lib/libiconv.2.dylib
in /usr/lib/libcups.2.dylib
dyld: Symbol not found: _iconv
Referenced from: /usr/lib/libcups.2.dylib
Expected in: /opt/local/lib/libiconv.2.dylib
in /usr/lib/libcups.2.dylib
./configure.sh: line 364: 18386 Trace/BPT trap: 5 $QTDIR/bin/qmake "$SRCDIR/$product.pro"
qmake failed
Note: I installed Macports in my machine. This used to work before, is this a known issue with MacPorts?
you can use the built in libiconv by selecting your target, going to the Build Phases tab and adding it to the link libraries and frameworks build phase.
as a general rule if you are missing linker symbols you can look up the symbol in your project and see what header they are from, and you can then usually figure out the appropriate library or framework.
in this case it tells you what library it is expecting...
you will want to use the built in version for a dynamic library, because with default linker flags, if this built product were to get moved to another computer it would try to resolve the symbols at run time in that location, and crash.

Setting a charset symbol in dylib

I use an old Powerbook G4.
While trying to update the macports (sudo port -d selfupdate) following error exist.
dyld: lazy symbol binding failed: Symbol not found: _locale_charset
Referenced from: /usr/bin/rsync
Expected in: /usr/lib/libiconv.2.dylib
dyld: Symbol not found: _locale_charset
Referenced from: /usr/bin/rsync
Expected in: /usr/lib/libiconv.2.dylib
How can I set the Symbol _locale_charset?
Does anyone have a good idea?
Neither /usr/bin/rsync nor /usr/lib/libiconv.2.dylib are part of MacPorts. Probably you've replaced the system copy of rsync with another copy that isn't compatible with your OS X version. Try reinstalling it.

Resources