MATLAB: Do I receive an error about libacml_mv.so or libguide.so when using MATLAB Compiler 4.6 (R2007a)

MATLAB Compiler

The MATLAB Compiler documentation lists the following to set my LD_LIBRARY _PATH variable.
setenv LD_LIBRARY_PATH
mcr_root/version/runtime/glnxa64:
mcr_root/version/sys/os/glnxa64:
mcr_root/version/sys/java/jre/glnxa64/jre1.5.0/lib/amd64/native_threads:
mcr_root/version/sys/java/jre/glnxa64/jre1.5.0/lib/amd64/server:
mcr_root/version/sys/java/jre/glnxa64/jre1.5.0/lib/amd64:
When I executed my application with the LD_LIBRARY_PATH variable set to the above value, I receive the following error message.
libmwlapack: load error: libacml_mv.so: cannot open shared object file: No such file or directory
terminate called after throwing an instance of 'std::runtime_error'
what(): libacml_mv.so: cannot open shared object file: No such file or directory
Abort
In some instances, the error may also list libguide.so.

Best Answer

The document for MATLAB 7.6 (R2008a) has been updated.
For previous releases:
The mcr_root/version/bin/arch directory (for example, /usr/local/mcr/v76/bin/glnxa64) is not normally required on the LD_LIBRARY_PATH. However, on some systems, the system library loader cannot locate libraries in this directory if it is not on the LD_LIBRARY_PATH.
There are two main ways to work around this issue:
1. Use scripts such as those generated by the MATLAB Compiler for the Standalone Executable target. These add this directory to the path only while the application is running, by creating a subshell with a modified LD_LIBRARY_PATH. This is the preferred method, and simplifies running applications from several versions of the MATLAB Compiler in the same environment.
When following this approach, you can use the following LD_LIBRARY_PATH setting:
setenv LD_LIBRARY_PATH
mcr_root/version/runtime/glnxa64:
mcr_root/version/bin/glnxa64:
mcr_root/version/sys/os/glnxa64:
mcr_root/version/sys/java/jre/glnxa64/jre1.5.0/lib/amd64/native_threads:
mcr_root/version/sys/java/jre/glnxa64/jre1.5.0/lib/amd64/server:
mcr_root/version/sys/java/jre/glnxa64/jre1.5.0/lib/amd64:
2. You can add the mcr_root/version/bin/arch directory to the usual shell environment, using the ordering shown above. Because the libraries in this directory are not versioned, this should not be done when using applications generated by more than one version of the MATLAB Compiler.