Symbol lookup error: _FileName_: undefined symbol: _intel_fast_memmove
<p>So I'm working on linking together a Fortran and a C++ code, and I'm getting the above error when I try and run the executable. I've done some searching for other solutions, and none of the things I've found so far have helped. I'll try and include everything, but I'm not that great with this kind of stuff so if there's anything else that is needed/useful to see let me know and I'll go grab it. </p>

<p>Makefile:</p>

<pre><code>LDLIBS = -I/share/apps/intel/composer_xe_2011.sp1.10.319/mkl/include \
         -L/share/apps/intel/composer_xe_2011_sp1.10.319/mkl/lib/intel64 \
         -I/share/apps/intel/composer_xe_2011_sp1.10.319/mkl/interfaces/lapack95/source\
         -mkl -openmp -reentrancy threaded

INCLUDE = -I/path/mstl/include \
          -I/path/mstl/include/physics \
          -I/path/mstl/include/math2 \
          -I/path/mstl/include/math2/algebra \
          -I/path/mstl/include/mat2/analysis \
          -I/path/mstl/include/math2/data \
          -I/path/mstl/include/math2/geometry \
          -I/path/mstl/include/math2/group \
          -I/path/mstl/include/math2/spline \
          -I/path/mstl/include/math2/probabilityandstatistics

LIBRARY = -L/path/mstl/lib

FC = ifort -c             #f compiler
CC = icc -c               #c compiler
LK = ifort -v -o ../abXX  #linker

CF = -mcmodel=large -i-dynamic -no-ipo -r8 -xW -traceback -fpe0 #f compile flags
OF = $(CF) -O2                                                  #f optimization flags
DF = $(CF) -g -debug -fpskchk -C -warn interfaces               #f debug flags

OPTIONS = -O -loops -lstdc++ -lmstl.icc          #c compile flags
LKOPS = -icc -lstdc++ -lmstl.icc -cxxlib -lintlc #linking options for C libs

COMP = $(FC) $(OF)                               #fortran compiler
CMP = $(CC) $(LIBRARY) $(INCLUDE) $(OPTIONS)     #C++ compiler
LINK = $(LK) $(OF)                               #program linker

MODULES = list of all fortran .o files here. 

COBJS = list of all c++ .o files here.

.cpp.o:
       $(CMP) $&lt;

.f.o:
       $(COMP) $&lt;

../abXX: $(MODULES) $(COBJS)
        $(LINK) $(MODULES) $(COBJS) $(LDLIBS) $(LIBRARY) $(INCLUDE) $(LKOPS)

clean:
      rm -v -f *.o *.mod ../abXX
</code></pre>

<p>.mybashrc:</p>

<pre><code>echo "I exist in mybashrc"

export PATH=$PATH:/opt/intel/composer_xe_2011_sp1/bin
export PATH=$PATH:/opt/INTEL/bin

source /opt/INTEL/bin/compilervars.sh intel64
export LD_LIBRARY_PATH = $LD_LIBRARY_PATH:/opt/intel/composerxe/mkl/lib/intel64/
export LD_LIBRARY_PATH = /opt/intel/composer_xe_2011_sp1.10.319/compiler/lib/intel64/:$LD_LIB_PATH

export INTEL_LICENSE_FILE = /opt/INTEL/licenses/client.lic

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/mkl/lib/intel64
</code></pre>

<p>error message:</p>

<pre><code>./../abXX: symbol lookup error: ./../abXX: undefined symbol: _intel_fast_memmove
</code></pre>

<p>I've also run the following little script looking for other undefined symbols:</p>

<pre><code>nm --line-numbers --print-file-name --undefined-only --no-sort *.o &gt; errorlist.txt
grep _intel_fast_ errorlist.txt &gt; intelerrors.txt
</code></pre>

<p>When I do this I actually find that there are a large number of undefined references to _intel_fast_memcpy and _intel_fast_memset among the Fortran files. the _intel_fast_memmove only appears as missing in one of the cpp files. </p>

<p>I also found this weird because the Fortran code without the c runs just fine. I don't make any changes to the Fortran code. I just remove the definition of INCLUDE, LIBRARY, CC, OPTIONS, LKOPS, CMP, and COBJS from the specified make file and the recipe for ../abXX becomes</p>

<pre><code>$(LINK) $(MODULES) $(LDLIBS)
</code></pre>

<p>I think I've included everything I've seen asked for on other threads I've looked at with similar errors, I can post anything else that might be useful as well. </p>

<p>EDIT: As requested:</p>

<p>results of <code>echo $LD_LIBRARY_PATH</code>:</p>

<pre><code>/opt/intel/composer_xe_2011_sp1.10.319/compiler/lib/intel64/:/opt/INTEL/compilers_and_libraries_2016.3.210/linux/compiler/lib/intel64:/opt/INTEL/compilers_and_libraries_2016.3.210/linux/compiler/lib/intel64_lin:/opt/INTEL/compilers_and_libraries_2016.3.210/linux/ipp/lib/intel64:/opt/INTEL/compilers_and_libraries_2016.3.210/linux/compiler/lib/intel64:/opt/INTEL/compilers_and_libraries_2016.3.210/linux/mkl/lib/intel64:/opt/INTEL/compilers_and_libraries_2016.3.210/linux/tbb/lib/intel64/gcc4.4:/opt/INTEL/debugger_2016/libipt/intel64/lib:/opt/INTEL/compilers_and_libraries_2016.3.210/linux/daal/lib/intel64_lin:/opt/INTEL/compilers_and_libraries_2016.3.210/linux/daal/../tbb/lib/intel64_lin/gcc4.4:/opt/INTEL/compilers_and_libraries_2016.3.210/linux/daal/../compiler/lib/intel64_lin::/opt/intel/composerxe/mkl/lib/intel64/:/opt/intel/composerxe/mkl/lib/intel64/:/opt/intel/mkl/lib/intel64
</code></pre>

<p>results of `ldd ../abXX'</p>

<pre><code>linux-vdso.so.1 =&gt;  (0x00007fffb51b8000)
libstdc++.so.6 =&gt; /usr/lib64/libstdc++.so.6 (0x0000003171800000)
libintlc.so.5 =&gt; /opt/intel/composer_xe_2011_sp1.10.319/compiler/lib/intel64/libintlc.so.5 (0x00007fc93b678000)
libmkl_intel_lp64.so =&gt; /opt/INTEL/compilers_and_libraries_2016.3.210/linux/mkl/lib/intel64/libmkl_intel_lp64.so (0x00007fc93ab68000)
libmkl_intel_thread.so =&gt; /opt/INTEL/compilers_and_libraries_2016.3.210/linux/mkl/lib/intel64/libmkl_intel_thread.so (0x00007fc939238000)
libmkl_core.so =&gt; /opt/INTEL/compilers_and_libraries_2016.3.210/linux/mkl/lib/intel64/libmkl_core.so (0x00007fc937820000)
libiomp5.so =&gt; /opt/intel/composer_xe_2011_sp1.10.319/compiler/lib/intel64/libiomp5.so (0x00007fc937528000)
libifport.so.5 =&gt; /opt/intel/composer_xe_2011_sp1.10.319/compiler/lib/intel64/libifport.so.5 (0x00007fc9373f0000)
libifcoremt.so.5 =&gt; /opt/intel/composer_xe_2011_sp1.10.319/compiler/lib/intel64/libifcoremt.so.5 (0x00007fc937178000)
libimf.so =&gt; /opt/intel/composer_xe_2011_sp1.10.319/compiler/lib/intel64/libimf.so (0x00007fc936da8000)
libsvml.so =&gt; /opt/intel/composer_xe_2011_sp1.10.319/compiler/lib/intel64/libsvml.so (0x00007fc936628000)
libm.so.6 =&gt; /lib64/libm.so.6 (0x000000316b000000)
libgcc_s.so.1 =&gt; /lib64/libgcc_s.so.1 (0x0000003171400000)
libpthread.so.0 =&gt; /lib64/libpthread.so.0 (0x000000316b400000)
libdl.so.2 =&gt; /lib64/libdl.so.2 (0x000000316b800000)
libc.so.6 =&gt; /lib64/libc.so.6 (0x000000316ac00000)
/lib64/ld-linux-x86-64.so.2 (0x000000316a800000)
</code></pre>