Audio4Linux / JDSP4Linux

An audio effect processor for PipeWire and PulseAudio clients
GNU General Public License v3.0
915 stars 35 forks source link

compiling with gcc-13 fails with: error: 'uint32_t' was not declared in this scope #100

Closed martinkg closed 1 year ago

martinkg commented 1 year ago

Hi,

compiling on upcoming Fedora 38 with gcc (GCC) 13.0.1 20230310 (Red Hat 13.0.1-0) fails with the following error message:

g++ -c -pipe -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-function -Wno-unused-parameter -Wno-unused-const-variable -g -O2 -std=gnu++1z -pthread -pthread -Wall -Wextra -D_REENTRANT -fPIC -DAPP_VERSION=2.3-0-g1f49c84 -DJDSP_VERSION=4.1.0 -DHTTP -DQT_NO_PRINTER -DQTCSV_MAKE_LIB -DHAS_JDSP_DRIVER -DADS_STATIC -DQT_DEPRECATED_WARNINGS -D_REENTRANT -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_NETWORK_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I../../src -I. -I../../3rdparty/asyncplusplus/include -I../../3rdparty/http/src -I../../3rdparty/qtpromise/include -I../../3rdparty/qtpromise/src -I../../3rdparty/qcustomplot -I../../3rdparty/qtcsv/include -I../../3rdparty/qtcsv -I../../3rdparty/WAF -I../../3rdparty -I../../src/audio/base -I../../src/audio/pipewire -I../../src/subprojects/AutoEqIntegration -I../../src/subprojects/FlatTabWidget/FlatTabWidget -I../../src/subprojects/LiquidEqualizerWidget/src -I../../src/subprojects/GraphicEQWidget/GraphicEQWidget -I../../src/subprojects/EELEditor/3rdparty/QCodeEditor/include -I../../src/subprojects/EELEditor/3rdparty/docking-system/src -I../../src/subprojects/EELEditor/src -I../../libjamesdsp/subtree/Main/libjamesdsp/jni/jamesdsp/jdsp -I../../libjamesdsp -I/usr/include/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/giomm-2.4 -I/usr/lib64/giomm-2.4/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2 -I/usr/include/qt5 -I/usr/include/qt5/QtSvg -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.15.8 -I/usr/include/qt5/QtGui/5.15.8/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.15.8 -I/usr/include/qt5/QtCore/5.15.8/QtCore -I/usr/include/qt5/QtCore -I. -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o PresetManager.o ../../src/data/PresetManager.cpp
In file included from ../../src/data/PresetRule.h:4,
                 from ../../src/data/PresetManager.h:4,
                 from ../../src/data/PresetManager.cpp:1:
../../src/audio/base/IOutputDevice.h:12:17: error: 'uint32_t' was not declared in this scope
   12 |     uint id = ((uint32_t)0xffffffff);
      |                 ^~~~~~~~
../../src/audio/base/IOutputDevice.h:5:1: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
    4 | #include <string>
  +++ |+#include <cstdint>
    5 | 
../../src/audio/base/IOutputDevice.h:12:26: error: expected ')' before numeric constant
   12 |     uint id = ((uint32_t)0xffffffff);
      |                          ^~~~~~~~~~
../../src/audio/base/IOutputDevice.h:12:15: note: to match this '('
   12 |     uint id = ((uint32_t)0xffffffff);
      |               ^
make[1]: *** [Makefile:3591: PresetManager.o] Error 1
make[1]: Leaving directory '/builddir/build/BUILD/JDSP4Linux/build/src'

How can this be solved ?

martinkg commented 1 year ago

at the moment solved with this patch uint32_t.patch

--- src/audio/base/IOutputDevice.h.orig 2023-03-16 16:16:52.556573959 +0100
+++ src/audio/base/IOutputDevice.h  2023-03-16 16:17:56.346446614 +0100
@@ -1,6 +1,7 @@
 #ifndef IOUTPUTDEVICE_H
 #define IOUTPUTDEVICE_H

+#include <stdint.h>
 #include <string>

 class IOutputDevice
corrupteddrive commented 1 year ago

AUR package maintainer just updated the package yesterday. Can confirm everything works now.

timschneeb commented 1 year ago

Sorry for the delay on this. I applied the patch to this upstream repo as well.