LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-28-2019, 09:03 PM   #1
Dan Suson
Member
 
Registered: Aug 2007
Location: Valparaiso, IN
Distribution: Slackware
Posts: 100

Rep: Reputation: 7
Cannot build LibreCAD 2.2.0rc1 on slackware-currrent


I am trying to build LibreCAD-2.2.0rc1 on slackware-current, without success. I downloaded and installed qt5-5.12.1 and qt5-webkit-5.212.0_alpha 2 from AlienBOB's website, and built libxkbcommon-0.8.4, OpenAL-1.18.0, and muParser-2.2.5 from slackbuilds.org. When I tried to build LibreCAD, however, when I tried to build LibreCAD itself, it failed with compilation errors. The first error was

ui/forms/qg_commandwidget.cpp: In constructor 'QG_CommandWidget::QG_CommandWidget(QWidget*, const char*, Qt::WindowFlags)':
ui/forms/qg_commandwidget.cpp:59:60: error: invalid use of incomplete type 'class QAction'
auto a1 = new QAction(QObject::tr("Keycode Mode"), this);

In file included from /usr/include/qt5/QtWidgets/QApplication:1,
from ../../generated/librecad/ui/ui_qg_commandwidget.h:14,
from ui/forms/qg_commandwidget.h:29,
from ui/forms/qg_commandwidget.cpp:26:
/usr/include/qt5/QtWidgets/qapplication.h:225:18: note: forward declaration of 'class QAction'
friend class QAction;

If anyone knows what I need to do to correct this, please let me know.
 
Old 04-28-2019, 11:06 PM   #2
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Programs on SBo are only tested against qt5 on SBo (5.9.7), not Alien Bob's (5.12.1). It could be that the LibreCAD version on SBo won't work with that new of QT5. You could check and see if there is a newer version of LibreCAD and see if that compiles or try building qt5 from SBo and see if that solves the problem.
 
Old 05-01-2019, 02:45 AM   #3
Candelabrus
Member
 
Registered: Apr 2015
Location: Ponta Grossa - PR
Distribution: Slackware64
Posts: 173

Rep: Reputation: 26
Can you try this patch, was made for LibreCAD 2.1.3, you will need to regress your version or create a new patch based on this one for 2.2.0
Add this line before qmake-qt5 inside .SlackBuild
Code:
patch -p1 < $CWD/0001-fix-build-with-Qt-5.11.patch

0001-fix-build-with-Qt-5.11.patch
Code:
[hide]From 5bd5d5b1ea6781fcbc3c9c61b2059703647dc5d2 Mon Sep 17 00:00:00 2001
From: Jiri Slaby <jslaby@suse.cz>
Date: Mon, 11 Jun 2018 10:44:00 +0200
Subject: [PATCH 1/1] fix build with Qt 5.11

The new Qt removed some implicit inclusions of headers. To avoid build
errors, add explicit includes of those we use in the sources.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>

(cherry picked from commit 6c392e903e162b9283e88f53006e929663f2e883)
Signed-off-by: Christian Hesse <mail@eworm.de>
---
 librecad/src/ui/forms/qg_commandwidget.cpp | 2 ++
 librecad/src/ui/generic/widgetcreator.cpp  | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/librecad/src/ui/forms/qg_commandwidget.cpp b/librecad/src/ui/forms/qg_commandwidget.cpp
index 7cd69398..2b90d671 100644
--- a/librecad/src/ui/forms/qg_commandwidget.cpp
+++ b/librecad/src/ui/forms/qg_commandwidget.cpp
@@ -24,6 +24,8 @@
 **
 **********************************************************************/
 #include "qg_commandwidget.h"
+
+#include <QAction>
 #include <QKeyEvent>
 #include <algorithm>
 
diff --git a/librecad/src/ui/generic/widgetcreator.cpp b/librecad/src/ui/generic/widgetcreator.cpp
index ca89ab13..260d9afd 100644
--- a/librecad/src/ui/generic/widgetcreator.cpp
+++ b/librecad/src/ui/generic/widgetcreator.cpp
@@ -27,6 +27,8 @@
 #include "widgetcreator.h"
 #include "ui_widgetcreator.h"
 
+#include <QAction>
+#include <QActionGroup>
 #include <QSettings>
 #include <QLineEdit>
 #include <QPushButton>[/hide]
Source:
https://www.archlinux.org/packages/c...6_64/librecad/

EDIT:
Slackware package /tmp/librecad-2.2.0rc1-x86_64-1_SBo.tgz created.
Ps, im using qt5 5.12.3

As I am newbie then I do not know how to create patches that make several changes in different files, but it worked well if you want to use them.

Need to added this lines before "qmake-qt5" inside .SlackBuild and save the patches at same place.
Code:
patch -p0 librecad/src/ui/generic/colorwizard.cpp < $CWD/colorwizard.patch
patch -p0 librecad/src/ui/generic/widgetcreator.cpp < $CWD/widgetcreator.patch
patch -p0 librecad/src/ui/forms/qg_commandwidget.cpp < $CWD/qg_commandwidget.patch
Rename attachments to .patch
Attached Files
File Type: txt colorwizard.txt (328 Bytes, 70 views)
File Type: txt qg_commandwidget.txt (267 Bytes, 64 views)
File Type: txt widgetcreator.txt (321 Bytes, 55 views)

Last edited by Candelabrus; 05-01-2019 at 04:13 AM.
 
Old 05-07-2019, 09:44 PM   #4
Dan Suson
Member
 
Registered: Aug 2007
Location: Valparaiso, IN
Distribution: Slackware
Posts: 100

Original Poster
Rep: Reputation: 7
I ended up only using the three patches at the end of Candelabrus' post. Thank you for the help. This worked successfully.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Getting Started with LibreCAD LXer Syndicated Linux News 0 11-05-2015 07:03 PM
LibreCAD (QCad) for SLED 11.1 sportzfan28 Linux - Newbie 3 01-01-2012 07:31 AM
A feature of the Open tray XFCE plugin in currrent AGer Slackware 0 03-07-2010 07:32 AM
Installing the most currrent Firefox on SUSE 10 bitznbytes SUSE / openSUSE 4 05-01-2006 09:59 PM
how trusthworthy is the slackware-currrent? sitrus Slackware 6 11-05-2002 09:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration