Debug symbols disappear when Qt is enabled

_Geant4 Version:_11.0.4
_Operating System:_Linux (NixOS, etc.)
_Compiler/Version:_clang 11.1.0 (etc.)
_CMake Version:_3.25.3

Trying to build Geant4 with Qt and debug symbols:

  • enabling Qt: works
  • enabling debug symbols (with CMAKE_BUILD_TYPE=RelWithDebInfo): works
  • enabling Qt and debug symbols simultaneously: Qt works, but debug symbols not present in any libG4*so.

I’m letting Nix take care of the low-level details of the compilation, so I would have to dig around a bit more to discover exactly how the high-level requirements are expressed at a lower level, but the high-level observation is that each of my requirements (Qt, debug-symbols) works in isolation, but one of them fails when they are combined. So, before investing too much time on digging around in details, I’d like to ask whether there are known issues relating to the combination of Qt and debug symbols in Geant4.

I’ve not seen this issue on building on macOS with Qt, and I’m not aware of the issue on other Linux platforms. If you’re able to see the detailed compilation commands used by Nix, can you check what these are and post them here please? That should clarify if the flags are being modified in anyway by Nix and/or the use of Qt.

It appears that the Nix Qt hooks set CMAKE_BUILD_TYPE and thus override whatever build type I choose elsewhere. In short, it looks like the problem comes from outside of Geant4.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.