Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gimp plugin fails to build with gimp 3.0.0-rc1 #213

Open
classabbyamp opened this issue Nov 7, 2024 · 12 comments
Open

gimp plugin fails to build with gimp 3.0.0-rc1 #213

classabbyamp opened this issue Nov 7, 2024 · 12 comments

Comments

@classabbyamp
Copy link

compilation log:

cd ../gmic-qt && qmake CONFIG+=release GMIC_PATH=/builddir/gmic-3.4.3/src PRERELEASE= GMIC_DYNAMIC_LINKING=off HOST=gimp3 gmic_qt.pro && make
Info: creating stash file /builddir/gmic-3.4.3/gmic-qt/.qmake.stash
Project MESSAGE: Qt version >= 6.0.0
Project MESSAGE: GMIC_PATH is set (/builddir/gmic-3.4.3/src)
Project MESSAGE: G'MIC repository was found (/builddir/gmic-3.4.3/src)
Project MESSAGE: G'MIC version is ................. 343
Project MESSAGE: CImg version is .................. 343
Project MESSAGE: gmic_stdlib_community.h version is 343
Project MESSAGE: Unix/X11 platform
Project MESSAGE: Target host software is GIMP
Project MESSAGE: OpenMP enabled, with g++
Project MESSAGE: Release build
make[2]: Entering directory '/builddir/gmic-3.4.3/gmic-qt'
/usr/lib64/qt6/libexec/uic ui/inoutpanel.ui -o .ui/ui_inoutpanel.h
/usr/lib64/qt6/libexec/uic ui/sourceswidget.ui -o .ui/ui_sourceswidget.h
/usr/lib64/qt6/libexec/uic ui/multilinetextparameterwidget.ui -o .ui/ui_multilinetextparameterwidget.h
/usr/lib64/qt6/libexec/uic ui/progressinfowindow.ui -o .ui/ui_progressinfowindow.h
/usr/lib64/qt6/libexec/uic ui/dialogsettings.ui -o .ui/ui_dialogsettings.h
/usr/lib64/qt6/libexec/uic ui/progressinfowidget.ui -o .ui/ui_progressinfowidget.h
/usr/lib64/qt6/libexec/uic ui/mainwindow.ui -o .ui/ui_mainwindow.h
/usr/lib64/qt6/libexec/uic ui/SearchFieldWidget.ui -o .ui/ui_SearchFieldWidget.h
/usr/lib64/qt6/libexec/uic ui/headlessprogressdialog.ui -o .ui/ui_headlessprogressdialog.h
/usr/lib64/qt6/libexec/uic ui/zoomlevelselector.ui -o .ui/ui_zoomlevelselector.h
/usr/lib64/qt6/libexec/uic ui/languageselectionwidget.ui -o .ui/ui_languageselectionwidget.h
/usr/lib64/qt6/libexec/uic ui/filtersview.ui -o .ui/ui_filtersview.h
g++ -c -pipe -fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -pipe -ffile-prefix-map=/builddir/gmic-3.4.3/src=. -fPIE -O2 -fopenmp -O3 -std=c++1z -pthread -Wall -Wextra -fPIC -D_REENTRANT -DQT_DEPRECATED_WARNINGS -Dcimg_use_cpp11=1 -Dcimg_use_fftw3 -Dcimg_use_zlib -Dcimg_use_abort -Dgmic_is_parallel -Dcimg_use_curl -Dcimg_use_png -Dcimg_use_jpeg -Dcimg_appname=\"gmic\" -D_IS_UNIX_ -Dcimg_display=1 -DGMIC_HOST=gimp -DGIMP_DISABLE_DEPRECATED -Dcimg_use_openmp -Dgmic_gui -Dgmic_core -Dgmic_is_parallel -Dgmic_community -Dcimg_use_abort -Dcimg_use_vt100 -DQT_NO_DEBUG_OUTPUT -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I. -Isrc -I../src -I/usr/include/libpng16 -I/usr/include/gimp-3.0 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/gegl-0.4 -I/usr/include/gio-unix-2.0 -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/babl-0.1 -I/usr/include/qt6 -I/usr/include/qt6/QtWidgets -I/usr/include/qt6/QtGui -I/usr/include/qt6/QtNetwork -I/usr/include/qt6/QtCore -I.moc -I.ui -I/usr/lib64/qt6/mkspecs/linux-g++ -o .obj/host_gimp.o src/Host/Gimp/host_gimp.cpp
src/Host/Gimp/host_gimp.cpp: In function 'void gmic_qt_init(GmicQtPlugin*)':
src/Host/Gimp/host_gimp.cpp:139:41: warning: unused parameter 'gmic_qt' [-Wunused-parameter]
  139 | static void gmic_qt_init(GmicQtPlugin * gmic_qt) {}
      |                          ~~~~~~~~~~~~~~~^~~~~~~
src/Host/Gimp/host_gimp.cpp: In function 'GimpLayer** {anonymous}::get_gimp_layers_flat_list(GimpImage*, int*)':
src/Host/Gimp/host_gimp.cpp:353:49: error: too many arguments to function 'GimpLayer** gimp_image_get_layers(GimpImage*)'
  353 |   _GimpLayerPtr * layers = gimp_image_get_layers(imageId, &layersCount);
      |                            ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/gimp-3.0/libgimp/gimp_pdb_headers.h:56,
                 from /usr/include/gimp-3.0/libgimp/gimp.h:74,
                 from src/Host/Gimp/host_gimp.cpp:25:
/usr/include/gimp-3.0/libgimp/gimpimage_pdb.h:51:26: note: declared here
   51 | GimpLayer**              gimp_image_get_layers                 (GimpImage            *image);
      |                          ^~~~~~~~~~~~~~~~~~~~~
src/Host/Gimp/host_gimp.cpp:362:55: error: too many arguments to function 'GimpItem** gimp_item_get_children(GimpItem*)'
  362 |       _GimpItemPtr * children = gimp_item_get_children(_GIMP_ITEM(idStack.top()), &childCount);
      |                                 ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/gimp-3.0/libgimp/gimp_pdb_headers.h:65:
/usr/include/gimp-3.0/libgimp/gimpitem_pdb.h:48:15: note: declared here
   48 | GimpItem**    gimp_item_get_children        (GimpItem           *item);
      |               ^~~~~~~~~~~~~~~~~~~~~~
src/Host/Gimp/host_gimp.cpp: In function 'void GmicQtHost::outputImages(gmic_library::gmic_list<float>&, const gmic_library::gmic_list<char>&, GmicQt::OutputMode)':
src/Host/Gimp/host_gimp.cpp:977:63: error: invalid conversion from 'int' to 'const GimpLayer**' {aka 'const _GimpLayer**'} [-fpermissive]
  977 |         gimp_image_set_selected_layers(gmic_qt_gimp_image_id, 1, (const GimpLayer **)&selected_layer);
      |                                                               ^
      |                                                               |
      |                                                               int
src/Host/Gimp/host_gimp.cpp:977:39: error: too many arguments to function 'gboolean gimp_image_set_selected_layers(GimpImage*, const GimpLayer**)'
  977 |         gimp_image_set_selected_layers(gmic_qt_gimp_image_id, 1, (const GimpLayer **)&selected_layer);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gimp-3.0/libgimp/gimpimage_pdb.h:144:26: note: declared here
  144 | gboolean                 gimp_image_set_selected_layers        (GimpImage            *image,
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/Host/Gimp/host_gimp.cpp: In function 'GList* gmic_qt_query(GimpPlugIn*)':
src/Host/Gimp/host_gimp.cpp:1155:43: warning: unused parameter 'plug_in' [-Wunused-parameter]
 1155 | static GList * gmic_qt_query(GimpPlugIn * plug_in)
      |                              ~~~~~~~~~~~~~^~~~~~~
src/Host/Gimp/host_gimp.cpp: In function 'GimpValueArray* gmic_qt_run(GimpProcedure*, GimpRunMode, GimpImage*, gint, GimpDrawable**, GimpProcedureConfig*, gpointer)':
src/Host/Gimp/host_gimp.cpp:1169:110: warning: unused parameter 'n_drawables' [-Wunused-parameter]
 1169 | static GimpValueArray * gmic_qt_run(GimpProcedure * procedure, GimpRunMode run_mode, GimpImage * image, gint n_drawables, GimpDrawable ** drawables, GimpProcedureConfig *config, gpointer run_data)
      |                                                                                                         ~~~~~^~~~~~~~~~~
src/Host/Gimp/host_gimp.cpp:1169:139: warning: unused parameter 'drawables' [-Wunused-parameter]
 1169 | static GimpValueArray * gmic_qt_run(GimpProcedure * procedure, GimpRunMode run_mode, GimpImage * image, gint n_drawables, GimpDrawable ** drawables, GimpProcedureConfig *config, gpointer run_data)
      |                                                                                                                           ~~~~~~~~~~~~~~~~^~~~~~~~~
src/Host/Gimp/host_gimp.cpp:1169:188: warning: unused parameter 'run_data' [-Wunused-parameter]
 1169 | static GimpValueArray * gmic_qt_run(GimpProcedure * procedure, GimpRunMode run_mode, GimpImage * image, gint n_drawables, GimpDrawable ** drawables, GimpProcedureConfig *config, gpointer run_data)
      |                                                                                                                                                                                   ~~~~~~~~~^~~~~~~~
src/Host/Gimp/host_gimp.cpp: In function 'GimpProcedure* gmic_qt_create_procedure(GimpPlugIn*, const gchar*)':
src/Host/Gimp/host_gimp.cpp:1229:84: error: invalid conversion from 'GimpValueArray* (*)(GimpProcedure*, GimpRunMode, GimpImage*, gint, GimpDrawable**, GimpProcedureConfig*, gpointer)' {aka '_GimpValueArray* (*)(_GimpProcedure*, GimpRunMode, _GimpImage*, int, _GimpDrawable**, _GimpProcedureConfig*, void*)'} to 'GimpRunImageFunc' {aka '_GimpValueArray* (*)(_GimpProcedure*, GimpRunMode, _GimpImage*, _GimpDrawable**, _GimpProcedureConfig*, void*)'} [-fpermissive]
 1229 |     procedure = gimp_image_procedure_new(plug_in, name, GIMP_PDB_PROC_TYPE_PLUGIN, gmic_qt_run, NULL, NULL);
      |                                                                                    ^~~~~~~~~~~
      |                                                                                    |
      |                                                                                    GimpValueArray* (*)(GimpProcedure*, GimpRunMode, GimpImage*, gint, GimpDrawable**, GimpProcedureConfig*, gpointer) {aka _GimpValueArray* (*)(_GimpProcedure*, GimpRunMode, _GimpImage*, int, _GimpDrawable**, _GimpProcedureConfig*, void*)}
In file included from /usr/include/gimp-3.0/libgimp/gimp.h:54:
/usr/include/gimp-3.0/libgimp/gimpimageprocedure.h:63:66: note:   initializing argument 4 of 'GimpProcedure* gimp_image_procedure_new(GimpPlugIn*, const gchar*, GimpPDBProcType, GimpRunImageFunc, gpointer, GDestroyNotify)'
   63 |                                                GimpRunImageFunc  run_func,
      |                                                ~~~~~~~~~~~~~~~~~~^~~~~~~~
make[2]: *** [Makefile:1211: .obj/host_gimp.o] Error 1
make[2]: Leaving directory '/builddir/gmic-3.4.3/gmic-qt'
make[1]: *** [Makefile:580: gimp] Error 2
make[1]: Leaving directory '/builddir/gmic-3.4.3/src'
make: *** [Makefile:380: all] Error 2
@jfebrer
Copy link

jfebrer commented Dec 8, 2024

I also can confirm this error on building gimp plugin with gimp 3.0.0-rc1.

@LinuxBeaver
Copy link

LinuxBeaver commented Dec 31, 2024

Same error fellas and I'm running

qmake-qt5 HOST=gimp3

@jfebrer
Copy link

jfebrer commented Dec 31, 2024

As you can see in this bug report:

#214

This repository is inactive and the new one is:

https://github.com/GreycLab/gmic-qt

With that, I can build successfully the gmic gmic plugin for Gmic 3.0RC1.

@LinuxBeaver
Copy link

I know I already did. I ran

git clone https://github.com/GreycLab/gmic.git
git clone https://github.com/c-koi/gmic-qt.git
make -C gmic/src CImg.h gmic_stdlib_community.h
cd gmic-qt
qmake-qt5 HOST=gimp3
make

and it doesn't compile

I get #213 just like these people.

@LinuxBeaver
Copy link

LinuxBeaver commented Dec 31, 2024

wait, I was running the old repo lol. This works (so far) THANKS

git clone https://github.com/GreycLab/gmic.git
git clone https://github.com/GreycLab/gmic-qt.git
make -C gmic/src CImg.h gmic_stdlib_community.h
cd gmic-qt
qmake-qt5 HOST=gimp3
make

@LinuxBeaver
Copy link

LinuxBeaver commented Dec 31, 2024

Doesn't work it ended with

/usr/bin/ld: Utils.cpp:(.text+0x668): undefined reference to `GmicQtHost::ApplicationShortname'
/usr/bin/ld: .obj/PreviewWidget.o: in function `GmicQt::PreviewWidget::updateErrorImage()':
PreviewWidget.cpp:(.text+0xef2e): undefined reference to `GmicQtHost::ApplicationShortname'
/usr/bin/ld: .obj/LayersExtentProxy.o: in function `GmicQt::LayersExtentProxy::getExtent(GmicQt::InputMode, int&, int&)':
LayersExtentProxy.cpp:(.text+0x60): undefined reference to `GmicQtHost::getLayersExtent(int*, int*, GmicQt::InputMode)'
collect2: error: ld returned 1 exit status
make: *** [Makefile:572: gmic_qt] Error 1
rm translations/filters/fr.ts translations/filters/zh.ts

@dtschump
Copy link
Collaborator

HOST=gimp3 is incorrect, it should be removed, or replaced by HOST=gimp.

@LinuxBeaver
Copy link

I just did that and still get no error but at the end it stops at

rm translations/filters/fr.ts translations/filters/zh.ts and GMICqt is not compiled

@LinuxBeaver
Copy link

nm I got it now, thanks. Let's see if GIMP 3 can read it.

image

@LinuxBeaver
Copy link

LinuxBeaver commented Jan 1, 2025

GIMP 3 can't find it in the menu anywhere. I / searched GMIC and found nothing

image

@LinuxBeaver
Copy link

ok I put it in a subfolder and it now works. Thanks

image

@LinuxBeaver
Copy link

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants