grame-cncm / faust

Functional programming language for signal processing and sound synthesis
http://faust.grame.fr
Other
2.57k stars 322 forks source link

/architecture/faust/dsp/dsp.h:38:18: error: type attributes ignored after type is already defined #848

Open kmatheussen opened 1 year ago

kmatheussen commented 1 year ago

Hi there, when upgrading Faust from 2.37.3 to 2.54.9, I get lots of these errors when compiling Radium:

In file included from audio/stk_flute.cpp:41:
/home/kjetil/radium/bin/packages/faust/architecture/faust/dsp/dsp.h:38:18: error: type attributes ignored after type is already defined [-Werror=attributes]
 struct FAUST_API Meta;

But this patch seems to fix it:

kjetil@tt:~/radium/bin/packages/faust$ diff -u architecture/faust/dsp/dsp.h~ architecture/faust/dsp/dsp.h
--- architecture/faust/dsp/dsp.h~   2022-12-17 11:41:42.000000000 +0100
+++ architecture/faust/dsp/dsp.h    2022-12-28 19:12:31.965902920 +0100
@@ -34,8 +34,8 @@
 #define FAUSTFLOAT float
 #endif

-struct FAUST_API UI;
-struct FAUST_API Meta;
+struct UI;
+struct Meta;

 /**
  * DSP memory manager.
sletz commented 1 year ago

Hum... see https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/gui/UI.h#L81

What kind of error do you get?

kmatheussen commented 1 year ago

Maybe you don't see all the text from github issues in the emails? I've got the same problems earlier.

All info should be here: https://github.com/grame-cncm/faust/issues/848

On Wed, Dec 28, 2022 at 7:26 PM Stéphane Letz @.***> wrote:

Hum... see https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/gui/UI.h#L81

What kind of error do you get?

— Reply to this email directly, view it on GitHub https://github.com/grame-cncm/faust/issues/848#issuecomment-1366840204, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIX3J2HOJZW5U3QDSKKNBDWPSA4JANCNFSM6AAAAAATLOZ374 . You are receiving this because you authored the thread.Message ID: @.***>

kmatheussen commented 1 year ago

Maybe it's fixed in newer versions of gcc. I'm using 8.4.0.

sletz commented 1 year ago

Wen you see where "error: type attributes ignored after type is already defined" happens?

kmatheussen commented 1 year ago

I don't understand the question, but stk_flute.cpp looks like this: http://users.notam02.no/~kjetism/stk_flute.cpp

On Thu, Dec 29, 2022 at 12:09 AM Stéphane Letz @.***> wrote:

Wen you see where "error: type attributes ignored after type is already defined" happens?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

kmatheussen commented 1 year ago

And here's the command to compile stk_flute.cpp:

g++ -mfpmath=sse -msse2 audio/stk_flute.cpp -D__STDC_FORMAT_MACROS=1 -c -Werror -Wfloat-equal -Wall -ggdb3 -fno-optimize-sibling-calls -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize-recover=undefined -DRADIUM_USES_UBSAN        -O2 -mfpmath=sse -msse2 -Ibin/packages/gc-7.4.16/include -IQt/ -I /usr/include/python2.7 -DNOPAUSEPLAY -DCOMPILING_RADIUM -DUSE_WEAK_JACK -DGUIISQT -DFULL_VERSION=1 -DIS_LITTLE_ENDIAN=1 -DUSE_OPENGL=1 -DUSE_QT_VISUAL=1 -DUSE_GTK_VISUAL=0 -DUSE_QT_REQTYPE=1 -DUSE_GTK_REQTYPE=0 -DUSE_QT_MENU=1 -DUSE_GTK_MENU=0   -Werror=array-bounds -msse2 -fomit-frame-pointer -DFOR_LINUX -DQT_X11EXTRAS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/home/kjetil/qt-5.15.6-install/include/QtX11Extras -I/home/kjetil/qt-5.15.6-install/include -I/home/kjetil/qt-5.15.6-install/include/QtGui -I/home/kjetil/qt-5.15.6-install/include -I/home/kjetil/qt-5.15.6-install/include/QtCore -I/home/kjetil/qt-5.15.6-install/include -DRADIUM_USES_MOLD_OR_LDD=1 -DWITH_FAUST_DEV -DWITH_PD -DWITHOUT_LLVM_IN_FAUST_DEV  -I ~/SDKs/VST_SDK/VST2_SDK/ -I ~/SDKs/vstsdk2.4/ -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unknown-pragmas -fno-strict-aliasing -Wmissing-field-initializers -Wnull-dereference -Wwrite-strings -DTHREADED_OPENGL=1 -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -fmax-errors=5  -DUSE_QT5 -Wmissing-declarations -DNDEBUG  -Wno-class-memaccess  -Wno-parentheses -std=gnu++17 -Wno-register -DUSE_QT4 -DUSE_QIMAGE_BUFFER=1 `/usr/bin/pkg-config --cflags Qt5Gui --cflags Qt5Network --cflags Qt5OpenGL --cflags Qt5Widgets --cflags Qt5WebKitWidgets --cflags Qt5WebKit --cflags Qt5Concurrent` -I/home/kjetil/radium/bin/packages/qhttpserver-master/src -I/home/kjetil/radium/bin/packages/QScintilla_gpl-2.10.8/Qt4Qt5 -DQHTTPSERVER_EXPORT  -fPIC    -Wno-overloaded-virtual -fno-sanitize=signed-integer-overflow -Wno-unused-function -Wno-missing-declarations -Wno-deprecated-declarations -fno-sanitize=vptr  -O3  -I/home/kjetil/radium/bin/packages/faust/architecture -Wno-float-equal -DCLASSNAME=Flute_dsp -DDSP_NAME=\"STK\ Flute\" -DCREATE_NAME=create_stk_flute_plugin