How to let clang-format in vscode know my LD_LIBRARY_PATH
miaodi opened this issue · 0 comments
miaodi commented
Hi
My llvm is compiled in a custom path (in order to use the clang-format binary, I need to setup LD_LIBRARY_PATH for both gcc/lib and llvm/lib). If I use the clang-format binary in vscode I got the following output:
/SCRATCH/dimiao/test_space/installed/llvm/bin/clang-format: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /SCRATCH/dimiao/test_space/installed/llvm/bin/clang-format)
/SCRATCH/dimiao/test_space/installed/llvm/bin/clang-format: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /SCRATCH/dimiao/test_space/installed/llvm/bin/clang-format)
/SCRATCH/dimiao/test_space/installed/llvm/bin/clang-format: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /SCRATCH/dimiao/test_space/installed/llvm/bin/clang-format)
/SCRATCH/dimiao/test_space/installed/llvm/bin/clang-format: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /SCRATCH/dimiao/test_space/installed/llvm/bin/clang-format)
/SCRATCH/dimiao/test_space/installed/llvm/bin/clang-format: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /SCRATCH/dimiao/test_space/installed/llvm/bin/clang-format)
/SCRATCH/dimiao/test_space/installed/llvm/bin/clang-format: /lib64/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /SCRATCH/dimiao/test_space/installed/llvm/bin/clang-format)
I know it is because when vs code uses clang-format, it does not have the correct LD_LIBRARY_PATH. Meanwhile, I do not have the permission to add it in .bashrc, as I am not the administrator.
Looking for some suggestions.