Release of G'MIC 2.5

Oh no, she is blowing up! :scream_cat:
… Okay, all is well.

Fun request. Someone make @David_Tschumperle (sp david) stick out his tongue like Einstein.

image
Source: Wikipedia.

In macos with GMIC 2.5.6 for Gimp I have an error when trying to use the Color Presets and Simulate Filter

**** Error in ./fx_color_presets/*if/clut/*local/*if/if/ *** Command ‘output’: gmic::fopen(): Failed to open file ‘/Users/my user/.cache/gmic/gmic_cluts.gmz’ with mode ‘wb’

**** Error in ./fx_simulate_film/*if/clut/*local/*if/if/ *** Command ‘output’: gmic::fopen(): Failed to open file ‘/Users/my user/.cache/gmic/gmic_cluts.gmz’ with mode ‘wb’.

The file path does indeed not exist. Note that all other programs cache is located in a slightly different address:
‘/Users/my user/Library/Caches’

In that path there was no gmic folder. I have created it and dropped the file gmic_cluts.gmz (found at https://framagit.org/dtschump/gmic/tree/master/resources). The error persist

MacOS Mojave
GIMP 2.10.8
GMIC 2.5.6 from https://github.com/aferrero2707/gimp-plugins-collection/releases/download/continuous/GMIC-Gimp-2.10-OSX.tgz

gmic_gimp_qt and the related GMIC folders installed at:
/Users/my user/Library/Application Support/GIMP/2.10/plug-ins/GMIC/

Hi, I am using a similar configuration, still seemingly not similar errors. Although I rarely use the color transformations.

My most serious concern is the name of your user account! Please try the same with an account name WITHOUT SPACE! If that is not printed for that mail.

Last idea, prove that ~/.cache/gmic is writable for the actual user! (drwxr-xr-x)

1 Like

@Carmelo_DrRaw post #83.

1 Like

Hi David,
I have tried to trace the ways clut is trying to find gmic_clut.gmz under

MacOS Mojave 10.14.4
Gimp-2-10 from gimp.org
gmic_qt_gimp from @Carmelo_DrRaw

and trying to reduce the network access to this file.

Here is an excerpt calling clut from customs call under gimp. All these pathes are only valid for the gimp I am using…

[gmic]-0./fx_custom_code_preview/*local/*if/fx_custom_code/*if/_fx_custom_code_start/clut/*local/ Set local variable 'path_clut=/Users/karo/Library/Application Support/GIMP/2.10/cache/gmic/'.

[gmic]-0./fx_custom_code_preview/*local/*if/(...)/clut/*local/*if/*if/ Set local variable 'g_path_unix=/Users/karo/.cache/gmic'.

[gmic]-0./fx_custom_code_preview/*local/*if/(...)/_fx_custom_code_start/clut/*local/*if/ Set local variable 'path_test0=/Users/karo/Library/Application Support/GIMP/2.10/cache/gmic/'.
[gmic]-0./fx_custom_code_preview/*local/*if/(...)/_fx_custom_code_start/clut/*local/*if/ Set local variable 'path_test1=/Users/karo/.config/gmic/'.
[gmic]-0./fx_custom_code_preview/*local/*if/(...)/_fx_custom_code_start/clut/*local/*if/ Set local variable 'path_test2=/var/folders/g3/ft0231pd0fggnh0czwqd7znc0000gn/T//plug-ins/'.
[gmic]-0./fx_custom_code_preview/*local/*if/(...)/_fx_custom_code_start/clut/*local/*if/ Set local variable 'path_test3=/var/folders/g3/ft0231pd0fggnh0czwqd7znc0000gn/T//plug-ins/gmic_gimp_qt/'.
[gmic]-0./fx_custom_code_preview/*local/*if/(...)/_fx_custom_code_start/clut/*local/*if/ Set local variable 'path_test4=/Users/karo/.cache/gmic'.

[gmic]-0./fx_custom_code_preview/*local/*if/(...)/clut/*local/*if/*repeat/ Set local variable 'file_clut=/Users/karo/Library/Application Support/GIMP/2.10/cache/gmic//gmic_cluts.gmz'.
[gmic]-0./fx_custom_code_preview/*local/*if/(...)/clut/*local/*if/*repeat/ Set local variable 'file_clut=/Users/karo/.config/gmic//gmic_cluts.gmz'.
[gmic]-0./fx_custom_code_preview/*local/*if/(...)/clut/*local/*if/*repeat/ Set local variable 'file_clut=/Users/karo/.config/gmic//gmic_cluts.gmz'.
[gmic]-0./fx_custom_code_preview/*local/*if/(...)/clut/*local/*if/*repeat/ Set local variable 'file_clut=/var/folders/g3/ft0231pd0fggnh0czwqd7znc0000gn/T//plug-ins//gmic_cluts.gmz'.
[gmic]-0./fx_custom_code_preview/*local/*if/(...)/clut/*local/*if/*repeat/ Set local variable 'file_clut=/var/folders/g3/ft0231pd0fggnh0czwqd7z(...)plug-ins/gmic_gimp_qt//gmic_cluts.gmz'.
[gmic]-0./fx_custom_code_preview/*local/*if/(...)/clut/*local/*if/*repeat/ Set local variable 'file_clut=/Users/karo/.cache/gmic/gmic_cluts.gmz'.

On my machine only .cache/gmic and .config/gmic exist. Under $TMPDIR there is no folder plug-ins. Nowhere is the file gmic_cluts.gmz found, hence it is tried to be written under

[gmic]-552./fx_custom_code_preview/*local/*if/(...)/clut/*local/*if/*if/ Output images [0,1,2,(...),549,550,551] as gmz file '/Users/karo/Library/Application Support/GIMP/2.10/cache/gmic/gmic_cluts.gmz', with pixel type 'auto'.

which fails since the gmic folder under cache does not exist by default.

I think one possible solution might be to test if the folder gmic exist and create it if necessary !

1 Like

That is interesting, thanks for reporting.
What I’d like to know is “What would be the best path for storing cache files, i.e. the equivalent of $HOME/.cache/ in Linux ?”
I thought it was the same, but apparently not.

1 Like

The gimp I am using stores in ~/.cache
I don,t know about other builds (Partha, MacPort, home-brew)

From my point of view ~/.cache/gmic would be good. In fact for the cli I have GMIC_SYSTEM_PATH defined (in .bashrc), however the Mac don’t honor such definitions for the desktop apps.

1 Like

So, Karsten, what

$ gmic e '${-path_cache}'

displays for you, on Mac OSX ?

from cli of course

/Users/karo/.cache/gmic/

from GIMP

/Users/karo/Library/Application Support/GIMP/2.10/cache/gmic/

Maybe interesting too: If starting gimp under Desktop, the typical way for Mac users, it finds faves. If I start it under Terminal, to catch the output, it does not find most of the routines called under faves!

So that means GIMP redefines $HOME to be /Users/karo/Library/Application Support/GIMP/2.10 ? That is insane !

Insane or not, that is the place where under plug-ins the plugin exec and library folder is located! I think it is a consequence of the packager decision how to link and combine the package. Think about all those problems with windows!

Bildschirmfoto 2019-04-16 um 11.01.11

This my way to find out about those patches under gimp

Karo, what I’m trying to say is I determine the ‘cache’ folder for G’MIC with $HOME/.cache/ on Linux and MacOSX, so if $HOME is redefined, it will point to a garbage path that does not exist, which seems to happen for you when GIMP is launched.
I don’t have many other ways to determine the correct Cache folder if $HOME is redefined.

That really looks like a bad idea to redefine $HOME when GIMP is run.

What other solution I have on my side then ?

as i said earlier use the situation as it is but test the existence of the gmic folder beforehand …

Or maybe it is $XDG_CACHE_HOME that is redefined on GIMP ?
Could you tell me what is the value of $XDG_CACHE_HOME for GIMP ?

The best solution would be to be able to use the same cache folder whenever you run the CLI tool or the plug-in for GIMP or Krita.

1 Like

/Users/karo/Library/Application Support/GIMP/2.10/cache

1 Like

Ah ok, so that’s it, it’s not $HOME which is redefined, but $XDG_CACHE_HOME , it’s a bit less serious :slight_smile:
Thanks for your investigation, now I think I have an idea on how to fix this.

Another question : on MacOSX, do you know what environment variable I could check for existence to determine I’m on MacOSX (and not on Linux) ?
Thanks !

1 Like

Yeah but cli is not using .cache by default. cli writes to .config/gmic on my machine!

But what $ gmic e '$XDG_CACHE_HOME' displays for you ? I suspect this environment variable is not defined when using the CLI tool.

no idea. I think the output of uname will be “Darwin”

gmic x uname

[gmic]-0./ Start G’MIC interpreter.

[gmic]-0./ Execute external command ‘uname’ in verbose mode.

Darwin

[gmic]-0./ End G’MIC interpreter.

1 Like