Mac Os Errro Dyld Library Not Loaded Rpath Libgfortran.3.dylib
Most of macOS workstations do not have any NVIDIA graphic boards, hence they cannot run CUDA, for MVS part. So compiling and using Meshroom is not exactly straightforward.However, Ryan Baumann has compiled his own Homebrew tap which includes the necessary formulae, and you can use this post to get an idea of how to use them to get up and running. Oct 29, 2015 The @rpath should reference the LCRPATH of some loaded library, which would point to the lib/ directory of the environment, but nothing already loaded has an LCRPATH, in particular, Python itself does not. Effectively, it's impossible to import this extension module without 'fixing' it with installnametool, which is undesirable for an. My MAC OS is Yosemite 10.10, which has an old version of curl. I have installed Xcode and Xcode command line tools. I run cURL with the 'sudo' command as “sudo curl”: sudo curl Password.
python /Users/admin/rf/gnuradio/gr-dtv/examples/atsc_ctrlport_monitor.py |
python |
import scipy |
import scipy.fftpack |
Traceback (most recent call last): |
File '<stdin>', line 1, in <module> |
File '/usr/local/lib/python2.7/site-packages/scipy/fftpack/__init__.py', line 95, in <module> |
from .basic import * |
File '/usr/local/lib/python2.7/site-packages/scipy/fftpack/basic.py', line 12, in <module> |
from . import _fftpack |
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/scipy/fftpack/_fftpack.so, 2): Library not loaded: /usr/local/opt/gcc/lib/gcc/5/libgfortran.3.dylib |
Referenced from: /usr/local/lib/python2.7/site-packages/scipy/fftpack/_fftpack.so |
Reason: image not found |
scipy installed from: brew install scipy |
hint from https://github.com/Homebrew/homebrew-science/issues/3718 - caused by gcc 5 -> 6 |
library is linking gcc/5, but we have gcc/6 |
sudo install_name_tool -change /usr/local/opt/gcc/lib/gcc/5/libgfortran.3.dylib /usr/local/opt/gcc/lib/gcc/6/libgfortran.3.dylib /usr/local/lib/python2.7/site-packages/scipy/fftpack/_fftpack.so |
sudo install_name_tool -change /usr/local/opt/gcc/lib/gcc/5/libquadmath.0.dylib /usr/local/opt/gcc/lib/gcc/6/libquadmath.0.dylib /usr/local/lib/python2.7/site-packages/scipy/fftpack/_fftpack.so |
sudo install_name_tool -change /usr/local/opt/gcc/lib/gcc/5/libgfortran.3.dylib /usr/local/opt/gcc/lib/gcc/6/libgfortran.3.dylib /usr/local/lib/python2.7/site-packages/scipy/fftpack/convolve.so |
sudo install_name_tool -change /usr/local/opt/gcc/lib/gcc/5/libquadmath.0.dylib /usr/local/opt/gcc/lib/gcc/6/libquadmath.0.dylib /usr/local/lib/python2.7/site-packages/scipy/fftpack/convolve.so |
repeat for other libraries as needed, after fixing, should be able to load: |
$ python |
>>> import scipy |
>>> import scipy.fftpack |
and run: |
$ python /Users/admin/rf/gnuradio/gr-dtv/examples/atsc_ctrlport_monitor.py |
Traceback (most recent call last): |
File '/Users/admin/rf/gnuradio/gr-dtv/examples/atsc_ctrlport_monitor.py', line 147, in <module> |
host = sys.argv[1] |
IndexError: list index out of range |
commented Jun 20, 2016
commented Jun 30, 2016
many more. do all, based on Homebrew/homebrew-science#3718 (comment) |
Library Not Loaded Rpath
Problem :
Build an Intel® MKL program on Mac OS* with Intel® Fortran Compiler,
For example, compilers_and_libraries_2017.0.065,
MKLPATH=/opt/intel/compilers_and_libraries_2017.0.065/mac/mkl/lib
MKLINCLUDE=/opt/intel/compilers_and_libraries_2017.0.065/mac/mkl/include
> ifort main. f -o main -L$(MKLPATH) -I$(MKLINCLUDE) -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lpthread
get compiler warning:
ld64 warning: indirect library libiomp5.dylib could not be loaded: file not found: libiomp5.dylib
Or runtime error:
dyld: Library not loaded: libiomp5.dylib
Referenced from: @rpath/libmkl_intel_thread.dylib
Reason: image not found
Trace/BPT trap
Root Cause :
Since MKL 11.2, the MKL libraries for Mac OS* have been integrated into Intel® C++/Fortran Compiler Professional Edition or Intel® C++/Fortran Composer XE for Mac OS* X. The default path of MKL libraries were changed from
'/opt/intel/Compiler/11.x/0xx/Frameworks/mkl/'
to '/opt/intel/compilers_and_libraries_201*.*.***/mac/mkl'
for MKL version 11.0-11.1, please refer to '/opt/intel/Compiler/11.x/0xx/Frameworks/mkl/'
for MKL version 10.*, please refer to '/Library/Frameworks/Intel_MKL.framework/Versions/10.0.x.xxx/'
At the same time, the default OpenMP libraries (libiomp5.dylib, libiomp5.a) used by MKL are not in <MKL Libraries>/lib directory as in previous versions. They are under the Intel compiler lib directory now.
for instance, /opt/intel/compilers_and_libraries_2017.0.065/mac/compiler/lib
Soundtoys components not in library folder mac. If you use openMP in c++ application and build with Intel C++ compiler, please firstly make sure you have enable the option 'ICC Intel® C++ 17.*.***-Language' » 'Process OpenMp Directives'.
IPP is the same, please see the article XCode link error: 'file not found: libiomp5.dylib'
Solution:
For compiler warning:
Please refer to the MKL link line advisor.
the command line could be
>ifort main. f -o main -L$(MKLPATH) -I$(MKLINCLUDE) -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -openmp -lpthread
or
ifort main. f -o main -L$(MKLPATH) -I$(MKLINCLUDE) -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -L/opt/intel/compilers_and_libraries_2017.0.065/mac/compiler/lib -liomp5 -lpthread
Problem:
Get runtime error:
like dyld: Library not loaded: @rpath/lib[mkl ipp]_x.dylib
Root Cause:
You did not set environment variables of MKL/IPP path or did not link your application to MKL/IPP path.
Solution:
Please add the path of lib<product>.dylib in system environment before run binary (The <product> could be 'mkl' or 'ipp'). There are two methods to realize the solution:
- Run shell script file to set environment variables, for example, setting MKL:
> /opt/intel/compilers_and_libraries_2017.*.***/mac/mkl/bin/mklvars.sh <ia32 intel64> - Or write command to set directly, for example, setting MKL:
> export DYLD_LIBRARY_PATH='/opt/intel/compilers_and_libraries_2017.*.***/mac/mkl/lib:$DYLD_LIBRARY_PATH
In Xcode 7.3.1 Development Environment:
Click solution/application, select 'All' and 'Combined', then find 'Linking', add 'Runpath search path' like following:
/opt/intel/compilers_and_libraries_2017.*.***/mac/mkl/lib
/opt/intel/compilers_and_libraries_2017.*.***/mac/compiler/lib
If after set the MKL library and Compiler library, you still got the error dyld: Library not loaded: @rpath/libimp5.dylib,
please consider the solutions provided inhttps://software.intel.com/en-us/forums/intel-c-compiler/topic/698021
Dyld 0x1 Library Missing
or
adding -Wl,-rpath,@executable_path options to your build command line.
Before this solution, you must make sure you have already use Intel C++/Fortran compiler and set 'Header Search Path' and 'Library Search Path' and 'Other Link Flags'.
Learn more information about linking and compiling Intel MKL in Mac OS*, please see:
Compiling and linking MKL with Xcode*
How to link application against Intel MKL using XCode IDE