You are not logged in.
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
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
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
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
Mod note: moving to AUR Issues
Sorry, I'm new
Offline
redwarf have you made any progress with finding an alternative to extcalc or applying the suggestions to allow you to build the package?
Offline