Discussion:
GMT5: Library not loaded
SEUNG-SEP KIM
2012-03-23 08:41:32 UTC
Permalink
Dear GMT users,

With cmake and the enabled Matlab API option, I am getting the following error message:

dyld: Library not loaded: @rpath/libmex.dylib
Referenced from: /Users/sskim/this_gmt/bin/psxy
Reason: image not found
Trace/BPT trap

If I turn off Matlab API option, the above message goes away and GMT commands are working without any problem.
Did I do something wrong when to enable Matlab API?

I made the following modification in my ConfigUser.cmake

# Enable Matlab API [FALSE]:
set (GMT_MATLAB TRUE)
# If Matlab is not found, point MATLAB_ROOT to its installation path, e.g.:
set (MATLAB_ROOT /Applications/MATLAB_R2011b.app) # MacOSX

Any advice is appreciated!

Best,
Seung-Sep

To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Paul Wessel
2012-03-23 20:57:38 UTC
Permalink
HI Seung-Sep-

I don't think the mex/octave stuff is fully operational after the cmake move, and at any rate we are working on re-writing the entire mex API for GMT. For urgent need pls use the GMT4 mex stuff for now.
-p
Post by SEUNG-SEP KIM
Dear GMT users,
Referenced from: /Users/sskim/this_gmt/bin/psxy
Reason: image not found
Trace/BPT trap
If I turn off Matlab API option, the above message goes away and GMT commands are working without any problem.
Did I do something wrong when to enable Matlab API?
I made the following modification in my ConfigUser.cmake
set (GMT_MATLAB TRUE)
set (MATLAB_ROOT /Applications/MATLAB_R2011b.app) # MacOSX
Any advice is appreciated!
Best,
Seung-Sep
To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Florian Wobbe
2012-03-29 12:42:45 UTC
Permalink
Post by SEUNG-SEP KIM
Referenced from: /Users/sskim/this_gmt/bin/psxy
Reason: image not found
Trace/BPT trap
If I turn off Matlab API option, the above message goes away and GMT commands are working without any problem.
Did I do something wrong when to enable Matlab API?
No, this is normal behavior on MacOSX. You should not enable Matlab API unless you need it.

When the Matlab API is enabled, you cannot run GMT programs standalone anymore. The reason is that Matlab's libs tell the linker that their location is at @rpath/libmex.dylib. This works only when the executables are called from within Matlab.

If you absolutely must run Matlab enabled GMT commands from the terminal, point the environment variable DYLD_FALLBACK_LIBRARY_PATH to your Matlab library dir (e.g., /Applications/MATLAB_R2010a.app/bin/maci64). See MATLAB_MEX_LIBRARY:FILEPATH entry in CMakeCache.txt.

Florian

To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Loading...