clang_parseTransitionUnit2 gives error

Enes Albay albayenes at gmail.com
Tue Apr 12 16:33:38 BST 2022


I found something. After removing clang and llvm from my system I get the
following error which is the same as before removing clang.

I think the actual problem is clang_parseTranslationUnit2 can not call
clang even before removing clang

Is there a way to verify such a situation?

kde/build/kdevelop/bin$ KDEV_CLANG_DISPLAY_ARGS=1
KDEV_CLANG_DISPLAY_DIAGS=1  ./kdevelop
Qt WebEngine seems to be initialized from a plugin. Please set
Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before
constructing QGuiApplication.
kdevplatform.util: Path::init: invalid/unsupported Path encountered:
http://clang-tidy
kf.kio.slaves.file: copy()
QUrl("file:///media/enes/MyFiles/programming/cpp/cmakeExamples/ex1/ex1.kdev4")
to QUrl("file:///tmp/kdevelop.CKycps") mode= -1
kf.kio.slaves.file: the file doesn't have any xattr
qrc:/qml/area_code.qml:56:9: Type NewsFeed unavailable
qrc:/qml/NewsFeed.qml:10:1: module "QtQuick.XmlListModel" is not installed
Invocation: clang -ferror-limit=100 -fspell-checking  -Wunused-parameter
-Wunreachable-code -Wall -std=c99 -nostdinc -xc
-Wno-gnu-zero-variadic-macro-arguments -isystem/usr/local/include
-isystem/usr/include/x86_64-linux-gnu -isystem/us
r/include -isystem /usr/lib/llvm-13/lib/clang/13.0.1/include -imacros
/tmp/kdevelop.RRnVGg
/media/enes/MyFiles/programming/cpp/cmakeExamples/ex1/main2.c
kdevelop.plugins.clang: clang_parseTranslationUnit2 return with error code
4
kdevelop.plugins.clang: Failed to parse translation unit:
"/media/enes/MyFiles/programming/cpp/cmakeExamples/ex1/main2.c"
Invocation: clang -ferror-limit=100 -fspell-checking  -Wunused-parameter
-Wunreachable-code -Wall -std=c++11 -nostdinc -nostdinc++ -xc++
-Wno-gnu-zero-variadic-macro-arguments -isystem/usr/include/c++/10
-isystem/usr/include/x86_64-linu
x-gnu/c++/10 -isystem/usr/include/c++/10/backward
-isystem/usr/local/include -isystem/usr/include/x86_64-linux-gnu
-isystem/usr/include -isystem /usr/lib/llvm-13/lib/clang/13.0.1/include
-imacros /tmp/kdevelop.pNTwmx -working-directory/
media/enes/MyFiles/programming/cpp/cmakeExamples/ex1/build
/media/enes/MyFiles/programming/cpp/cmakeExamples/ex1/main.cpp
Invocation: clang -ferror-limit=100 -fspell-checking  -Wunused-parameter
-Wunreachable-code -Wall -std=c99 -nostdinc -xc
-Wno-gnu-zero-variadic-macro-arguments -isystem/usr/local/include
-isystem/usr/include/x86_64-linux-gnu -isystem/us
r/include -isystem /usr/lib/llvm-13/lib/clang/13.0.1/include -imacros
/tmp/kdevelop.nbtZxb
/media/enes/MyFiles/programming/cpp/cmakeExamples/ex1/build/CMakeFiles/3.23.0/CompilerIdC/CMakeCCompilerId.c

Invocation: clang -ferror-limit=100 -fspell-checking  -Wunused-parameter
-Wunreachable-code -Wall -std=c++11 -nostdinc -nostdinc++ -xc++
-Wno-gnu-zero-variadic-macro-arguments -isystem/usr/include/c++/10
-isystem/usr/include/x86_64-linu
x-gnu/c++/10 -isystem/usr/include/c++/10/backward
-isystem/usr/local/include -isystem/usr/include/x86_64-linux-gnu
-isystem/usr/include -isystem /usr/lib/llvm-13/lib/clang/13.0.1/include
-imacros /tmp/kdevelop.hLNvqN /media/enes/MyFiles
/programming/cpp/cmakeExamples/ex1/build/CMakeFiles/3.23.0/CompilerIdCXX/CMakeCXXCompilerId.cpp

Invocation: clang -ferror-limit=100 -fspell-checking  -Wunused-parameter
-Wunreachable-code -Wall -std=c99 -nostdinc -xc
-Wno-gnu-zero-variadic-macro-arguments -isystem/usr/local/include
-isystem/usr/include/x86_64-linux-gnu -isystem/us
r/include -isystem /usr/lib/llvm-13/lib/clang/13.0.1/include -imacros
/tmp/kdevelop.cdBxfT
/media/enes/MyFiles/programming/cpp/cmakeExamples/ex1/build/CMakeFiles/3.18.4/CompilerIdC/CMakeCCompilerId.c

Invocation: clang -ferror-limit=100 -fspell-checking  -Wunused-parameter
-Wunreachable-code -Wall -std=c++11 -nostdinc -nostdinc++ -xc++
-Wno-gnu-zero-variadic-macro-arguments -isystem/usr/include/c++/10
-isystem/usr/include/x86_64-linu
x-gnu/c++/10 -isystem/usr/include/c++/10/backward
-isystem/usr/local/include -isystem/usr/include/x86_64-linux-gnu
-isystem/usr/include -isystem /usr/lib/llvm-13/lib/clang/13.0.1/include
-imacros /tmp/kdevelop.WVFrbU /media/enes/MyFiles
/programming/cpp/cmakeExamples/ex1/build/CMakeFiles/3.18.4/CompilerIdCXX/CMakeCXXCompilerId.cpp

kdevelop.plugins.clang: clang_parseTranslationUnit2 return with error code
4
kdevelop.plugins.clang: Failed to parse translation unit:
"/media/enes/MyFiles/programming/cpp/cmakeExamples/ex1/build/CMakeFiles/3.18.4/CompilerIdC/CMakeCCompilerId.c"

kdevelop.plugins.clang: clang_parseTranslationUnit2 return with error code
4
kdevelop.plugins.clang: Failed to parse translation unit:
"/media/enes/MyFiles/programming/cpp/cmakeExamples/ex1/build/CMakeFiles/3.23.0/CompilerIdC/CMakeCCompilerId.c"

kdevelop.plugins.clang: clang_parseTranslationUnit2 return with error code
4
kdevelop.plugins.clang: Failed to parse translation unit:
"/media/enes/MyFiles/programming/cpp/cmakeExamples/ex1/main.cpp"
kdevelop.plugins.clang: clang_parseTranslationUnit2 return with error code
4
kdevelop.plugins.clang: Failed to parse translation unit:
"/media/enes/MyFiles/programming/cpp/cmakeExamples/ex1/build/CMakeFiles/3.18.4/CompilerIdCXX/CMakeCXXCompilerId.cpp"

kdevelop.plugins.clang: clang_parseTranslationUnit2 return with error code
4
kdevelop.plugins.clang: Failed to parse translation unit:
"/media/enes/MyFiles/programming/cpp/cmakeExamples/ex1/build/CMakeFiles/3.23.0/CompilerIdCXX/CMakeCXXCompilerId.cpp"



On Tue, Apr 12, 2022 at 10:31 AM Enes Albay <albayenes at gmail.com> wrote:

>
> Ok, I will try to solve the issue. I will inform you if I can find the
> source of the problem. Thanks for your concern.
>
> On Tue, Apr 12, 2022 at 10:26 AM Milian Wolff <mail at milianw.de> wrote:
>
>> On Montag, 11. April 2022 22:58:15 CEST Enes Albay wrote:
>> > I have two versions of clang. clang 11 and clang 13 . I installed clang
>> 13
>> > after the error.
>>
>> OK, and kdevelop is using libclang11 too I guess. Generally though, I can
>> only
>> repeat what I said - I have zero clue what could be going on over on your
>> side. You'll have to debug that yourself I'm afraid, I haven't seen such
>> an
>> issue myself. It works just fine for me
>>
>> Good luck
>>
>> > kde/src/kdevelop/plugins/clang$ clang --version
>> > Debian clang version 11.1.0-6+b2
>> > Target: x86_64-pc-linux-gnu
>> > Thread model: posix
>> > InstalledDir: /usr/bin
>> >
>> > On Mon, Apr 11, 2022 at 11:08 PM Milian Wolff <mail at milianw.de> wrote:
>> > > On Montag, 11. April 2022 20:16:33 CEST Enes Albay wrote:
>> > > > It does not give any error
>> > > >
>> > > > ~$ clang -ferror-limit=100 -fspell-checking -Wunused-parameter
>> > > > -Wunreachable-code -Wall -std=c++11 -nostdinc -nostdinc++ -xc++
>> > > > -Wno-gnu-zero-variadic-macro-arguments -isystem/usr/include/c++/11
>> > > > -isystem/usr/include/x86_64-linux-gnu/c++/11
>> > > > -isystem/usr/include/c++/11/backward -isystem/usr/local/include
>> > > > -isystem/usr/include/x86_64-linux-gnu -isystem/usr/include -isystem
>> > > > /usr/lib/llvm-11/lib/clang/11.1.0/include -imacros
>> > > > /home/enes/clan_defines.cpp
>> > >
>> > >
>> -working-directory/media/enes/MyFiles/programming/cpp/cmakeExamples/ex1/bu
>> > > il>
>> > > > d /media/enes/MyFiles/programming/cpp/cmakeExamples/ex1/main.cpp
>> > >
>> > > Hm this is very odd, I cannot really come up with a theory to explain
>> > > this.
>> > >
>> > > Just to double check - `clang --version` also gives version 11.1.0?
>> Or do
>> > > you
>> > > have multiple versions installed maybe? What version of libclang do
>> you
>> > > have
>> > > installed?
>> > >
>> > > All of this works fine for me after all...
>> > >
>> > > --
>> > > Milian Wolff
>> > > mail at milianw.de
>> > > http://milianw.de
>>
>>
>> --
>> Milian Wolff
>> mail at milianw.de
>> http://milianw.de
>
>
>
> --
> Enes Albay
>


-- 
Enes Albay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20220412/defed482/attachment-0001.htm>


More information about the KDevelop-devel mailing list