Gdalya
Gdalya

Reputation: 405

MATLAB loadlibrary error: Undefined symbol: _intel_fast_memmove

I am trying to load a 3rd-party library (.so file) into MATLAB under RHEL.

I am getting an error: undefined:symbol: _intel_fast_memmove.

From Symbol lookup error: _FileName_: undefined symbol: _intel_fast_memmove it seems like I need to add a sub-directory of /opt/intel to my LD_LIBRARY_PATH environment variable, but I don't have an /opt/intel directory.

UPDATE:

MATLAB said that the problem came when trying to load libifcoremt.so.5. I have since installed Intel's Redistributable Libraries and all that did was call Intel's version of libifcoremt.so.5 but still looked for _intel_fast_memmove (but still didn't find it). So now I'm thinking that there must be some other "definitions" file somewhere that I'm missing.

Upvotes: 0

Views: 360

Answers (1)

Gdalya
Gdalya

Reputation: 405

It took me a few days, but I was able to figure out what was going on.

In the end, there were two problems:

  1. I was missing some libraries -- not the ones that I mention in my question, but Intel's Redistributable Libraries.

  2. Even with all of the libraries on my computer, MATLAB was still using an older version of the some of the .os files.

    I failed to mention in my question that while the 3rd-party library is fairly recent, I was calling it from MATLAB 2012B because I needed to integrate it with a software package that doesn't work correctly with later MATLAB versions. My apologies for that omission -- it turns out to be a critical piece of the puzzle.

    While diagnosing this issue, I learned that MATLAB has it's own copy of the Intel libraries in the <MATLAB>/sys/os/glnxa64 sub-directory and that it creates an internal version of LD_LIBRARY_PATH that points to its internal version before the LD_LIBRARY_PATH that it imports from the Linux OS. Since the version of MATLAB I'm using is 6 years old, so is it's Intel library, which doesn't contain some symbols defined in the new library, such as intel_fast_memmove.

To get the integrated system up and running, I instituted a workaround to rename the sys/os/glnxa64 before calling the 3rd-party library so that MATLAB found the newer Intel library instead of the MATLAB 2012B version. And then named it back when done (without that directory, MATLAB won't start).

Note: I first tried editing the value of LD_LIBRARY_PATH inside MATLAB 2012B to prefer the new Intel library, but found that even though the external variable value changed, loadlibrary still used the original value that placed MATLAB's library first on the path.

Upvotes: 3

Related Questions