Psoulocybe [deleted] 4:00pm, 5 August 2010
Been running the development ppa of Gimp in Ubuntu, and it recently updated to 2.7.2.

GMIC now throws an error:

WARNING: Plug-In "gmic_gimp"
(~/.gimp-2.7/plug-ins/gmic_gimp)
called deprecated procedure 'gimp-drawable-is-valid'.
It should call 'gimp-item-is-valid' instead!

Still seems to work, but throws a window every time you select a new effect.

Not looking for a quick fix, as I know I'm running an unsupported version, but was wondering if anyone else was having this.
Psoulocybe [deleted] 7 years ago
Well, it's still working great.

To hide the error pop-up, I just created an error-console dockable.
MOD
Joz3.69 7 years ago
tnx for the tip ;), I have the same version of gimp and G'MIC
Psoulocybe [deleted] 7 years ago
Are you running 10.04 Ubuntu? 32 or 64?
You notice any other bugs?
MOD
Joz3.69 7 years ago
Hi i have ubuntu 10.04 64bits, i have many WARNING when i use all filters and plugins that i installed, like G'MIC, FX-Foundry, etc..

The windows mode not work well (every time that I open GIMP the windows mode despair).
PhotoComiX 7 years ago
96˙3zoɾ

well this is the wrong group for the question, you should ask to the gimp group

anyway i am surprised you could use third party filters and plugin with gimp 2.7 having only warning

Basically several libraries were replaced,in 2.7,but the extra plugin still look for the old ones

At least this is the situation in windows but should be identical for the other OS

And i don't think that 32 or &4 bit will make any difference in this case
noun0ion9 7 years ago
some of the old drawable/channel/layer-* functions were recently converted to a more generic 'item-*' API. The old API is deprecated -- this is nothing to worry about, yet! Just add an 'Error Console' dockable and the warnings will go in there, without popping up any windows :D
noun0ion9 7 years ago
sorry, did not read carefully enough re: error console.

Anyway, PhotoComiX' explanation is mostly incorrect. More API has been added, but IMO none has been removed or non-backwards-compatibly changed, so most (all) plugins should work just fine without any need to update them.
admin
Ronounours 7 years ago
Interesting. If someone has a suggestion to handle this case in the source code 'gmic_gimp.cpp', he's welcome :)
PhotoComiX Posted 7 years ago. Edited by PhotoComiX (member) 7 years ago
noun0ion9

I did not check in linux but i am sure for windows
And Is not a problem of API but of dll:
As example most "extra" plugin need to find"intl-8.dll" if not they abort at gimp loading time

And in gimp 2.7 "intl-8.dll" is replaced with "libintl-8.dll" , so most of third party plugin will not work (something similar for other dll, that anyway are not requested by all plugins)
MOD
François Collard Posted 7 years ago. Edited by François Collard (moderator) 7 years ago
Replace
if ((GIMP_IS_PREVIEW(gui_preview) && gimp_drawable_is_valid(drawable_preview->drawable_id)))
by
if ((GIMP_IS_PREVIEW(gui_preview) && gimp_item_is_valid(drawable_preview->drawable_id)))?
;)
admin
Ronounours 7 years ago
@François : Yes that was I did at a first glance, but of course, this does not compile for older versions of the API (function not found), so I need also to put this in a conditionnal statement #ifdef #endif to select what version of the API I have to use.
By the way, I don't know what macro can be tested to see if the new function is defined.
admin
Ronounours 7 years ago
Ok I found the macros to test to get the current GIMP version number.
I have added a conditional compilation code in the source of the plug-in. Now, I'm trying to compile GIMP 1.2.7 and see if everything is going well.
Stay tuned :)
MOD
François Collard Posted 7 years ago. Edited by François Collard (moderator) 7 years ago
Ronounours said:
By the way, I don't know what macro can be tested to see if the new function is defined.

I don't know either.
I wonder whether these changes (gimp_drawable_is_valid -> gimp_item_is_valid) are really useful. I suppose Gimp developers don't do that without very serious reasons, since it causes so many backward compatibility issues.
Lots of script-fu, for instance, are outdated because of TinyScheme and also because of functions changes (new layer without alpha, etc.)
I wanted to update the adjustment layer script-fu pack, written in 2002: the-gimp.deviantart.com/art/Adjustment-Layers-1473128
After some script-fu fixes, I got always the same error. I tried with an old script-fu.exe. Same error. With Gimp 2.2. Same error (BTW, Gimp was easier to use in its original 3-window mode). As the author seems to be serious, I think that some Gimp functions may have been deeply changed since 2002.
Maybe you can create adjustment layers with G'mic?
noun0ion9 7 years ago
"I wonder whether these changes (gimp_drawable_is_valid -> gimp_item_is_valid) are really useful. "

Definitely! They collapse multiple redundant APIs with duplicated code into a single API. That's good for plugin developers (less to remember) and good for GIMP developers (less to debug).

However, IMO plugins shouldn't update yet.. that's because more such work is likely to be done before 2.8. What I would recommend is leaving this as-is until 2.8, just noting the workaround in the README.
MOD
François Collard 7 years ago
Thank you noun0ion9. Redundant code is a good reason.
admin
Ronounours 7 years ago
Anyway, keeping functions with the old names would not be a so bad idea, one just has to call the same new 'is_valid' procedure from these two functions. There are no additional costs to do that. And, if they just added a 'deprecated' tag in the doc for the old functions, this would prevent new plug-in developers to use them, but keep the compatibility in a perfect way, without having silly warnings.
jacek.poplawski 7 years ago
Just like I wrote in different thread - you cal easily change one line in src code to fix it.
admin
Ronounours 7 years ago
Actually, that was already done in the source code of the development version of G'MIC (upcoming 1.4.0.0).
OmTeFotograferen 7 years ago
Anyone else still getting this error message?

Using Gmic 1.4.5.1 on Gimp 2.7.3 @ LinuxMint 9 (based on Ubuntu 10.4)
PhotoComiX Posted 7 years ago. Edited by PhotoComiX (member) 7 years ago
i build few time ago gimp 2.7 (from git) on ubuntu 10.04
and Gmic (as any other plugin for gimp 2.6 i tried was not working (error message " this plugin is for an older gimp version" )

even the bundled in gimp plugin were not compatible , i didn't notice any backward compatibility with 2.6, even if looking the dif (confronting same plugin in 2.6 and 2.7 ) changes seem not too big
OmTeFotograferen 7 years ago
Well, plugins work for me, as well as GMIC, just the error msg keeps coming up.
Diverted them to the error console, but still...
admin
Ronounours Posted 7 years ago. Edited by Ronounours (admin) 7 years ago
The source code of the latest G'MIC versions have been modified recently to handle this problem.
But if you want to get rid of this warning, you must compile the plug-in by yourself, which is not particularly easy if you are on Windows (on Linux, it is).

If you are interested in compiling your own version, let me know.

The problem is, I cannot provide a 'universal' binary for the plug-in which could work for the old and newest versions of GIMP, without this warning message.
OmTeFotograferen 7 years ago
I'm on Linux (Ubuntu 10.4, well actually LinuxMint 9), just started compiling some stuff myself (Wavelet decompose/denoise plugins), so if you think this solve it, I can give it a try.
admin
Ronounours 7 years ago
So, everything should be quit easy. Here are the steps :

1. You have to download the .tar.gz archive of latest G'MIC :

sourceforge.net/projects/gmic/files/gmic_1.4.5.2.tar.gz/d...

2. Uncompress it in your favorite folder, it will create a folder 'gmic-1.4.5.2/'.


tar zxvf gmic_1.4.5.2.tar.gz


3. Go to the 'src/' subfolder of this newly created directory :


cd gmic_1.4.5.2/src/


4. Install the necessary development packages :


sudo apt-get install build-essential g++ libgimp2.0-dev libfftw3-dev libpng-dev


5. Compile the plug-in only :


make gimp


(it may take a lot of time depending on your configuration, esp. if you have <= 1Gb of RAM).

6. You should now have a file 'gmic_gimp', that is 'warning-free', if your packages correspond to the new GIMP API. Copy the file in your GIMP plug-in directory.

I'm very interested by the process, so let me know if you encounter some difficulties, or if all is going smoothly.
Thanks for your help.
OmTeFotograferen Posted 7 years ago. Edited by OmTeFotograferen (member) 7 years ago
Done as you said, all well, works like a charm.
Install/compile instructions aare just fine.

Just step 5 might be confusing: "make GIMP" when one could/would expect "make GMIC".

Just wondering, what's with the gmic1.4.5.2-amd64.deb file? Shouldn't I update that as well now?

Thanks a lot.

Edit: perhaps add at the end: "make clean" and or "make distclean" to clean things up?
admin
Ronounours 7 years ago
The step 5 is 'make gimp', not 'make gmic', because basically in all cases, you will compile something related to G'MIC. G'MIC is a quite complete 'framework', which has different instances : the plug-in for GIMP (make gimp), the embeddable library (make lib) and the console-based tool (make). G'MIC is not only the plug-in.

About the .deb file : if you update, you will probably overwrite your freshly compiled plug-in, which is not what you want, since the plug-in binary in the deb package does not remove the warning (it stays compatible with previous versions of GIMP on the other hand).

Typing 'make clean' is not mandatory, but if you really want to save extra disk space, you can do it (as well as you can remove the entire gmic-1.4.5.2 directory when you're done!).
OmTeFotograferen 7 years ago
What I meant with step 5 is you're not "building Gimp, you're buidling a gmic-gimp plugin. May be it should better be named as such.

Make gimp has me thinking I might be rebuilding, well, "gimp".

Until now, I installed the .deb file, then updated gmic-gimp form the gmic-gimp-linux64.zip package.
Never bothered asking why, just did it like that and it worked.

It does put gmic-gimp in a general folder (/usr/lib/gimp/2.0/plugins) instead of the .gimp2.7 in my home directory (the latter I prefer).
admin
Ronounours 7 years ago
Oh, I see. I could have named it 'gmic_gimp', but it was too long to type for me :)
Groups Beta