code refreshed and editing line 407 as previous post, gmic_gimp_gtk now compiles.
That works fine in the VM I used for the purpose.
However, my regular Kubuntu 16.04 does not normally have the opencv and GraphickMagick libraries installed. Not there and gmic-gimp does not load.
Question are these essential and should be considered dependencies or can I compile gmic_gimp_gtk without them?
Edit: some time later: 27th.
Seems to compile ok without the opencv / graphicsmagick++ lib’s.
Thanks for the feedback.
To compile the plug-in, OpenCV and ImageMagick libraries should not be used actually, so maybe there is an error in the CMakefile.txt ?
I’m definitely not an expert in the use of CMake, so if someone can help, he is more than welcome !
@Carmelo_DrRaw maybe ?
It seems the plug-in compiled with the CMake links with a lot of ‘useless’ libraries, like TIFF/JPEG/GRAPHICSMAGICK/OPENEXR and OPENCV.
Any idea how to remove these dependencies for the plug-in (but let them for the CLI interface of course) ?
Thanks
sorry for answering late… I didn’t know that those libraries were not needed for the plug-in.
The easiest way to fix this is to remove the corresponding lines in the target_link_libraries cmake command for the plug-in. Those are the lines starting from 309 in CMakeLists.txt:
Can you do this directly in the official G’MIC github repository?
Hi Andrea, I think this is the thing I’ve tried at first, but I got link errors anyway.
I think this is because the macros enabling the use of these libs are still enabled when compiling the plug-in (things like -Dcimg_use_jpeg or -Dcimg_use_tiff), but they shouldn’t be defined in this case.
@rich2005@David_Tschumperle I have modified the CMakeLists.txt file such that TIFF/JPEG/GRAPHICSMAGICK/OPENEXR and OPENCV do not get linked to the plug-in.
However, at the moment I have no way to do extensive tests to make sure my modifications are correct.
Could one of you possibly get my G’MIC fork from here and check if everything compiles & links as expected?
If yes, David can go ahead an incorporate the full request in the official repository…
Works fine here in Kubuntu 16.04, information while compiling is not much different from before, still checking for opencv and GraphicsMagick++ which I removed earlier as a fix. Removing openEXR also removes Gimp so that is not a good idea. A bit of the output
[quote]X11_LIBRARY_DIRS:
– Checking for module ‘fftw3>=3.0’
– Found fftw3, version 3.3.4
– Checking for module ‘opencv’
– No package ‘opencv’ found
– Checking for module ‘GraphicsMagick++’
– No package ‘GraphicsMagick++’ found
– Found TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (found version “4.0.6”)
– Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version “1.2.57”)
– Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so
– Checking for module ‘OpenEXR’
– Found OpenEXR, version 2.2.0
– Checking for module ‘gimp-2.0’
– Found gimp-2.0, version 2.9.5
– Checking for module ‘gimpui-2.0’
– Found gimpui-2.0, version 2.9.5
– Configuring done[/quote]
The compiled plugin gmic_gimp_gtk is a bit smaller (6.5M) that the update from yesterday from the regular git (6.7M).