View Issue Details

IDProjectCategoryView StatusLast Update
0017259ScribusBuild Systempublic2024-09-16 20:54
Reporterplacroix Assigned Tonitramr  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
PlatformlinuxOSLinux MintOS Version22
Product Version1.7.0.svn 
Fixed in Version1.7.0.svn 
Summary0017259: Linking CXX executable scribus failed
DescriptionLinking CXX executable scribus failed, error is :

[ 64%] Linking CXX executable scribus
/bin/ld : CMakeFiles/scribus.dir/scribuscore.cpp.o : dans la fonction « ScribusCore::startGUI(bool, bool, bool, QString const&) » :
scribuscore.cpp:(.text+0x4e0a) : référence indéfinie vers « ScribusIndigoMainWindow::ScribusIndigoMainWindow(QWidget*) »
/bin/ld : scribuscore.cpp:(.text+0x4e12) : référence indéfinie vers « ScribusIndigoMainWindow::initScIMW() »
collect2: error: ld returned 1 exit status
make[2]: *** [scribus/CMakeFiles/scribus.dir/build.make:9290 : scribus/scribus] Erreur 1
make[1]: *** [CMakeFiles/Makefile2:2189 : scribus/CMakeFiles/scribus.dir/all] Erreur 2
make: *** [Makefile:156 : all] Erreur 2
Additional InformationDownoaded witn snv checkout

When downloaded from git : no build error
TagsNo tags attached.
PatchNo

Activities

jghali

2024-08-17 19:58

administrator   ~0051268

Unable to reproduce with today checkout from trunk. You likely have leftover from old builds in your build directory. Delete your build directory completely and run cmake again.

nitramr

2024-08-17 20:11

developer   ~0051269

I was able to reproduce it with r26254

Looks like the scribusindigomainwindow is comment out from CMakeLists_Sources.txt

#if(WANT_QTADS)
# set(SCRIBUS_SOURCES
# ${SCRIBUS_SOURCES}
# scribusindigomainwindow.cpp
# )
#endif()

Anyway, with current svn version we don't need that window anymore. The attached patch removes this window.
cleanup_indigo_mainwindow.patch (11,034 bytes)   
Index: scribus/CMakeLists_Sources.txt
===================================================================
--- scribus/CMakeLists_Sources.txt	(Revision 26254)
+++ scribus/CMakeLists_Sources.txt	(Arbeitskopie)
@@ -569,13 +569,6 @@
 	${SCRIBUS_JPEGXL_SRC}
 )
 
-#if(WANT_QTADS)
-#	set(SCRIBUS_SOURCES
-#	${SCRIBUS_SOURCES}
-#	scribusindigomainwindow.cpp
-#	)
-#endif()
-
 if(NOT HAVE_HYPHEN)
 	include_directories(third_party/hyphen)
 	set(SCRIBUS_SOURCES
Index: scribus/scribusapp.cpp
===================================================================
--- scribus/scribusapp.cpp	(Revision 26254)
+++ scribus/scribusapp.cpp	(Arbeitskopie)
@@ -238,10 +238,6 @@
 		{
 			useGUI = false;
 		}
-		else if (arg == ARG_INDIGO_UI || arg == ARG_INDIGO_UI_SHORT)
-		{
-			m_use_indigo_ui = true;
-		}
 		else if (arg == ARG_FONTINFO || arg == ARG_FONTINFO_SHORT)
 		{
 			m_showFontInfo = true;
@@ -357,7 +353,7 @@
 		return EXIT_FAILURE;
 	ScCore = m_ScCore;
 	processEvents(QEventLoop::ExcludeUserInputEvents|QEventLoop::ExcludeSocketNotifiers, 1000);
-	ScCore->init(useGUI, m_use_indigo_ui, m_filesToLoad);
+	ScCore->init(useGUI, m_filesToLoad);
 	processEvents();
 	/* TODO:
 	 * When Scribus is truly able to run without GUI
Index: scribus/scribusapp.h
===================================================================
--- scribus/scribusapp.h	(Revision 26254)
+++ scribus/scribusapp.h	(Arbeitskopie)
@@ -106,7 +106,6 @@
 		bool m_showSplash {true};
 		bool m_showFontInfo {false};
 		bool m_showProfileInfo {false};
-		bool m_use_indigo_ui {false};
 		//! \brief If is there user given prefs file...
 		QString m_prefsUserDir;
 		QList<QString> m_filesToLoad;
Index: scribus/scribuscore.cpp
===================================================================
--- scribus/scribuscore.cpp	(Revision 26254)
+++ scribus/scribuscore.cpp	(Arbeitskopie)
@@ -47,11 +47,6 @@
 #include "util_debug.h"
 #include "util_ghostscript.h"
 
-#ifdef HAVE_QTADS
-#include "scribusindigomainwindow.h"
-#endif
-
-
 //extern ScribusQApp* ScQApp;
 
 ScribusCore::ScribusCore() : defaultEngine(colorMgmtEngineFactory.createDefaultEngine()),
@@ -66,14 +61,13 @@
 
 ScribusCore::~ScribusCore()
 {
-	if(!m_use_indigo_ui)
+
+	while (m_ScMWList.count() > 0)
 	{
-		while (m_ScMWList.count() > 0)
-		{
-			ScribusMainWindow *mainWindow = m_ScMWList.takeAt(0);
-			delete mainWindow;
-		}
+		ScribusMainWindow *mainWindow = m_ScMWList.takeAt(0);
+		delete mainWindow;
 	}
+
 	delete pluginManager;
 }
 
@@ -86,10 +80,9 @@
 }
 #endif
 
-int ScribusCore::init(bool useGUI, bool use_indigo_ui, const QList<QString>& filesToUse)
+int ScribusCore::init(bool useGUI, const QList<QString>& filesToUse)
 {
 	m_useGUI = useGUI;
-	m_use_indigo_ui = use_indigo_ui;
 	m_Files = filesToUse;
 #if !defined(NDEBUG) && !defined(_WIN32)
 	qInstallMessageHandler( & abort_on_error );
@@ -99,77 +92,56 @@
 
 int ScribusCore::startGUI(bool showSplash, bool showFontInfo, bool showProfileInfo, const QString& newGuiLanguage)
 {
-	if (!m_use_indigo_ui)
-	{
-		auto* scribus = new ScribusMainWindow();
-		Q_CHECK_PTR(scribus);
-		if (!scribus)
-			return EXIT_FAILURE;
-		m_ScMWList.append(scribus);
-		int retVal = initScribusCore(showSplash, showFontInfo, showProfileInfo, newGuiLanguage);
-		if (retVal == EXIT_FAILURE)
-			return EXIT_FAILURE;
+	auto* scribus = new ScribusMainWindow();
+	Q_CHECK_PTR(scribus);
+	if (!scribus)
+		return EXIT_FAILURE;
+	m_ScMWList.append(scribus);
+	int retVal = initScribusCore(showSplash, showFontInfo, showProfileInfo, newGuiLanguage);
+	if (retVal == EXIT_FAILURE)
+		return EXIT_FAILURE;
 
-		retVal = scribus->initScMW(true);
-		if (retVal == EXIT_FAILURE)
-			return EXIT_FAILURE;
+	retVal = scribus->initScMW(true);
+	if (retVal == EXIT_FAILURE)
+		return EXIT_FAILURE;
 
-		closeSplash();
-		m_scribusInitialized = true;
-		connect(ScQApp, SIGNAL(lastWindowClosed()), ScQApp, SLOT(quit()));
+	closeSplash();
+	m_scribusInitialized = true;
+	connect(ScQApp, SIGNAL(lastWindowClosed()), ScQApp, SLOT(quit()));
 
-		scribus->show();
-		scribus->setupMainWindow();
+	scribus->show();
+	scribus->setupMainWindow();
 
-		QStringList recoverFiles = scribus->findRecoverableFile();
-		int subsRet = scribus->ShowSubs();
-		if (subsRet == 0)
+	QStringList recoverFiles = scribus->findRecoverableFile();
+	int subsRet = scribus->ShowSubs();
+	if (subsRet == 0)
+	{
+		if (!m_Files.isEmpty())
 		{
-			if (!m_Files.isEmpty())
+			for (int i = 0; i < m_Files.size(); ++i)
+				scribus->loadDoc(m_Files.at(i));
+		}
+		else if ((recoverFiles.count() > 0) && usingGUI())
+		{
+			if (!scribus->recoverFile(recoverFiles))
 			{
-				for (int i = 0; i < m_Files.size(); ++i)
-					scribus->loadDoc(m_Files.at(i));
-			}
-			else if ((recoverFiles.count() > 0) && usingGUI())
-			{
-				if (!scribus->recoverFile(recoverFiles))
-				{
-					if (PrefsManager::instance().appPrefs.uiPrefs.showStartupDialog)
-						scribus->startUpDialog();
-				}
-			}
-			else
-			{
-				if (PrefsManager::instance().appPrefs.uiPrefs.showStartupDialog && usingGUI())
+				if (PrefsManager::instance().appPrefs.uiPrefs.showStartupDialog)
 					scribus->startUpDialog();
-				else
-					scribus->setFocus();
 			}
 		}
-		else if (subsRet == QMessageBox::Help)
+		else
 		{
-			scribus->slotRaiseOnlineHelp();
+			if (PrefsManager::instance().appPrefs.uiPrefs.showStartupDialog && usingGUI())
+				scribus->startUpDialog();
+			else
+				scribus->setFocus();
 		}
 	}
-	else
+	else if (subsRet == QMessageBox::Help)
 	{
-		qDebug()<<"Indigo UI - a new look";
-#ifdef HAVE_QTADS
-		auto* scribusi = new ScribusIndigoMainWindow();
-		Q_CHECK_PTR(scribusi);
-		if (!scribusi)
-			return EXIT_FAILURE;
-		int retVal = scribusi->initScIMW();
-		if (retVal == EXIT_FAILURE)
-			return EXIT_FAILURE;
-		scribusi->show();
-		scribusi->resize(1024, 768);
+		scribus->slotRaiseOnlineHelp();
+	}
 
-//		connect(ScQApp, SIGNAL(lastWindowClosed()), ScQApp, SLOT(quit()));
-#else
-		return EXIT_FAILURE;
-#endif
-	}
 	return EXIT_SUCCESS;
 }
 
Index: scribus/scribuscore.h
===================================================================
--- scribus/scribuscore.h	(Revision 26254)
+++ scribus/scribuscore.h	(Arbeitskopie)
@@ -64,7 +64,7 @@
 	int exportToSVG() {return 0;}
 	int runScript() {return 0;}
 	*/
-	int init(bool useGUI, bool use_indigo_ui, const QList<QString>& filesToUse);
+	int init(bool useGUI, const QList<QString>& filesToUse);
 	int initScribusCore(bool showSplash, bool showFontInfo, bool showProfileInfo, const QString& newGuiLanguage);
 	bool initialized() const {return m_scribusInitialized;}
 	const QString& getGuiLanguage() const;
@@ -140,7 +140,6 @@
 	bool m_haveTiffSep {false};
 	bool m_scribusInitialized {false};
 	bool m_useGUI {false};
-	bool m_use_indigo_ui {false};
 	int m_currScMW {0};
 };
 
Index: scribus/scribusindigomainwindow.cpp
===================================================================
--- scribus/scribusindigomainwindow.cpp	(Revision 26254)
+++ scribus/scribusindigomainwindow.cpp	(nicht existent)
@@ -1,68 +0,0 @@
-#include <QApplication>
-
-#include "scconfig.h"
-#include "api/api_application.h"
-#include "scribusapi.h"
-#include "scribusindigomainwindow.h"
-
-#include "third_party/Qt-Advanced-Docking-System/src/DockAreaWidget.h"
-#include "third_party/Qt-Advanced-Docking-System/src/DockAreaTitleBar.h"
-#include "third_party/Qt-Advanced-Docking-System/src/DockAreaTabBar.h"
-#include "third_party/Qt-Advanced-Docking-System/src/DockManager.h"
-#include "third_party/Qt-Advanced-Docking-System/src/IconProvider.h"
-
-#include "iconmanager.h"
-#include "manager/dock_manager.h"
-
-ScribusIndigoMainWindow::ScribusIndigoMainWindow(QWidget *parent)
-	: QMainWindow{parent}
-	{
-
-	// Documentation:
-	// https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/blob/master/doc/user-guide.md
-//	ads::CDockManager::setConfigFlag(ads::CDockManager::AlwaysShowTabs, false);
-//	ads::CDockManager::setConfigFlag(ads::CDockManager::FloatingContainerHasWidgetIcon, true);
-//	ads::CDockManager::setConfigFlag(ads::CDockManager::FloatingContainerHasWidgetTitle, true);
-//	ads::CDockManager::setConfigFlag(ads::CDockManager::HideSingleCentralWidgetTitleBar, false);
-//	ads::CDockManager::setConfigFlag(ads::CDockManager::OpaqueSplitterResize, true);
-//	ads::CDockManager::setConfigFlag(ads::CDockManager::TabCloseButtonIsToolButton, true);
-//	ads::CDockManager::setConfigFlag(ads::CDockManager::AllTabsHaveCloseButton, false);
-//	ads::CDockManager::setConfigFlag(ads::CDockManager::DockAreaDynamicTabsMenuButtonVisibility, true);
-//	ads::CDockManager::setConfigFlag(ads::CDockManager::DockAreaHasCloseButton, false);
-//	ads::CDockManager::setConfigFlag(ads::CDockManager::DockAreaHasUndockButton, false);
-//	ads::CDockManager::setConfigFlag(ads::CDockManager::DockAreaHideDisabledButtons, true);
-
-////	ads::CDockManager::iconProvider().registerCustomIcon(ads::TabCloseIcon, IconManager::instance().loadIcon("close"));
-////	ads::CDockManager::iconProvider().registerCustomIcon(ads::DockAreaCloseIcon, IconManager::instance().loadIcon("close"));
-////	ads::CDockManager::iconProvider().registerCustomIcon(ads::DockAreaMenuIcon, IconManager::instance().loadIcon("menu-down"));
-////	ads::CDockManager::iconProvider().registerCustomIcon(ads::DockAreaUndockIcon, IconManager::instance().loadIcon("dock-float"));
-
-//	dockManager = new DockManager(this);
-
-
-	}
-
-
-
-ScribusIndigoMainWindow::~ScribusIndigoMainWindow()
-{
-
-}
-
-int ScribusIndigoMainWindow::initScIMW()
-{
-	int retVal = 0;
-
-	QString scribusTitle(ScribusAPI::getVersionScribusTranslated());
-	if (ScribusAPI::isSVN() && ScribusAPI::haveSVNRevision())
-		scribusTitle.append(QString(" (r%1) - Indigo UI Mockup")
-								.arg(ScribusAPI::getSVNRevision()));
-	setWindowTitle(scribusTitle);
-	setObjectName("MainWindow");
-	QWidget *widget = new QWidget;
-	setCentralWidget(widget);
-	QApplication::processEvents();
-	resize(1024, 768);
-
-	return retVal;
-}

Property changes on: scribus/scribusindigomainwindow.cpp
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Index: scribus/scribusindigomainwindow.h
===================================================================
--- scribus/scribusindigomainwindow.h	(Revision 26254)
+++ scribus/scribusindigomainwindow.h	(nicht existent)
@@ -1,26 +0,0 @@
-#ifndef SCRIBUSINDIGOMAINWINDOW_H
-#define SCRIBUSINDIGOMAINWINDOW_H
-
-#include <QMainWindow>
-
-#include "scribusapi.h"
-
-//class DockManager;
-
-class SCRIBUS_API ScribusIndigoMainWindow : public QMainWindow
-	{
-		Q_OBJECT
-	public:
-		explicit ScribusIndigoMainWindow(QWidget *parent = nullptr);
-		~ScribusIndigoMainWindow();
-
-		int initScIMW();
-	signals:
-	private:
-
-	//DockManager *dockManager;
-
-
-	};
-
-#endif // SCRIBUSINDIGOMAINWINDOW_H

Property changes on: scribus/scribusindigomainwindow.h
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
cleanup_indigo_mainwindow.patch (11,034 bytes)   

jghali

2024-08-17 21:31

administrator   ~0051271

Yeah, my guess was that the build failure was caused by HAVE_QTADS and/or WANT_QTADS remaining in the CMakeCache.txt file from an old build. Thanks for the cleanup patch. i just applied it to trunk.

placroix

2024-08-17 21:57

reporter   ~0051273

When prior build error, build directory was new and empty.

From current snv and cleanup_indigo_mainwindow.patch applied, it build nicely without error and run.

Issue History

Date Modified Username Field Change
2024-08-17 18:17 placroix New Issue
2024-08-17 19:58 jghali Note Added: 0051268
2024-08-17 20:11 nitramr Note Added: 0051269
2024-08-17 20:11 nitramr File Added: cleanup_indigo_mainwindow.patch
2024-08-17 21:31 jghali Note Added: 0051271
2024-08-17 21:31 jghali Assigned To => nitramr
2024-08-17 21:31 jghali Status new => resolved
2024-08-17 21:31 jghali Resolution open => fixed
2024-08-17 21:31 jghali Fixed in Version => 1.7.0.svn
2024-08-17 21:57 placroix Note Added: 0051273
2024-09-16 20:54 cbradney Status resolved => closed