jpcima / adljack

OPL3/OPN2 synthesizer using ADLMIDI and OPNMIDI, for Jack and cross-platform audio
Boost Software License 1.0
41 stars 3 forks source link

1.3.0 fails to build due to flatbuffer #26

Closed dvzrv closed 5 months ago

dvzrv commented 10 months ago

Hi! when trying to build 1.3.0 using the provided combined source tarball, I get:

[ 97%] Building CXX object CMakeFiles/adljack.dir/sources/player_traits.cc.o
/usr/bin/c++ -DADLJACK_HAVE_MLOCKALL -DADLJACK_I18N -DADLJACK_PREFIX=\"/usr\" -DADLJACK_USE_CURSES -DADLJACK_USE_NSM -DADLMIDI_DISABLE_MIDI_SEQUENCER -DBWMIDI_DISABLE_MUS_SUPPORT -DBWMIDI_DISABLE_XMI_SUPPORT -I/build/adljack/src/adljack-1.3.0/thirdparty/ini-processing/src -I/build/adljack/src/adljack-1.3.0/thirdparty/
nonlib -I/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include -I/build/adljack/src/adljack-1.3.0/thirdparty/libADLMIDI/include -I/build/adljack/src/adljack-1.3.0/thirdparty/libOPNMIDI/include -I/build/adljack/src/adljack-1.3.0/thirdparty/ring-buffer/include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -f
exceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/adljack/src=/usr/src/debug/adljack -flto=auto -Wall -std=gnu++11 -MD -MT CMakeFiles/adljack.dir/sources/i18n.cc.o -MF CMakeFiles/adljack.dir
/sources/i18n.cc.o.d -o CMakeFiles/adljack.dir/sources/i18n.cc.o -c /build/adljack/src/adljack-1.3.0/sources/i18n.cc
/usr/bin/c++ -DADLJACK_HAVE_MLOCKALL -DADLJACK_I18N -DADLJACK_PREFIX=\"/usr\" -DADLJACK_USE_CURSES -DADLJACK_USE_NSM -DADLMIDI_DISABLE_MIDI_SEQUENCER -DBWMIDI_DISABLE_MUS_SUPPORT -DBWMIDI_DISABLE_XMI_SUPPORT -I/build/adljack/src/adljack-1.3.0/thirdparty/ini-processing/src -I/build/adljack/src/adljack-1.3.0/thirdparty/
nonlib -I/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include -I/build/adljack/src/adljack-1.3.0/thirdparty/libADLMIDI/include -I/build/adljack/src/adljack-1.3.0/thirdparty/libOPNMIDI/include -I/build/adljack/src/adljack-1.3.0/thirdparty/ring-buffer/include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -f
exceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/adljack/src=/usr/src/debug/adljack -flto=auto -Wall -std=gnu++11 -MD -MT CMakeFiles/adljack.dir/sources/state.cc.o -MF CMakeFiles/adljack.di
r/sources/state.cc.o.d -o CMakeFiles/adljack.dir/sources/state.cc.o -c /build/adljack/src/adljack-1.3.0/sources/state.cc
/usr/bin/c++ -DADLJACK_HAVE_MLOCKALL -DADLJACK_I18N -DADLJACK_PREFIX=\"/usr\" -DADLJACK_USE_CURSES -DADLJACK_USE_NSM -DADLMIDI_DISABLE_MIDI_SEQUENCER -DBWMIDI_DISABLE_MUS_SUPPORT -DBWMIDI_DISABLE_XMI_SUPPORT -I/build/adljack/src/adljack-1.3.0/thirdparty/ini-processing/src -I/build/adljack/src/adljack-1.3.0/thirdparty/
nonlib -I/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include -I/build/adljack/src/adljack-1.3.0/thirdparty/libADLMIDI/include -I/build/adljack/src/adljack-1.3.0/thirdparty/libOPNMIDI/include -I/build/adljack/src/adljack-1.3.0/thirdparty/ring-buffer/include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -f
exceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/adljack/src=/usr/src/debug/adljack -flto=auto -Wall -std=gnu++11 -MD -MT CMakeFiles/adljack.dir/sources/tui_fileselect.cc.o -MF CMakeFiles/a
dljack.dir/sources/tui_fileselect.cc.o.d -o CMakeFiles/adljack.dir/sources/tui_fileselect.cc.o -c /build/adljack/src/adljack-1.3.0/sources/tui_fileselect.cc
/usr/bin/c++ -DADLJACK_HAVE_MLOCKALL -DADLJACK_I18N -DADLJACK_PREFIX=\"/usr\" -DADLJACK_USE_CURSES -DADLJACK_USE_NSM -DADLMIDI_DISABLE_MIDI_SEQUENCER -DBWMIDI_DISABLE_MUS_SUPPORT -DBWMIDI_DISABLE_XMI_SUPPORT -I/build/adljack/src/adljack-1.3.0/thirdparty/ini-processing/src -I/build/adljack/src/adljack-1.3.0/thirdparty/
nonlib -I/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include -I/build/adljack/src/adljack-1.3.0/thirdparty/libADLMIDI/include -I/build/adljack/src/adljack-1.3.0/thirdparty/libOPNMIDI/include -I/build/adljack/src/adljack-1.3.0/thirdparty/ring-buffer/include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -f
exceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/adljack/src=/usr/src/debug/adljack -flto=auto -Wall -std=gnu++11 -MD -MT CMakeFiles/adljack.dir/sources/player_traits.cc.o -MF CMakeFiles/ad
ljack.dir/sources/player_traits.cc.o.d -o CMakeFiles/adljack.dir/sources/player_traits.cc.o -c /build/adljack/src/adljack-1.3.0/sources/player_traits.cc
/usr/bin/c++ -DADLJACK_HAVE_MLOCKALL -DADLJACK_I18N -DADLJACK_PREFIX=\"/usr\" -DADLJACK_USE_CURSES -DADLJACK_USE_NSM -DADLMIDI_DISABLE_MIDI_SEQUENCER -DBWMIDI_DISABLE_MUS_SUPPORT -DBWMIDI_DISABLE_XMI_SUPPORT -I/build/adljack/src/adljack-1.3.0/thirdparty/ini-processing/src -I/build/adljack/src/adljack-1.3.0/thirdparty/
nonlib -I/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include -I/build/adljack/src/adljack-1.3.0/thirdparty/libADLMIDI/include -I/build/adljack/src/adljack-1.3.0/thirdparty/libOPNMIDI/include -I/build/adljack/src/adljack-1.3.0/thirdparty/ring-buffer/include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -f
exceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/adljack/src=/usr/src/debug/adljack -flto=auto -Wall -std=gnu++11 -MD -MT CMakeFiles/adljack.dir/sources/common.cc.o -MF CMakeFiles/adljack.d
ir/sources/common.cc.o.d -o CMakeFiles/adljack.dir/sources/common.cc.o -c /build/adljack/src/adljack-1.3.0/sources/common.cc
/build/adljack/src/adljack-1.3.0/sources/player_traits.cc: In static member function ‘static int Player_Traits<Player_Type::OPN2>::set_bank(player*, unsigned int)’:
/build/adljack/src/adljack-1.3.0/sources/player_traits.cc:14:83: note: ‘#pragma message: Using my own bank embed for OPN2. Remove this in the future.’
   14 |     #pragma message("Using my own bank embed for OPN2. Remove this in the future.")
      |                                                                                   ^
In file included from /build/adljack/src/adljack-1.3.0/sources/state.cc:8:
/build/adljack/src/adljack-1.3.0/sources/state_generated.h: In member function ‘bool fb::state::State::Verify(flatbuffers::Verifier&) const’:
/build/adljack/src/adljack-1.3.0/sources/state_generated.h:46:27: error: no matching function for call to ‘flatbuffers::Verifier::Verify(const flatbuffers::Vector<flatbuffers::Offset<fb::state::Channel_State> >*)’
   46 |            verifier.Verify(channel()) &&
      |            ~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/buffer_ref.h:21,
                 from /build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/flatbuffers.h:25,
                 from /build/adljack/src/adljack-1.3.0/sources/state_generated.h:7:
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:88:29: note: candidate: ‘template<class T> bool flatbuffers::Verifier::Verify(size_t) const’
   88 |   template<typename T> bool Verify(const size_t elem) const {
      |                             ^~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:88:29: note:   template argument deduction/substitution failed:
/build/adljack/src/adljack-1.3.0/sources/state_generated.h:46:27: note:   couldn’t deduce template parameter ‘T’
   46 |            verifier.Verify(channel()) &&
      |            ~~~~~~~~~~~~~~~^~~~~~~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:72:8: note: candidate: ‘bool flatbuffers::Verifier::Verify(size_t, size_t) const’
   72 |   bool Verify(const size_t elem, const size_t elem_len) const {
      |        ^~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:72:8: note:   candidate expects 2 arguments, 1 provided
/build/adljack/src/adljack-1.3.0/sources/state_generated.h:49:27: error: no matching function for call to ‘flatbuffers::Verifier::Verify(const flatbuffers::Vector<flatbuffers::Offset<fb::state::Player_State> >*)’
   49 |            verifier.Verify(player()) &&
      |            ~~~~~~~~~~~~~~~^~~~~~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:88:29: note: candidate: ‘template<class T> bool flatbuffers::Verifier::Verify(size_t) const’
   88 |   template<typename T> bool Verify(const size_t elem) const {
      |                             ^~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:88:29: note:   template argument deduction/substitution failed:
/build/adljack/src/adljack-1.3.0/sources/state_generated.h:49:27: note:   couldn’t deduce template parameter ‘T’
   49 |            verifier.Verify(player()) &&
      |            ~~~~~~~~~~~~~~~^~~~~~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:72:8: note: candidate: ‘bool flatbuffers::Verifier::Verify(size_t, size_t) const’
   72 |   bool Verify(const size_t elem, const size_t elem_len) const {
      |        ^~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:72:8: note:   candidate expects 2 arguments, 1 provided
/build/adljack/src/adljack-1.3.0/sources/state_generated.h:51:32: error: no matching function for call to ‘fb::state::State::VerifyField<uint8_t>(flatbuffers::Verifier&, fb::state::State::<unnamed enum>) const’
   51 |            VerifyField<uint8_t>(verifier, VT_CHIP_COUNT) &&
      |            ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/flatbuffer_builder.h:32,
                 from /build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/flatbuffers.h:27:
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/table.h:115:8: note: candidate: ‘template<class T> bool flatbuffers::Table::VerifyField(const flatbuffers::Verifier&, flatbuffers::voffset_t, size_t) const’
  115 |   bool VerifyField(const Verifier &verifier, voffset_t field,
      |        ^~~~~~~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/table.h:115:8: note:   candidate expects 3 arguments, 2 provided
/build/adljack/src/adljack-1.3.0/sources/state_generated.h:52:33: error: no matching function for call to ‘fb::state::State::VerifyField<uint16_t>(flatbuffers::Verifier&, fb::state::State::<unnamed enum>) const’
   52 |            VerifyField<uint16_t>(verifier, VT_VOLUME) &&
      |            ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/table.h:115:8: note: candidate: ‘template<class T> bool flatbuffers::Table::VerifyField(const flatbuffers::Verifier&, flatbuffers::voffset_t, size_t) const’
  115 |   bool VerifyField(const Verifier &verifier, voffset_t field,
      |        ^~~~~~~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/table.h:115:8: note:   candidate expects 3 arguments, 2 provided
/build/adljack/src/adljack-1.3.0/sources/state_generated.h: In member function ‘bool fb::state::Channel_State::Verify(flatbuffers::Verifier&) const’:
/build/adljack/src/adljack-1.3.0/sources/state_generated.h:137:32: error: no matching function for call to ‘fb::state::Channel_State::VerifyField<uint8_t>(flatbuffers::Verifier&, fb::state::Channel_State::<unnamed enum>) const’
  137 |            VerifyField<uint8_t>(verifier, VT_PROGRAM) &&
      |            ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/table.h:115:8: note: candidate: ‘template<class T> bool flatbuffers::Table::VerifyField(const flatbuffers::Verifier&, flatbuffers::voffset_t, size_t) const’
  115 |   bool VerifyField(const Verifier &verifier, voffset_t field,
      |        ^~~~~~~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/table.h:115:8: note:   candidate expects 3 arguments, 2 provided
/build/adljack/src/adljack-1.3.0/sources/state_generated.h:138:33: error: no matching function for call to ‘fb::state::Channel_State::VerifyField<uint16_t>(flatbuffers::Verifier&, fb::state::Channel_State::<unnamed enum>) const’
  138 |            VerifyField<uint16_t>(verifier, VT_BANK) &&
      |            ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/table.h:115:8: note: candidate: ‘template<class T> bool flatbuffers::Table::VerifyField(const flatbuffers::Verifier&, flatbuffers::voffset_t, size_t) const’
  115 |   bool VerifyField(const Verifier &verifier, voffset_t field,
      |        ^~~~~~~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/table.h:115:8: note:   candidate expects 3 arguments, 2 provided
/build/adljack/src/adljack-1.3.0/sources/state_generated.h: In member function ‘bool fb::state::Player_Id::Verify(flatbuffers::Verifier&) const’:
/build/adljack/src/adljack-1.3.0/sources/state_generated.h:188:27: error: no matching function for call to ‘flatbuffers::Verifier::Verify(const flatbuffers::String*)’
  188 |            verifier.Verify(player()) &&
      |            ~~~~~~~~~~~~~~~^~~~~~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:88:29: note: candidate: ‘template<class T> bool flatbuffers::Verifier::Verify(size_t) const’
   88 |   template<typename T> bool Verify(const size_t elem) const {
      |                             ^~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:88:29: note:   template argument deduction/substitution failed:
/build/adljack/src/adljack-1.3.0/sources/state_generated.h:188:27: note:   couldn’t deduce template parameter ‘T’
  188 |            verifier.Verify(player()) &&
      |            ~~~~~~~~~~~~~~~^~~~~~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:72:8: note: candidate: ‘bool flatbuffers::Verifier::Verify(size_t, size_t) const’
   72 |   bool Verify(const size_t elem, const size_t elem_len) const {
      |        ^~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:72:8: note:   candidate expects 2 arguments, 1 provided
/build/adljack/src/adljack-1.3.0/sources/state_generated.h:190:27: error: no matching function for call to ‘flatbuffers::Verifier::Verify(const flatbuffers::String*)’
  190 |            verifier.Verify(emulator()) &&
      |            ~~~~~~~~~~~~~~~^~~~~~~~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:88:29: note: candidate: ‘template<class T> bool flatbuffers::Verifier::Verify(size_t) const’
   88 |   template<typename T> bool Verify(const size_t elem) const {
      |                             ^~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:88:29: note:   template argument deduction/substitution failed:
/build/adljack/src/adljack-1.3.0/sources/state_generated.h:190:27: note:   couldn’t deduce template parameter ‘T’
  190 |            verifier.Verify(emulator()) &&
      |            ~~~~~~~~~~~~~~~^~~~~~~~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:72:8: note: candidate: ‘bool flatbuffers::Verifier::Verify(size_t, size_t) const’
   72 |   bool Verify(const size_t elem, const size_t elem_len) const {
      |        ^~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:72:8: note:   candidate expects 2 arguments, 1 provided
/build/adljack/src/adljack-1.3.0/sources/state_generated.h: In member function ‘bool fb::state::Player_State::Verify(flatbuffers::Verifier&) const’:
/build/adljack/src/adljack-1.3.0/sources/state_generated.h:254:27: error: no matching function for call to ‘flatbuffers::Verifier::Verify(const flatbuffers::String*)’
  254 |            verifier.Verify(bank_file()) &&
      |            ~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:88:29: note: candidate: ‘template<class T> bool flatbuffers::Verifier::Verify(size_t) const’
   88 |   template<typename T> bool Verify(const size_t elem) const {
      |                             ^~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:88:29: note:   template argument deduction/substitution failed:
/build/adljack/src/adljack-1.3.0/sources/state_generated.h:254:27: note:   couldn’t deduce template parameter ‘T’
  254 |            verifier.Verify(bank_file()) &&
      |            ~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:72:8: note: candidate: ‘bool flatbuffers::Verifier::Verify(size_t, size_t) const’
   72 |   bool Verify(const size_t elem, const size_t elem_len) const {
      |        ^~~~~~
/build/adljack/src/adljack-1.3.0/thirdparty/flatbuffers/include/flatbuffers/verifier.h:72:8: note:   candidate expects 2 arguments, 1 provided
make[2]: Leaving directory '/build/adljack/src/build'
[ 97%] Built target adlrt
/build/adljack/src/adljack-1.3.0/sources/jackmain.cc: In function ‘int session_save(char**, void*)’:
/build/adljack/src/adljack-1.3.0/sources/jackmain.cc:206:20: warning: unused variable ‘ctx’ [-Wunused-variable]
  206 |     Audio_Context &ctx = *(Audio_Context *)user_data;
      |                    ^~~
make[2]: *** [CMakeFiles/adljack.dir/build.make:216: CMakeFiles/adljack.dir/sources/state.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/build/adljack/src/build'
make[1]: *** [CMakeFiles/Makefile2:160: CMakeFiles/adljack.dir/all] Error 2
make[1]: Leaving directory '/build/adljack/src/build'
make: *** [Makefile:156: all] Error 2
Wohlstand commented 10 months ago

Hello! What the platform, and what the compiler version is?

dvzrv commented 10 months ago

Hello! What the platform, and what the compiler version is?

Ah, my bad. Didn't have enough time when writing the ticket!

I'm building this for Arch Linux using gcc 13.2.1

Wohlstand commented 10 months ago

Just now I bumped flatbuffers module, please try, will it work on your end or not?

dvzrv commented 6 months ago

Just now I bumped flatbuffers module, please try, will it work on your end or not?

Sorry, I only have limited time for each package and testing this eats a lot of time, as I would have to change the build script every time, as a lot of submodules are used (I am building from the source tarball for the distribution package). I'll see what I can do, but frankly speaking it would be great if the use of projects included as git submodules could be reduced as well, as that helps a great deal in packaging this project more flexibly.

Wohlstand commented 6 months ago

You always can clone the repository by tag. But, speaking about attached source code archives, I need to use git archive-all plugin to manually pack these archives and supply them here.

Wohlstand commented 5 months ago

The same bug got been debugged at fixed here: #27

dvzrv commented 4 months ago

@Wohlstand: just a quick unrelated follow-up: Things work great now with the new USE_SYSTEM_RTAUDIO and USE_SYSTEM_RTMIDI cmake options in 1.3.1. Thank you! :bow: