dyld: Library not loaded: /usr/local/lib/libwep on Mac for command make - c++

When I run command "make", fellow error occurs:
MacBook-Pro~/Downloads/mp-boost$make
dyld: Library not loaded: /usr/local/lib/libwep
Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
Reason: no suitable image found. Did find:
/usr/local/lib/libwep: code signing blocked mmap() of '/usr/local/lib/libwep'
/usr/local/lib/libwep: code signing blocked mmap() of '/usr/local/lib/libwep'
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
How I can fix this error?

Related

Makefile cannot install code due to previous installation of earlier version

I have previously installed some code using a makefile. Now, I'm installing an updated version of the code (with some added features). The problem is that when I run make clean; make class the following error comes up:
ld: 13 duplicate symbols for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [class] Error 1
I believe this is because it is trying to install the same files in the same directories as the previous installation. I've tried make uninstall on the other installation, but that just returns make: *** No rule to make target `uninstall'. Stop.
Is this the reason for the error? If so, do I have to manually uninstall the previously installed files? And how do I do that?
Thanks a lot for any help!
We need your Makefile for this.
Clean and other commands are defined inside it, make sure that the rules are correctly cleaning the files.

How can I fix this bizarre "No such file or directory" error when building with make on Mac?

I have a Node.js Native Addon C++ library, which uses node-gyp to generate a Makefile and then compiles and links the library using that Makefile. I am encountering this strange error: approximately once every 20 runs or so, a build fails with an error that starts with sh: and then says that a seemingly random system binary or shell builtin cannot be found in a seemingly random directory from the path. For example, a recent error message says this:
sh: /Users/kbuilder/.nvm/versions/node/v12.16.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin/printf: No such file or directory
Here are some other variants I have seen:
sh: /Library/Frameworks/Python.framework/Versions/3.5/bin/touch: No such file or directory
sh: /Users/kbuilder/.nvm/versions/node/v10.19.0/bin/rm: No such file or directory
sh: /Users/kbuilder/.rvm/gems/ruby-2.6.3#global/bin/printf: No such file or directory
Some other error messages that seem to be related are:
/bin/sh: /bin/sh: cannot execute binary file
and
make: /bin/sh: Exec format error
What is happening here and how can I fix it?

dyld: Library not loaded: /usr/local/opt/gsl/lib/libgsl.23.dylib

I am trying to get a piece of software called emergent working. It relies on qt and coin, which I've both installed.
But when I try to run emergent, I get the following error:
dyld: Library not loaded: /usr/local/opt/gsl/lib/libgsl.23.dylib
Referenced from: /usr/local/bin/emergent
Reason: image not found
Abort trap: 6
gsl 2.6 is already installed on my computer. Also using Mac OS. Any ideas what could be causing this?
ls /usr/local/opt/gsl
see which version of the library you have (I had .25)
then
ln -s libgsl.25.dylib libgsl.23.dylib
Makes symbolic link between files.
then it worked!

Link errors after pod install followed by attempted uninstall

I installed 'CoreStore' using cocoapods. one of the installed source (GCD) had over 30 compilation errors. I attempted to uninstall the module by running pod install on a Podfile without the module. However this is resulting in a link error ld: framework not found Pods_QwikFile
clang: error: linker command failed with exit code 1 (use -v to see invocation) .
How do I attempt to edit the link commands in Build Settings
Is it easier for me to edit the Link file directly. If so where do I find the link file
In the Build Phases part of the Target, I found clear reference to pod. I deleted the 2 entries and that eliminated the link errors.

Library not loaded on terminal but runs ok on Xcode

I built a command line tool within Xcode and it runs ok, but when I try to run it from the terminal it complains about one of my libs:
MacBook:Debug Jonathan$ ./MyApp
dyld: Library not loaded: /Users/Jonathan/Library/Frameworks/Josk.framework/Versions/A/Josk
Referenced from: /Users/Jonathan/Development/C++/MyApp/build/Debug/./MyApp
Reason: image not found
Trace/BPT trap
on my MyApp project I added a copy phase (destination: framework, no path and didn't mark the only-on-installing checkbox) to the target and on the directory of MyApp I can see the Josk.framework copied.
Thanks,
Jonathan
export DYLD_FRAMEWORK_PATH=/Users/Jonathan/Library/Frameworks
or
copy Josk.framework to /Users/Jonathan/Library/Frameworks
For deployment, there are various options such as #executable_path, #loader_path, #rpath.
see, man dyld