nixpkgs icon indicating copy to clipboard operation
nixpkgs copied to clipboard

Qt Creator profiling tools missing `perfparser`

Open miniBill opened this issue 5 years ago • 16 comments

Describe the bug Qt Creator profiling tools are not working because of a missing prerequisite: perfparser.

To Reproduce Steps to reproduce the behavior:

  1. Start Qt Creator with a simple C/C++ project
  2. In the Analyze menu choose the Performance Analyzer command
  3. You get the following error:
Could not start the perfparser utility program.
Make sure a working Perf parser is available at the location given
by the PERFPROFILER_PARSER_FILEPATH environment variable.

perfparser is indeed missing.

Expected behavior The program gets profiled.

Notify maintainers @deadloko @dtzWill @abbradar

Metadata Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.78, NixOS, 20.09.2344.a3a3dda3bac (Nightingale)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.9`
 - channels(minibill): `"home-manager-20.09, unstable-21.03pre259605.57a787c9fa9"`
 - channels([- omitted, also, irrelevant -]): `"home-manager-20.03, unstable-21.03pre243434.e0759a49733"`
 - channels(root): `"nixos-20.09.2344.a3a3dda3bac"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

miniBill avatar Dec 25 '20 16:12 miniBill

For what it's worth, on a different distro I had this same problem which was resolved by installing elfutils-devel and then recompiling qt-creator. The build silently skips building this tool if this dependency is absent.

loops avatar Mar 27 '21 20:03 loops

I marked this as stale due to inactivity. → More info

stale[bot] avatar Sep 26 '21 18:09 stale[bot]

still an issue

miniBill avatar Sep 26 '21 23:09 miniBill

For what it's worth, on a different distro I had this same problem which was resolved by installing elfutils-devel and then recompiling qt-creator. The build silently skips building this tool if this dependency is absent.

@loops would you be able to point me in the general direction of making this happen on NixOS?

miniBill avatar Sep 26 '21 23:09 miniBill

Test #139938

Artturin avatar Sep 29 '21 16:09 Artturin

Test #139938

@Artturin I still get "Could not start the perfparser utility program. Make sure a working Perf parser is available at the location given by the PERFPROFILER_PARSER_FILEPATH environment variable."

miniBill avatar Sep 29 '21 20:09 miniBill

try now

Artturin avatar Sep 29 '21 21:09 Artturin

updated, cancel the build and try again

Artturin avatar Sep 29 '21 21:09 Artturin

... I still get "Could not start the perfparser utility program. Make sure a working Perf parser is available at the location given by the PERFPROFILER_PARSER_FILEPATH environment variable." What am I doing wrong?

miniBill avatar Oct 05 '21 21:10 miniBill

Which channel are you following, if unstable then have you updated

Artturin avatar Oct 05 '21 22:10 Artturin

I'm using fetchTarball "https://github.com/Artturin/nixpkgs/archive/d920c1463c0c038846e49a50c2c7737413535e8b.tar.gz" from home-manager (which is the first commit that includes the patch)

miniBill avatar Oct 05 '21 22:10 miniBill

try this https://github.com/NixOS/nixpkgs/pull/140693

Artturin avatar Oct 06 '21 01:10 Artturin

It still doesn't work for me :(

miniBill avatar Oct 08 '21 21:10 miniBill

looks like perfparser is actually a program built by qtcreator

i've switched the pr to be a update pr so that we get perfparser

Artturin avatar Oct 09 '21 01:10 Artturin

On the current version from master (16.0.2), the perfparser executable gets placed into $out/libexec/qtcreator/, so it's not available in ${lib.getBin perf}/bin (and perhaps never was). The issue is still relevant. A simple fix would be to just replace the second path with the first.

Reference: https://github.com/NixOS/nixpkgs/blob/08379a7f9fbabd310d195fcb58583a8ccd4ff917/pkgs/development/tools/qtcreator/default.nix#L88

ar7eniyan avatar Jun 14 '25 21:06 ar7eniyan

Can I tag someone to reopen the issue? Maybe @SuperSandro2000...

ar7eniyan avatar Jun 14 '25 21:06 ar7eniyan