[Nix-dev] QT debug version

Michiel Leenaars ml.software at leenaa.rs
Sat Aug 6 14:38:24 CEST 2016


Hi all,

we're trying to get a version of Qt with debug symbols built to debug a Qt based project, but this appears non-trivial to do so.
I started with my search engine fu which led to a Stack Overflow question, which seemed easy enough:

http://stackoverflow.com/questions/36424707/how-can-i-create-a-development-shell-for-qt-5-5-with-debug-symbols-in-the-qt-lib

I tried to change the following in all-packages.nix

  qt56 =
    let imported = import ../development/libraries/qt-5/5.6 { inherit pkgs; };
    in recurseIntoAttrs (imported.override (super: qt5LibsFun));

into:

 qt56 =
   let imported = import ../development/libraries/qt-5/5.6 { inherit pkgs; developerBuild = true; };
   dontStrip = true;
   in recurseIntoAttrs (imported.override (super: qt5LibsFun));

(I added dontStrip from: https://nixos.org/nixpkgs/manual/#ssec-fixup-phase , but maybe it is not in the right place?)

Anyway, the result is negative - when I subsequently build, I get a stripped version.

We also tried to build the Qt48Full build that is already a regular derivation:

  qt48Full = appendToName "full" (qt48.override {
    docs = true;
    demos = true;
    examples = true;
    developerBuild = true;
  });

but this also results in stripped version. We check in the following way:

$ nix-shell -p file
$ find /nix -type f -name "libQt*Core.so.*" -exec file -L {} \;

/nix/store/ga4iw13f2l5c8c193f6dgs15cilf289l-qt-4.8.7/lib/libQtCore.so.4.8.7: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter *empty*, stripped
/nix/store/abr8lnrc8spsrlbmi4zym9vw8ba7ndbg-qtbase-5.6.1-1/lib/libQt5Core.so.5.6.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter *empty*, stripped
/nix/store/dgxvmgvvqmnk1cviwjfnrpd252h5im5s-qtbase-5.6.1-1/lib/libQt5Core.so.5.6.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter *empty*, stripped
/nix/store/921r84dc0r174q3kjlllykrc9npn7cpg-qtbase-5.6.1/lib/libQt5Core.so.5.6.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /nix/store/9xsjqbsldr86vvs7p5ps4qlkjv9dhc0k-glibc-2.23/lib/ld-linux-x86-64.so.2, stripped

Is there another route? Or any suggestions?

Best,
Michiel


More information about the nix-dev mailing list