- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I've compiled using ICC and the compilation went great. Then I tried running the out file and I get
"libiomp5.so: cannot open shared object file: No such file or directory"
$LD_LIBRARY_PATH was indeed empty and running "/opt/intel/bin/compilervars.sh intel64" did not change that. So I have located libiomp5 my self and made $LD_LIBRARY_PATH be /opt/intel/lib/mic
I still get the same error so I've strace it and get:
# strace /opt/intel/composerxe/Samples/en_US/C++/mic_samples/intro_sampleC/intro_sampleC.out
execve("/opt/intel/composerxe/Samples/en_US/C++/mic_samples/intro_sampleC/intro_sampleC.out", ["/opt/intel/composerxe/Samples/en"...], [/* 53 vars */]) = 0
brk(0) = 0x63f000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2b3bd29000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=198762, ...}) = 0
mmap(NULL, 198762, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f2b3bcf8000
close(3) = 0
open("/lib64/libm.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200E\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=541821, ...}) = 0
mmap(NULL, 2592072, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2b3b893000
fadvise64(3, 0, 2592072, POSIX_FADV_WILLNEED) = 0
mprotect(0x7f2b3b8ee000, 2093056, PROT_NONE) = 0
mmap(0x7f2b3baed000, 126976, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5a000) = 0x7f2b3baed000
close(3) = 0
open("/lib64/tls/x86_64/libiomp5.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/x86_64", 0x7fffa05a7bb0) = -1 ENOENT (No such file or directory)
open("/lib64/tls/libiomp5.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64/tls", 0x7fffa05a7bb0) = -1 ENOENT (No such file or directory)
open("/lib64/x86_64/libiomp5.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64/x86_64", 0x7fffa05a7bb0) = -1 ENOENT (No such file or directory)
open("/lib64/libiomp5.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
open("/usr/lib64/tls/x86_64/libiomp5.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls/x86_64", 0x7fffa05a7bb0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/tls/libiomp5.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls", 0x7fffa05a7bb0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/x86_64/libiomp5.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/x86_64", 0x7fffa05a7bb0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libiomp5.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64", {st_mode=S_IFDIR|0755, st_size=61440, ...}) = 0
writev(2, [{"/opt/intel/composerxe/Samples/en"..., 83}, {": ", 2}, {"error while loading shared libra"..., 36}, {": ", 2}, {"libiomp5.so", 11}, {": ", 2}, {"cannot open shared object file", 30}, {": ", 2}, {"No such file or directory", 25}, {"\n", 1}], 10/opt/intel/composerxe/Samples/en_US/C++/mic_samples/intro_sampleC/intro_sampleC.out: error while loading shared libraries: libiomp5.so: cannot open shared object file: No such file or directory
) = 194
exit_group(127) = ?
As you can see, the file is found, opened, then closed and reported as missing.What can I do to resolve this?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello itzik,
I do not know why $LD_LIBRARY_PATH was not set but it needs to point to /opt/intel/lib/intel64
--Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Easier than looking at an strace watcing it go through your library search path is to just use the program 'ldd'.
Run 'ldd introSampleC.out' and it will list all the shared libraries your app depends on. If you get unmet dependancies, you can add paths to LD_LIBRARY_PATH (note, append to this, dont replace it) until ldd shows that all libraries are found. At that point you should be able to run your app with no problems.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you both for your replies.
That did fix my problem Vladimir.
Thank you for the tip Casey, will make life easier.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page