QtCreator 20.0.0 cannot display most object member values when compiled by clang 21.1.4
-
Hi,
since a few days we compile with clang 21.1.4. I still had used QtCreator 12, which now were unable to display the member values of most C++ class objects. I then downloaded and installed QtCreator 20.0.0. But it has the same issue. Then I switched from gdb to lldb. Now the member values of some objects are displayed, but some others are not. Some variables and parameters are even not listed in the variables view. Is there something known about problems with displaying variable values, when using clang 21 as compiler? Is there any solution? I have two screenshots showing the problem (still with gdb):


BR,
tkansgar -
Hi @tkansgar,
the screenshots you are showing are definitely not QtCreator 20, not even 12.
It rather looks like a version already 10 years old.
Regards
@aha_1980 said in QtCreator 20.0.0 cannot display most object member values when compiled by clang 21.1.4:
Hi @tkansgar,
the screenshots you are showing are definitely not QtCreator 20, not even 12.
It rather looks like a version already 10 years old.
Regards
Hi @aha_1980,
it was definitely QtCreator 12.0.1 based on Qt 6.6.0.
BR,
tkansgar -
@aha_1980 said in QtCreator 20.0.0 cannot display most object member values when compiled by clang 21.1.4:
Hi @tkansgar,
the screenshots you are showing are definitely not QtCreator 20, not even 12.
It rather looks like a version already 10 years old.
Regards
Hi @aha_1980,
it was definitely QtCreator 12.0.1 based on Qt 6.6.0.
BR,
tkansgar -
@tkansgar You can have a look in View > Views > Debugger Log while debugging to see if anything obvious is going on.
Regards
@aha_1980 said in QtCreator 20.0.0 cannot display most object member values when compiled by clang 21.1.4:
@tkansgar You can have a look in View > Views > Debugger Log while debugging to see if anything obvious is going on.
Regards
With lldb running I found this there:
ERROR: Lldb stderr: warning: (x86_64) /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 Unable to initialize decompressor for section '.debug_abbrev': LLVM was not built with LLVM_ENABLE_ZLIB or did not find zlib at build time warning: (x86_64) /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 Unable to initialize decompressor for section '.debug_abbrev': LLVM was not built with LLVM_ENABLE_ZLIB or did not find zlib at build time ERROR: Lldb stderr: warning: (x86_64) /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 Unable to initialize decompressor for section '.debug_info': LLVM was not built with LLVM_ENABLE_ZLIB or did not find zlib at build time warning: (x86_64) /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 Unable to initialize decompressor for section '.debug_info': LLVM was not built with LLVM_ENABLE_ZLIB or did not find zlib at build time ... ERROR: Lldb stderr: warning: (x86_64) /lib/x86_64-linux-gnu/libc.so.6 Unable to initialize decompressor for section '.debug_aranges': LLVM was not built with LLVM_ENABLE_ZLIB or did not find zlib at build time warning: (x86_64) /lib/x86_64-linux-gnu/libc.so.6 Unable to initialize decompressor for section '.debug_aranges': LLVM was not built with LLVM_ENABLE_ZLIB or did not find zlib at build timeObviously zlib was not found. What is zlib? Which file should I look for? Where should it be found?
-
@aha_1980 said in QtCreator 20.0.0 cannot display most object member values when compiled by clang 21.1.4:
@tkansgar You can have a look in View > Views > Debugger Log while debugging to see if anything obvious is going on.
Regards
With lldb running I found this there:
ERROR: Lldb stderr: warning: (x86_64) /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 Unable to initialize decompressor for section '.debug_abbrev': LLVM was not built with LLVM_ENABLE_ZLIB or did not find zlib at build time warning: (x86_64) /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 Unable to initialize decompressor for section '.debug_abbrev': LLVM was not built with LLVM_ENABLE_ZLIB or did not find zlib at build time ERROR: Lldb stderr: warning: (x86_64) /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 Unable to initialize decompressor for section '.debug_info': LLVM was not built with LLVM_ENABLE_ZLIB or did not find zlib at build time warning: (x86_64) /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 Unable to initialize decompressor for section '.debug_info': LLVM was not built with LLVM_ENABLE_ZLIB or did not find zlib at build time ... ERROR: Lldb stderr: warning: (x86_64) /lib/x86_64-linux-gnu/libc.so.6 Unable to initialize decompressor for section '.debug_aranges': LLVM was not built with LLVM_ENABLE_ZLIB or did not find zlib at build time warning: (x86_64) /lib/x86_64-linux-gnu/libc.so.6 Unable to initialize decompressor for section '.debug_aranges': LLVM was not built with LLVM_ENABLE_ZLIB or did not find zlib at build timeObviously zlib was not found. What is zlib? Which file should I look for? Where should it be found?
@tkansgar You need a
lldbthat can support reading the zlib compressed debug information present in your program.You either make sure that the program doesn't get compressed debug information or switch to a debugger that can handle that.
-
The default value of LLVM_ENABLE_ZLIB is ON according to https://llvm.org/docs/CMake.html. So zlib seems to be not found. But where should I find it?
-
The default value of LLVM_ENABLE_ZLIB is ON according to https://llvm.org/docs/CMake.html. So zlib seems to be not found. But where should I find it?
@tkansgar I recently stumbled upon this https://github.com/llvm/llvm-project/blob/main/llvm/utils/release/build_llvm_release.bat
There you can see how llvm is being built on Windows. You can have something similar for Linux.