You are not logged in.

#1 2024-10-10 06:41:20

redwarf
Member
Registered: 2024-10-10
Posts: 2

Extcalc installation

I was trying to install extcalc from AUR (yay command), but I got this error:

[ 46%] Building CXX object CMakeFiles/extcalc.dir/src/extcalc.o
/home/redwarf/.cache/yay/extcalc/src/extcalc-0.9.3-1/src/extcalc.cpp: In member function ‘void MainObject::editMenuSlot(int)’:
/home/redwarf/.cache/yay/extcalc/src/extcalc-0.9.3-1/src/extcalc.cpp:2845:15: error: format not a string literal and no format arguments [-Werror=format-security]
2845 |         qDebug(QString::number(item));
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
make[2]: *** [CMakeFiles/extcalc.dir/build.make:343: CMakeFiles/extcalc.dir/src/extcalc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/extcalc.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
-> error making: extcalc-exit status 4
-> Failed to install the following packages. Manual intervention is required:
extcalc - exit status 4

Why it doesn't works? What could be a solution?

Offline

#2 2024-10-10 07:08:47

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,464
Website

Re: Extcalc installation

Mod note: moving to AUR Issues


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2024-10-10 10:06:16

Funny0facer
Member
From: Germany
Registered: 2022-12-03
Posts: 158

Re: Extcalc installation

1) please use code brackets for your terminal.output. have a look at bbcode.
2) either you find a way to disable this warning (use different flags or a different compiler) or
3) this needs to be fixed upstream.

Offline

#4 2024-10-10 15:31:14

loqs
Member
Registered: 2014-03-06
Posts: 18,123

Re: Extcalc installation

Please consider using an alternative project that is maintained both upstream and on AUR. Please see https://aur.archlinux.org/packages/extc … ent-888204 which you can implement by adding to line 16 of the PKGBUILD which already adjusts CXXFLAGS. diff of change:

diff --git a/PKGBUILD b/PKGBUILD
index 871a37c..7992f41 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,7 +13,7 @@ source=("http://downloads.sourceforge.net/$pkgname-linux/$pkgname-${pkgver//_/-}
 
 build() {
        cd $srcdir/$pkgname-${pkgver/_/-}
-       CXXFLAGS="$CXXFLAGS -Wno-write-strings -Wno-unused-result"
+       CXXFLAGS="$CXXFLAGS -Wno-write-strings -Wno-unused-result -Wno-error=format-security"
        sed -i 's|${QT_LIBRARIES}|${QT_LIBRARIES} ${OPENGL_LIBRARIES}|' CMakeLists.txt
        sed -i "s|FIND_PACKAGE|FIND_PACKAGE(OpenGL REQUIRED)\nFIND_PACKAGE|" CMakeLists.txt
        sed -i 's|/usr/local|/usr|' CMakeLists.txt

If instead you want to address the cause of the issue. You could apply a patch such as:

diff --git a/src/extcalc.cpp b/src/extcalc.cpp
index 69add0b..28bcd5f 100644
--- a/src/extcalc.cpp
+++ b/src/extcalc.cpp
@@ -2842,7 +2842,7 @@ void MainObject::fileMenuSlot(int item)
 
 void MainObject::editMenuSlot(int item)
 {
-	qDebug(QString::number(item));
+	qDebug() << QString::number(item);
 	emit editSignal(item);
 }
 
diff --git a/src/scriptio.cpp b/src/scriptio.cpp
index 2ebde96..03f5ee0 100644
--- a/src/scriptio.cpp
+++ b/src/scriptio.cpp
@@ -21,6 +21,7 @@ any later version.
 #include <QKeyEvent>
 #include <QCustomEvent>
 #include <QPaintEvent>
+#include <QDebug>
 
 
 
@@ -237,7 +238,7 @@ void ScriptIOWidget::resizeEvent(QResizeEvent*)
   else {
     windowSize=scrollArea->contentsRect();
     output2D->setGeometry(windowSize);
-    qDebug("Requested Size: "+QString::number(windowSize.width())+" "+QString::number(windowSize.height()));
+    qDebug() << "Requested Size: " << QString::number(windowSize.width()) << " " << QString::number(windowSize.height());
   }
 
 }

Offline

#5 2024-10-10 21:31:10

redwarf
Member
Registered: 2024-10-10
Posts: 2

Re: Extcalc installation

WorMzy wrote:

Mod note: moving to AUR Issues

Sorry, I'm new

Offline

#6 2024-10-11 21:48:01

loqs
Member
Registered: 2014-03-06
Posts: 18,123

Re: Extcalc installation

redwarf have you made any progress with finding an alternative to extcalc or applying the suggestions to allow you to build the package?

Offline

Board footer

Powered by FluxBB