hmm. I’m building it with a locally cloned nixpkgs since I’m on a flakes setup. Perhaps there’s a mismatch with your channels and packages? I just tried this morning and it builds fine:
nix-build -I nixpkgs=/home/rjpc/git/nixpkgs blah blah
rjpc /tmp/junk/result/bin % ./digikam --help
Usage: ./digikam [options]
Professional Photo Management with the Power of Open Source - A KDE Family Project
Options:
-h, --help Displays help on commandline options.
--help-all Displays help including Qt specific options.
-v, --version Displays version information.
Might be worth showing us output of nix-shell -p nix-info --run "nix-info -m"
I’m also gonna ping @TLATER since they might be able to help?
- system: `"x86_64-linux"`
- host os: `Linux 6.1.68, NixOS, 23.11 (Tapir), 23.11.20231220.d65bcea`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.18.1`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos````
I'm also using flakes. I'm taking my system from 23.11, but using "unstable" for my user packages.
I’ve cloned the repo, but am not sure what to do next. Do I need to build everything? What directory should I be in, and what command do I run–i.e., what should I replace blah blah with in your command: nix-build -I nixpkgs=/home/rjpc/git/nixpkgs blah blah?
the above should also work along with the commands @TLATER wrote. I’m running this right now and my CPU is getting hot
edit: built successfully! I hope it works for you also.
It builds, and the executable exhibits the problem I’m trying to troubleshoot. How can I get it to build with debug symbols, so I can use gdb to figure out what’s going on?
Since you already copied the default.nix, just add separateDebugInfo = true; to the derivation.
If you didn’t, you could use overrideAttrs from the CLI, but at that point you’re so far into doing stuff from the CLI you should not I would suggest just writing the expression into a file.
Thanks. I added that to the build (after dontWrapGApps = true;). Running digikam runs a script that sets up a bunch of environment variables before calling .digikam-wrapped, which doesn’t have debugging symbols. Am I putting the directive in the wrong place?
Interestingly, if I run the commands in the digikam script, then run .digikam-wrapped directly, the program behave properly. If I run the digikam script, it does not.
Interestingly, if I run the commands in the digikam script, then run .digikam-wrapped directly, the program behave properly. If I run the digikam script, it does not.*
Scratch that–I haven’t been able to reproduce that behaviour.
I still haven’t been able to get a build with debugging symbols.
I thought I’d try building at various points in the git history to try to identify when the problem was introduced, but I’m not having any luck with that, either.
If I revert my flake.nix to take from git revision 51d906d2341c9e866e48c2efcaac0f2d70bfd43e, and do a home-manager switch --flake..., digikam works.
If I do a nix flake update, then home-manager switch..., digikam does not work, but the previous version does.
If I again revert, the new version still does not work (but the old one does).
With the reverted home manager, I can build (as described above) from source from either the original or more recent git revision, and they work.
If I again update home manager to the recent revision, digikam does not work, but the versions I build while the old home manger was in use still work.
I strongly suspect something outside the digikam package is causing this behaviour, but I don’t know how to track it down.