how to enable gmic support in digikam?
Thomas Klausner
wiz at gatalith.at
Wed Apr 19 21:04:34 BST 2023
On Wed, Apr 19, 2023 at 03:00:41PM +0200, Gilles Caulier wrote:
> This one has all in place : https://github.com/cgilles/gmic-qt
>
> Look this folder : https://github.com/cgilles/gmic-qt/tree/master/gmic
Thanks. I tried this on NetBSD with the attached two patches (the
first of which has already been merged upstream) and
# /usr/pkg/qt5/bin/qmake HOST=digikam GMIC_PATH=gmic/src
# PATH=/usr/pkg/qt5/bin:$PATH gmake
but it fails to link because of missing symbols (see attached
log). I'm not sure where those symbols are supposed to come from, do
you know?
Thanks,
Thomas
-------------- next part --------------
diff --git a/gmic/src/gmic.cpp b/gmic/src/gmic.cpp
index 0625fd2..8f386aa 100644
--- a/gmic/src/gmic.cpp
+++ b/gmic/src/gmic.cpp
@@ -2204,7 +2204,11 @@ inline void* get_tid() {
#if defined(__MACOSX__) || defined(__APPLE__)
void* tid = (void*)(cimg_ulong)getpid();
#elif cimg_OS==1
+#if defined(__NetBSD__)
+ void* tid = (void*)(cimg_ulong)pthread_self();
+#else
void* tid = (void*)(cimg_ulong)syscall(SYS_gettid);
+#endif
#elif cimg_OS==2
void* tid = (void*)(cimg_ulong)GetCurrentThreadId();
#else
diff --git a/gmic_qt.pro b/gmic_qt.pro
index c842ac5..2697360 100644
--- a/gmic_qt.pro
+++ b/gmic_qt.pro
@@ -179,7 +179,7 @@ win32 {
DEFINES += cimg_display=2
}
-linux {
+!macx {
DEFINES += _IS_LINUX_
PKGCONFIG += x11
message( Linux platform )
-------------- next part --------------
wiz at yt:/archive/foreign/gmic-qt> PATH=/usr/pkg/qt5/bin:$PATH gmake
g++ -Wl,-zrelro -Wl,-znow -lexecinfo -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -Wl,-O1 -fopenmp -s -pthread -Wl,-rpath,/usr/pkg/qt5/lib -o gmic_qt .obj/ClickableLabel.o .obj/Common.o .obj/CustomSpinBox.o .obj/GmicQt.o .obj/OverrideCursor.o .obj/DialogSettings.o .obj/AbstractParameter.o .obj/BoolParameter.o .obj/ButtonParameter.o .obj/ChoiceParameter.o .obj/ColorParameter.o .obj/ConstParameter.o .obj/CustomDoubleSpinBox.o .obj/FileParameter.o .obj/FilterParametersWidget.o .obj/FloatParameter.o .obj/FolderParameter.o .obj/IntParameter.o .obj/LinkParameter.o .obj/MultilineTextParameterWidget.o .obj/NoteParameter.o .obj/PointParameter.o .obj/SeparatorParameter.o .obj/TextParameter.o .obj/FiltersModel.o .obj/FiltersModelReader.o .obj/FiltersModelBinaryReader.o .obj/FiltersModelBinaryWriter.o .obj/FiltersPresenter.o .obj/FiltersView.o .obj/TreeView.o .obj/FiltersVisibilityMap.o .obj/FilterTagMap.o .obj/CroppedImageListProxy.o .obj/CroppedActiveLayerProxy.o .obj/FilterSyncRunner.o .obj/FilterThread.o .obj/FilterTextTranslator.o .obj/Globals.o .obj/GmicStdlib.o .obj/GmicProcessor.o .obj/HeadlessProcessor.o .obj/HtmlTranslator.o .obj/IconLoader.o .obj/ImageTools.o .obj/InputOutputState.o .obj/KeypointList.o .obj/LayersExtentProxy.o .obj/LanguageSettings.o .obj/Logger.o .obj/MainWindow.o .obj/ParametersCache.o .obj/PersistentMemory.o .obj/Settings.o .obj/SourcesWidget.o .obj/Tags.o .obj/TimeLogger.o .obj/Updater.o .obj/Utils.o .obj/Misc.o .obj/FilterTreeItem.o .obj/FilterTreeFolder.o .obj/FavesModel.o .obj/FavesModelReader.o .obj/FilterTreeAbstractItem.o .obj/FilterTreeItemDelegate.o .obj/FavesModelWriter.o .obj/PreviewWidget.o .obj/ProgressInfoWidget.o .obj/InOutPanel.o .obj/VisibleTagSelector.o .obj/ZoomLevelSelector.o .obj/SearchFieldWidget.o .obj/LanguageSelectionWidget.o .obj/ProgressInfoWindow.o .obj/gmic.o .obj/qrc_gmic_qt.o .obj/qrc_translations.o .obj/qrc_wip_translations.o .obj/moc_ClickableLabel.o .obj/moc_CustomSpinBox.o .obj/moc_DialogSettings.o .obj/moc_AbstractParameter.o .obj/moc_BoolParameter.o .obj/moc_ButtonParameter.o .obj/moc_ChoiceParameter.o .obj/moc_ColorParameter.o .obj/moc_ConstParameter.o .obj/moc_CustomDoubleSpinBox.o .obj/moc_FileParameter.o .obj/moc_FilterParametersWidget.o .obj/moc_FloatParameter.o .obj/moc_FolderParameter.o .obj/moc_IntParameter.o .obj/moc_LinkParameter.o .obj/moc_MultilineTextParameterWidget.o .obj/moc_NoteParameter.o .obj/moc_PointParameter.o .obj/moc_SeparatorParameter.o .obj/moc_TextParameter.o .obj/moc_FiltersPresenter.o .obj/moc_FiltersView.o .obj/moc_TreeView.o .obj/moc_FilterSyncRunner.o .obj/moc_FilterThread.o .obj/moc_FilterTextTranslator.o .obj/moc_GmicProcessor.o .obj/moc_HeadlessProcessor.o .obj/moc_MainWindow.o .obj/moc_SourcesWidget.o .obj/moc_Updater.o .obj/moc_VisibleTagSelector.o .obj/moc_PreviewWidget.o .obj/moc_ProgressInfoWidget.o .obj/moc_InOutPanel.o .obj/moc_ZoomLevelSelector.o .obj/moc_SearchFieldWidget.o .obj/moc_LanguageSelectionWidget.o .obj/moc_ProgressInfoWindow.o -L/usr/pkg/lib -lfftw3_threads -Wl,-R/usr/pkg/lib -lfftw3 -lz -Wl,-R/usr/pkg/lib -lpng16 -Wl,-R/usr/pkg/lib -ljpeg -Wl,-R/usr/pkg/lib -lcurl -Wl,-R/usr/pkg/lib -lX11 /usr/pkg/qt5/lib/libQt5Widgets.so /usr/pkg/qt5/lib/libQt5Gui.so /usr/pkg/qt5/lib/libQt5Network.so /usr/pkg/qt5/lib/libQt5Core.so -lGL
ld: /usr/lib/crt0.o: in function `___start':
(.text+0x2d9): undefined reference to `main'
ld: .obj/GmicQt.o: in function `GmicQt::lastAppliedFilterRunParameters(GmicQt::ReturnedRunParametersFlag)':
/archive/foreign/gmic-qt/src/GmicQt.cpp:91: undefined reference to `GmicQtHost::ApplicationShortname'
ld: .obj/DialogSettings.o: in function `GmicQt::DialogSettings::DialogSettings(QWidget*)':
/archive/foreign/gmic-qt/src/DialogSettings.cpp:84: undefined reference to `GmicQtHost::DarkThemeIsDefault'
ld: .obj/CroppedImageListProxy.o: in function `GmicQt::CroppedImageListProxy::update(double, double, double, double, GmicQt::InputMode, double)':
/archive/foreign/gmic-qt/src/CroppedImageListProxy.cpp:63: undefined reference to `GmicQtHost::getCroppedImages(gmic_library::gmic_list<float>&, gmic_library::gmic_list<char>&, double, double, double, double, GmicQt::InputMode)'
ld: .obj/CroppedActiveLayerProxy.o: in function `GmicQt::CroppedActiveLayerProxy::update(double, double, double, double)':
/archive/foreign/gmic-qt/src/CroppedActiveLayerProxy.cpp:72: undefined reference to `GmicQtHost::getCroppedImages(gmic_library::gmic_list<float>&, gmic_library::gmic_list<char>&, double, double, double, double, GmicQt::InputMode)'
ld: /archive/foreign/gmic-qt/src/CroppedActiveLayerProxy.cpp:74: undefined reference to `GmicQtHost::applyColorProfile(gmic_library::gmic_image<float>&)'
ld: .obj/FilterSyncRunner.o: in function `GmicQt::FilterSyncRunner::run()':
/archive/foreign/gmic-qt/src/FilterSyncRunner.cpp:161: undefined reference to `GmicQtHost::ApplicationShortname'
ld: .obj/FilterThread.o: in function `GmicQt::FilterThread::run()':
/archive/foreign/gmic-qt/src/FilterThread.cpp:222: undefined reference to `GmicQtHost::ApplicationShortname'
ld: .obj/GmicProcessor.o: in function `GmicQt::GmicProcessor::saveSettings(QSettings&)':
/archive/foreign/gmic-qt/src/GmicProcessor.cpp:278: undefined reference to `GmicQtHost::ApplicationShortname'
ld: /archive/foreign/gmic-qt/src/GmicProcessor.cpp:286: undefined reference to `GmicQtHost::ApplicationShortname'
ld: .obj/GmicProcessor.o: in function `QString::isEmpty() const':
/usr/pkg/qt5/include/QtCore/qstring.h:1078: undefined reference to `GmicQtHost::ApplicationName'
ld: .obj/GmicProcessor.o: in function `GmicQt::GmicProcessor::onApplyThreadFinished()':
/archive/foreign/gmic-qt/src/GmicProcessor.cpp:391: undefined reference to `GmicQtHost::outputImages(gmic_library::gmic_list<float>&, gmic_library::gmic_list<char> const&, GmicQt::OutputMode)'
ld: .obj/GmicProcessor.o: in function `GmicQt::GmicProcessor::manageSynchonousRunner(GmicQt::FilterSyncRunner&)':
/archive/foreign/gmic-qt/src/GmicProcessor.cpp:484: undefined reference to `GmicQtHost::applyColorProfile(gmic_library::gmic_image<float>&)'
ld: .obj/GmicProcessor.o: in function `GmicQt::GmicProcessor::onPreviewThreadFinished()':
/archive/foreign/gmic-qt/src/GmicProcessor.cpp:338: undefined reference to `GmicQtHost::applyColorProfile(gmic_library::gmic_image<float>&)'
ld: .obj/HeadlessProcessor.o: in function `GmicQt::HeadlessProcessor::startProcessing()':
/archive/foreign/gmic-qt/src/HeadlessProcessor.cpp:154: undefined reference to `GmicQtHost::getCroppedImages(gmic_library::gmic_list<float>&, gmic_library::gmic_list<char>&, double, double, double, double, GmicQt::InputMode)'
ld: /archive/foreign/gmic-qt/src/HeadlessProcessor.cpp:156: undefined reference to `GmicQtHost::showMessage(char const*)'
ld: .obj/HeadlessProcessor.o: in function `GmicQt::HeadlessProcessor::onProcessingFinished()':
/archive/foreign/gmic-qt/src/HeadlessProcessor.cpp:234: undefined reference to `GmicQtHost::outputImages(gmic_library::gmic_list<float>&, gmic_library::gmic_list<char> const&, GmicQt::OutputMode)'
ld: /archive/foreign/gmic-qt/src/HeadlessProcessor.cpp:244: undefined reference to `GmicQtHost::ApplicationShortname'
ld: /archive/foreign/gmic-qt/src/HeadlessProcessor.cpp:242: undefined reference to `GmicQtHost::ApplicationShortname'
ld: .obj/LayersExtentProxy.o: in function `GmicQt::LayersExtentProxy::getExtent(GmicQt::InputMode, int&, int&)':
/archive/foreign/gmic-qt/src/LayersExtentProxy.cpp:47: undefined reference to `GmicQtHost::getLayersExtent(int*, int*, GmicQt::InputMode)'
ld: .obj/MainWindow.o: in function `QString::isEmpty() const':
/usr/pkg/qt5/include/QtCore/qstring.h:1078: undefined reference to `GmicQtHost::ApplicationName'
ld: .obj/Settings.o: in function `GmicQt::Settings::removeObsoleteKeys(QSettings&)':
/archive/foreign/gmic-qt/src/Settings.cpp:320: undefined reference to `GmicQtHost::ApplicationShortname'
ld: .obj/Settings.o: in function `GmicQt::Settings::load(GmicQt::UserInterfaceMode)':
/archive/foreign/gmic-qt/src/Settings.cpp:80: undefined reference to `GmicQtHost::DarkThemeIsDefault'
ld: .obj/Utils.o: in function `QString::isEmpty() const':
/usr/pkg/qt5/include/QtCore/qstring.h:1078: undefined reference to `GmicQtHost::ApplicationName'
ld: /usr/pkg/qt5/include/QtCore/qstring.h:1078: undefined reference to `GmicQtHost::ApplicationName'
ld: .obj/Utils.o: in function `GmicQt::pluginCodeName()':
/archive/foreign/gmic-qt/src/Utils.cpp:118: undefined reference to `GmicQtHost::ApplicationShortname'
ld: .obj/PreviewWidget.o: in function `GmicQt::PreviewWidget::updateErrorImage()':
/archive/foreign/gmic-qt/src/Widgets/PreviewWidget.cpp:220: undefined reference to `GmicQtHost::ApplicationShortname'
More information about the Digikam-users
mailing list