Skip to content

C diagnostics in rstudio

4 messages · Iñaki Ucar, tim@t@yior m@iii@g oii hidde@eieph@@ts@co@uk

#
Apologies if this is double posted as I initially sent from an account not registered.
 
I've noticed that diagnostics and completions for C code do not seem to be working within rstudio on f36 (2022.02.4+500-1). Is there something additional required to enable them outside of rstudio itself? Using .rs.setClangDiagnostics(2) within rstudio gives me the following output:

Attemping to load libclang for x86_64-redhat-linux-gnu 
/usr/libexec/rstudio/bin/rsclang/libclang.so
(Not Found)
/usr/lib/libclang.so
(Not Found)
/usr/lib/llvm/libclang.so
(Not Found)
/usr/lib64/libclang.so
(Not Found)
/usr/lib64/llvm/libclang.so
(Not Found)
/usr/lib64/llvm13/lib/libclang.so.1
(Not Found)

For reference in /usr/lib64 I have
clang
libclang-cpp.so.14
libclang.so.14.0.5
libclang.so.14.0.5
llvm13

Cheers

Tim
#
On Tue, 18 Oct 2022 at 16:54, <tim.taylor at hiddenelephants.co.uk> wrote:
Yes, you need to install clang-devel, both for our build as well as
for the official build.

In general, this is how you can find which package provides a certain file:

$ dnf repoquery --provides */<file>

where <file>=libclang.so in our case.

I?aki

  
    
#
Great - thank you. Even though it's the same with the official build do you think it's worth a small addendum within https://cran.r-project.org/bin/linux/fedora/#add-ons?

Tim
#
On Tue, 18 Oct 2022 at 20:24, <tim.taylor at hiddenelephants.co.uk> wrote:
Or, better, we could add "Recommends: clang-devel" to our build in the
next release, and in this way it would be pulled automatically by
default.

I?aki