Repository navigation
Closed
Description
Everything compiles and runs ok, but the RStudio libclang still missing things:
I spent more than 4h around this...
Session info:
> devtools::session_info()
- Session info ------------------------------------------------------------------------------------------------------------------------------------------------------------
setting value
version R version 3.6.3 (2020-02-29)
os Windows 10 x64
system x86_64, mingw32
ui RStudio
language (EN)
collate English_United States.1252
ctype English_United States.1252
tz Europe/London
date 2020-08-06
here is the log for .rs.setClangDiagnostics(2)
CLANG INDEXING: D:/Workspaces/RStudio/test/src/code.cpp
CLANG REMOVE INDEX: D:/Workspaces/RStudio/test/src/code.cpp
COMPILATION ARGUMENTS:
[
"-IC:/Program Files/RStudio/resources/libclang/builtin-headers/5.0.2",
"-IC:/Program Files/RStudio/resources/libclang/builtin-headers/libc++/5.0.2",
"-ID:/Cloud/Google_Drive/Documents/R/win-library/3.6/cpp11/include",
"-std=gnu++11",
"-IC:/PROGRA~1/R/R-36~1.3/include",
"-DNDEBUG",
"-v"
]
(Creating new index)
clang version 5.0.2 (tags/RELEASE_502/final)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir:
ignoring nonexistent directory "lib\clang\5.0.2\include"
ignoring nonexistent directory "C:/Program Files/Microsoft Visual Studio 10.0/VC/include"
ignoring nonexistent directory "C:/Program Files/Microsoft Visual Studio 9.0/VC/include"
ignoring nonexistent directory "C:/Program Files/Microsoft Visual Studio 9.0/VC/PlatformSDK/Include"
ignoring nonexistent directory "C:/Program Files/Microsoft Visual Studio 8/VC/include"
ignoring nonexistent directory "C:/Program Files/Microsoft Visual Studio 8/VC/PlatformSDK/Include"
#include "..." search starts here:
#include <...> search starts here:
C:/Program Files/RStudio/resources/libclang/builtin-headers/5.0.2
C:/Program Files/RStudio/resources/libclang/builtin-headers/libc++/5.0.2
D:/Cloud/Google_Drive/Documents/R/win-library/3.6/cpp11/include
C:/PROGRA~1/R/R-36~1.3/include
End of search list.
C:/Program Files/RStudio/resources/libclang/builtin-headers/libc++/5.0.2\cstddef:44:15: fatal error: 'stddef.h' file not found
TOTAL MEMORY: 6 mb (code.cpp)
PERFORMANCE 181 ms (code.cpp)
CLANG INDEXING: D:/Workspaces/RStudio/test/src/code.cpp
CLANG REMOVE INDEX: D:/Workspaces/RStudio/test/src/code.cpp
COMPILATION ARGUMENTS:
[
"-IC:/Program Files/RStudio/resources/libclang/builtin-headers/5.0.2",
"-IC:/Program Files/RStudio/resources/libclang/builtin-headers/libc++/5.0.2",
"-ID:/Cloud/Google_Drive/Documents/R/win-library/3.6/cpp11/include",
"-std=gnu++11",
"-IC:/PROGRA~1/R/R-36~1.3/include",
"-DNDEBUG",
"-v"
]
(Creating new index)
clang version 5.0.2 (tags/RELEASE_502/final)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir:
ignoring nonexistent directory "lib\clang\5.0.2\include"
ignoring nonexistent directory "C:/Program Files/Microsoft Visual Studio 10.0/VC/include"
ignoring nonexistent directory "C:/Program Files/Microsoft Visual Studio 9.0/VC/include"
ignoring nonexistent directory "C:/Program Files/Microsoft Visual Studio 9.0/VC/PlatformSDK/Include"
ignoring nonexistent directory "C:/Program Files/Microsoft Visual Studio 8/VC/include"
ignoring nonexistent directory "C:/Program Files/Microsoft Visual Studio 8/VC/PlatformSDK/Include"
#include "..." search starts here:
#include <...> search starts here:
C:/Program Files/RStudio/resources/libclang/builtin-headers/5.0.2
C:/Program Files/RStudio/resources/libclang/builtin-headers/libc++/5.0.2
D:/Cloud/Google_Drive/Documents/R/win-library/3.6/cpp11/include
C:/PROGRA~1/R/R-36~1.3/include
End of search list.
C:/Program Files/RStudio/resources/libclang/builtin-headers/libc++/5.0.2\cstddef:44:15: fatal error: 'stddef.h' file not found
TOTAL MEMORY: 6 mb (code.cpp)
PERFORMANCE 184 ms (code.cpp)
C:/Program Files/RStudio/resources/libclang/builtin-headers/libc++/5.0.2\cstddef:44:15: fatal error: 'stddef.h' file not found
Metadata
Metadata
Assignees
Labels
No labels


Activity
jimhester commentedon Aug 7, 2020
Should this instead be an issue in https://github.com/rstudio/rstudio/issues? I am not aware of anything we could change in this project to fix the RStudio completion.
From the log it looks like the cpp11 headers are being included, but that stddef.h error seems suspicious, maybe @kevinushey has thoughts?
franzbischoff commentedon Aug 7, 2020
Yes, I thought about posting in RStudio, but I also crossed by other posts about libclang errors, with Rcpp, and IIRC Rcpp did some changes to comply with some standard...
I'll try this in ubuntu.
franzbischoff commentedon Aug 7, 2020
In Ubuntu, all clear.
In Ubuntu, it is using the libclang 3.8.0, and RStudio (just for windows?) has updated it to 5.0.2, so it may be broken someway.
Just updated the Ubuntu installation from libclang 3.8.0 to 11.0 (the last one), and the bug starts...
franzbischoff commentedon Aug 7, 2020
In windows, I got the old RStudio Desktop 1.1.463 version, and copy the rstudio/bin/rsclang/* and rstudio/resources/libclang/* over the current version (libclang 3.4.0 says the terminal) and it comes back to life. May it be some more restrict syntax, since RStudio said they updated to 5.0.2 to allow c++14 stuff?
kevinushey commentedon Aug 9, 2020
I think the issue here ultimately is that the Rtools headers are not being included during compilation -- those are needed to resolve things referenced via
#include_nextin the libc++ headers.Can you please re-file this issue on the RStudio repository (https://github.com/rstudio/rstudio/issues)?
franzbischoff commentedon Aug 9, 2020
Sure, thank you. I'll post there a link to this issue to avoid having to re-explain all the details.
BR.
bkietz commentedon Sep 15, 2020
@jimhester should this issue be closed, since it has been moved?