I built clazy with clang-12 but Qt creator gives an error:
The command "/usr/local/clazy/bin/clazy-standalone --version" terminated with exit code 127.
/usr/local/clazy/bin/clazy-standalone: error while loading shared libraries: libclang-cpp.so.12: cannot open shared object file: No such file or directory
I have added the correct directories to .bashrc:
- export PATH=/usr/local/clang-12/bin:$PATH
- export LD_LIBRARY_PATH=/usr/local/clang-12/lib:$LD_LIBRARY_PATH
Here is a print of shared object dependencies for clazy-standalone:
linux-vdso.so.1 (0x00007ffd9ebe0000)
ClazyPlugin.so => /usr/local/clazy/lib/ClazyPlugin.so (0x00007f06c929d000)
libclang-cpp.so.12 => /usr/local/clang-12/lib/libclang-cpp.so.12 (0x00007f06c4b2b000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f06c4b08000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f06c4b02000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f06c4adf000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f06c4990000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f06c4972000)
libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f06c4942000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f06c4761000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f06c4746000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f06c4554000)
/lib64/ld-linux-x86-64.so.2 (0x00007f06c9437000)
Here is a print of shared object dependencies for libclang-cpp.so.12:
linux-vdso.so.1 (0x00007ffee8df9000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbe393b1000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fbe393a6000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fbe393a0000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbe39251000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fbe39235000)
libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007fbe39205000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fbe39022000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fbe39007000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbe38e15000)
/lib64/ld-linux-x86-64.so.2 (0x00007fbe3db60000)
libcland-cpp.so.12 is not a symlink.
Again the comment by @N0rbert provides no value. I have other similar problems which I suspect stem from this type of issue. Linux can't for some reason find or use the files given.
I found posts of issues with shared libraries from 2005, so obviously I am not the only one.
Can someone finally give a proper answer on how to deal with this type of problem? That way people like me don't have to spend hours reading posts with no answers. Or is this a "feature" of Linux?