gcc - Matlab - dyld: Library not loaded: /usr/local/opt/mpfr2/lib/libmpfr.1.dylib -
i trying compile matlab program using mex. facing following error , wondering if have suggestions. have installed latest version of mpfr @ /usr/local/opt/mpfr
still picking /usr/local/opt/mpfr2
.
the error below:
dyld: library not loaded: /usr/local/opt/mpfr2/lib/libmpfr.1.dylib referenced from: /usr/local/cellar/gcc48/4.8.1/gcc/libexec/gcc/x86_64-apple-darwin12.5.0/4.8.1/cc1plus reason: incompatible library version: cc1plus requires version 4.0.0 or later, libmpfr.1.dylib provides version 3.0.0 g++-4.8: internal compiler error: trace/bpt trap: 5 (program cc1plus) /applications/matlab_r2012b.app/bin/mex: line 1326: 15075 abort trap: 6 /usr/local/bin/g++-4.8 -c -i/applications/matlab_r2012b.app/extern/include -i/applications/matlab_r2012b.app/simulink/include -dmatlab_mex_file -fno-common -fexceptions -arch x86_64 -isysroot /applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/macosx10.8.sdk/ -mmacosx-version-min=10.7 -dmx_compat_32 -o2 -dndebug "face-detection/src/resizef.cc" -o face-detection/private/resizef.o
try running command before compiling:
setenv('dyld_library_path','')
i trying compile else (not matlab program) , received same error. same command worked in bash, inspected environment variables , found matlab's dyld_library_path differed bash's dyld_library_path. bash dyld_library_path not defined, set empty in matlab , fixed path error.
matlab's setenv documentation:
values assigned variables using setenv picked any
process spawned using matlab system, unix, dos or '!'
functions. can retrieve value set setenv using
getenv(name).
Comments
Post a Comment