Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to let clang-format in vscode know my LD_LIBRARY_PATH #158

Open
miaodi opened this issue Dec 4, 2023 · 0 comments
Open

How to let clang-format in vscode know my LD_LIBRARY_PATH #158

miaodi opened this issue Dec 4, 2023 · 0 comments

Comments

@miaodi
Copy link

miaodi commented Dec 4, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant