SonarScanner 4.6.2.2472
Java 11.0.11 AdoptOpenJDK (64-bit)
Linux 4.15.0-144-generic amd64
Project root configuration file: /usr/src/sonar-project.properties
Analyzing on SonarQube server 8.8.0
ERROR: cannot get canonical form of: '/usr/src/projects/xx2/loading/screens/../LoadingScreenAssets.h'
error 05-Aug-2021 14:57:06 java.io.IOException: Operation not permitted
error 05-Aug-2021 14:57:06 at java.base/java.io.UnixFileSystem.canonicalize0(Native Method)
error 05-Aug-2021 14:57:06 at java.base/java.io.UnixFileSystem.canonicalize(Unknown Source)
error 05-Aug-2021 14:57:06 at java.base/java.io.File.getCanonicalPath(Unknown Source)
error 05-Aug-2021 14:57:06 at java.base/java.io.File.getCanonicalFile(Unknown Source)
error 05-Aug-2021 14:57:06 at org.sonar.cxx.preprocessor.SourceCodeProvider.getSourceCodeFile(SourceCodeProvider.java:110)
error 05-Aug-2021 14:57:06 at org.sonar.cxx.preprocessor.CxxPreprocessor.findIncludedFile(CxxPreprocessor.java:1033)
error 05-Aug-2021 14:57:06 at org.sonar.cxx.preprocessor.CxxPreprocessor.handleIncludeLine(CxxPreprocessor.java:1194)
error 05-Aug-2021 14:57:06 at org.sonar.cxx.preprocessor.CxxPreprocessor.process(CxxPreprocessor.java:644)
error 05-Aug-2021 14:57:06 at com.sonar.sslr.impl.Lexer.preprocess(Lexer.java:153)
error 05-Aug-2021 14:57:06 at com.sonar.sslr.impl.Lexer.preprocess(Lexer.java:143)
error 05-Aug-2021 14:57:06 at com.sonar.sslr.impl.Lexer.lex(Lexer.java:132)
error 05-Aug-2021 14:57:06 at com.sonar.sslr.impl.Lexer.lex(Lexer.java:110)
I just start analyzing our entire c++ code base, which compiles just fine without these errors. I see this error repeat, and the path being observer grows with more and more relative markers, along the lines of:
abc/def/ghi/…/hjk/…/hjk/…/hjk/…/hjk/…/hjk/…/hjk/…/hjk/…/hjk/…/hjk/…/hjk/file.cpp
and I get the “cannot get the canonical form of” error then the operation not permitted error.
I have no idea what might be causing this.