Using clang-format on alidock

Dear all,

the instructions for using clang found at the ALICE O2 Coding Guidelines is not working on alidock. Strangely glibc files cannot be found. After successfully building Clang with aliBuild I get the following when running any clang command:

$ alidock
Starting a shell into the container
[alidock] ~ $> alienv enter Clang/latest-o2                                                                                                                                             
Currently Loaded Modulefiles:
  1) BASE/1.0          2) Clang/latest-o2
Use alienv list to list loaded modules. Use exit to exit this environment.
[Clang/latest-o2] ~ $> clang-format
clang-format: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by clang-format)
clang-format: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/alidock/.sw/slc7_x86-64/Clang/7.0.0-1/bin/../lib/libLLVMSupport.so.7)
clang-format: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /home/alidock/.sw/slc7_x86-64/Clang/7.0.0-1/bin/../lib/libLLVMSupport.so.7)
clang-format: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/alidock/.sw/slc7_x86-64/Clang/7.0.0-1/bin/../lib/libLLVMSupport.so.7) 
...
...

any tip?

Thanks,
Rafael

Maybe this was solved with https://github.com/alisw/alidist/pull/1511 ?
If not, could you try if

alienv enter Clang/latest-o2 GCC-Toolchain...

does the job? Potentially we need to fix the runtime dependency in the modulefile.

1 Like