Error when using gmic

Hi there!

I am trying to denoise photos. For that I am trying various software and among them, gmic. When using gmic, I get the following error for some of the commands:

gmic -input IMG.jpg -afre_denoise 1 -output IMG_gmic.jpg

[CImg] *** CImgDisplayException *** CImgDisplay(): No display available.
[gmic]-0./ Start G'MIC interpreter.
[gmic]-0./ Input file 'IMG.jpg' at position 0 (1 image 3840x2160x1x3).
[afre]^_^) denoise: Denoise image [0] using radius=1.
[gmic] *** Error in ./afre_denoise/*repeat/*local/*repeat/*repeat/afre_gui0_fast/*repeat/*local/ *** Unknown command or filename 'nm'; did you mean 'm'?

It seems it cannot find the command nm. I tried to install binutils in system packages, to not avail. I am not sure if this is a nix packaging issue or a gmic issue.
Any idea?
Thank you, have a great day!

I could confirm that the error does not come in another distribution, so I created an issue at gmic errors · Issue #218568 · NixOS/nixpkgs · GitHub

Hi @Zahrun

I just ran into a very similar issue in NixOS 23.11

$ gmic DSC_5360.JPG fx_simulate_film 0,5,31,2,6,1,24,3,13,12,512,100,0,0,0,0,0,0,0,50,50
[gmic]./ Start G'MIC interpreter (v.3.3.1).
[gmic]./ Input file 'DSC_5360.JPG' at position 0 (1 image 4288x2848x1x3).
[gmic]./ Input file 'p' at position 1
[gmic]./ *** Error *** Unknown command or filename 'p'; did you mean '%'?

And the issue you opened is marked as Closed (and fixed?).
Do you still have the issue in NixOS 23.11 ?

The issue I had was fixed in Feb last year.
In NixOS 23.11 stable, I don’t have the issue you mention

gmic -input Flag_of_Tibet.jpg fx_simulate_film 0,5,31,2,6,1,24,3,13,12,512,100,0,0,0,0,0,0,0,50,5
0 -output gmic.jpg
[gmic]./ Start G'MIC interpreter (v.3.3.1).
[gmic]./ Input file 'Flag_of_Tibet.jpg' at position 0 (1 image 1152x720x1x3).
[gmic]./ Output image [0] as jpg file 'gmic.jpg', with quality 100% (1 image 1152x720x1x3).
[gmic]./ End G'MIC interpreter.

Makes a grayscale version of the image