Why does a LD_PRELOAD error appear when using MEX commands on Linux?
古いコメントを表示
I am working on Linux (Red Hat 7.8) and am experiencing errors while trying to run mex commands.
Below is the error log when setting up MEX compiler:
>> mex -setup
Segmentation fault (core dumped)
ERROR: ld.so: object '/raid/tools/MATLAB/R2021a/bin/glnxa64/glibc-2.17_shim.so' from LD_PRELOAD cannot be preloaded: ignored.
Segmentation fault (core dumped)
ERROR: ld.so: object '/raid/tools/MATLAB/R2021a/bin/glnxa64/glibc-2.17_shim.so' from LD_PRELOAD cannot be preloaded: ignored.
Segmentation fault (core dumped)
ERROR: ld.so: object '/raid/tools/MATLAB/R2021a/bin/glnxa64/glibc-2.17_shim.so' from LD_PRELOAD cannot be preloaded: ignored.
Segmentation fault (core dumped)
ERROR: ld.so: object '/raid/tools/MATLAB/R2021a/bin/glnxa64/glibc-2.17_shim.so' from LD_PRELOAD cannot be preloaded: ignored.
Segmentation fault (core dumped)
ERROR: ld.so: object '/raid/tools/MATLAB/R2021a/bin/glnxa64/glibc-2.17_shim.so' from LD_PRELOAD cannot be preloaded: ignored.
Segmentation fault (core dumped)
ERROR: ld.so: object '/raid/tools/MATLAB/R2021a/bin/glnxa64/glibc-2.17_shim.so' from LD_PRELOAD cannot be preloaded: ignored.
MEX configured to use 'gcc' for C language compilation.
Output for echo LD_PRELOAD in terminal:
LD_PRELOAD: Undefined variable.
Executing MCC command to compile a simple library:
>> mex -v -DMEX -outdir C_model/mex C_model/source/mex/encode_C.cpp C_model/source/Accessories.cpp C_model/source/Channel.cpp C_model/source/CoDec.cpp C_model/source/Encoder.cpp C_model/source/GF2.cpp C_model/source/Index.cpp
Verbose mode is on.
... Looking for compiler 'g++' ...
... Executing command 'which g++' ...Segmentation fault (core dumped)
ERROR: ld.so: object '/raid/tools/MATLAB/R2021a/bin/glnxa64/glibc-2.17_shim.so' from LD_PRELOAD cannot be preloaded: ignored.
Yes ('/home/liork/.local/bin/g++').
... Executing command 'g++ -print-file-name=libstdc++.so' ...Segmentation fault (core dumped)
ERROR: ld.so: object '/raid/tools/MATLAB/R2021a/bin/glnxa64/glibc-2.17_shim.so' from LD_PRELOAD cannot be preloaded: ignored.
Yes ('/usr/local/gcc/9.2.0/lib64/libstdc++.so').
... Executing command 'g++ -dumpversion' ...Segmentation fault (core dumped)
ERROR: ld.so: object '/raid/tools/MATLAB/R2021a/bin/glnxa64/glibc-2.17_shim.so' from LD_PRELOAD cannot be preloaded: ignored.
Yes ('9.2.0').
... Executing command 'which g++' ...Segmentation fault (core dumped)
ERROR: ld.so: object '/raid/tools/MATLAB/R2021a/bin/glnxa64/glibc-2.17_shim.so' from LD_PRELOAD cannot be preloaded: ignored.
Yes ('/home/liork/.local/bin/g++').
... Looking for folder '/usr/local/gcc/9.2.0' ...Yes.
... Executing command 'g++ -dumpmachine' ...Segmentation fault (core dumped)
ERROR: ld.so: object '/raid/tools/MATLAB/R2021a/bin/glnxa64/glibc-2.17_shim.so' from LD_PRELOAD cannot be preloaded: ignored.
Yes ('x86_64-pc-linux-gnu').
Found installed compiler 'g++'.
... Looking for compiler 'g++' ...
... Executing command 'which g++' ...Segmentation fault (core dumped)
I have everything installed correctly, including MATLAB and C compiler (GCC). I have also tried to set LY_PRELOAD using "setenv()", but the issue persists.
What can be the cause of the issue?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Introduction to Installation and Licensing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!