falkTX / Carla

Audio plugin host
https://kx.studio/carla
1.55k stars 144 forks source link

make fails to compile SFZero.cpp #1799

Open edrihan opened 10 months ago

edrihan commented 10 months ago

Title describes issue. I tried making Carla with the following command(s) run in Linux Mint 21.2, (Victoria):

git clone https://github.com/falkTX/Carla.git && cd Carla && make

After successfully compiling for a while runs into this error after compiling lilv.c:

make[1]: Leaving directory '/home/username/test/Carla/source/modules/lilv'
make[1]: Entering directory '/home/username/test/Carla/source/modules/sfzero'
Compiling SFZero.cpp
In file included from ../../modules/water/text/CharPointer_UTF8.h:29,
                 from ../../modules/water/text/String.h:29,
                 from sfzero/SFZRegion.h:12,
                 from sfzero/SFZEG.h:10,
                 from SFZero.h:19,
                 from SFZero.cpp:4:
../../modules/water/text/CharacterFunctions.h: In static member function ‘static double water::CharacterFunctions::readDoubleValue(CharPointerType&)’:
../../modules/water/text/CharacterFunctions.h:126:33: error: ‘numeric_limits’ is not a member of ‘std’
  126 |                     return std::numeric_limits<double>::quiet_NaN();
      |                                 ^~~~~~~~~~~~~~
../../modules/water/text/CharacterFunctions.h:126:48: error: expected primary-expression before ‘double’
  126 |                     return std::numeric_limits<double>::quiet_NaN();
      |                                                ^~~~~~
../../modules/water/text/CharacterFunctions.h:126:48: error: expected ‘;’ before ‘double’
../../modules/water/text/CharacterFunctions.h:125:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  125 |                 if ((text[1] == 'a' || text[1] == 'A') && (text[2] == 'n' || text[2] == 'N'))
      |                 ^~
../../modules/water/text/CharacterFunctions.h:126:48: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  126 |                     return std::numeric_limits<double>::quiet_NaN();
      |                                                ^~~~~~
../../modules/water/text/CharacterFunctions.h:126:54: error: expected unqualified-id before ‘>’ token
  126 |                     return std::numeric_limits<double>::quiet_NaN();
      |                                                      ^
../../modules/water/text/CharacterFunctions.h:132:33: error: ‘numeric_limits’ is not a member of ‘std’
  132 |                     return std::numeric_limits<double>::infinity();
      |                                 ^~~~~~~~~~~~~~
../../modules/water/text/CharacterFunctions.h:132:48: error: expected primary-expression before ‘double’
  132 |                     return std::numeric_limits<double>::infinity();
      |                                                ^~~~~~
../../modules/water/text/CharacterFunctions.h:132:48: error: expected ‘;’ before ‘double’
../../modules/water/text/CharacterFunctions.h:131:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  131 |                 if ((text[1] == 'n' || text[1] == 'N') && (text[2] == 'f' || text[2] == 'F'))
      |                 ^~
../../modules/water/text/CharacterFunctions.h:132:48: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  132 |                     return std::numeric_limits<double>::infinity();
      |                                                ^~~~~~
../../modules/water/text/CharacterFunctions.h:132:54: error: expected unqualified-id before ‘>’ token
  132 |                     return std::numeric_limits<double>::infinity();
      |                                                      ^
../../modules/water/text/CharacterFunctions.h:171:72: error: ‘numeric_limits’ is not a member of ‘std’
  171 |          const double maxAccumulatorValue = (double) ((std::numeric_limits<unsigned int>::max() - 9) / 10);
      |                                                             ^~~~~~~~~~~~~~

../../modules/water/text/CharacterFunctions.h:171:87: error: expected primary-expression before ‘unsigned’
  171 | double maxAccumulatorValue = (double) ((std::numeric_limits<unsigned int>::max() - 9) / 10);
      |                                                             ^~~~~~~~

../../modules/water/text/CharacterFunctions.h:171:87: error: expected ‘)’ before ‘unsigned’
../../modules/water/text/CharacterFunctions.h:171:66: note: to match this ‘(’
  171 |                const double maxAccumulatorValue = (double) ((std::numeric_limits<unsigned int>::max() - 9) / 10);
      |                                                             ^

../../modules/water/text/CharacterFunctions.h:171:118: error: expected ‘)’ before ‘;’ token
  171 | Value = (double) ((std::numeric_limits<unsigned int>::max() - 9) / 10);
      |                                                                       ^

../../modules/water/text/CharacterFunctions.h:171:65: note: to match this ‘(’
  171 |                 const double maxAccumulatorValue = (double) ((std::numeric_limits<unsigned int>::max() - 9) / 10);
      |                                                             ^

In file included from sfzero/SFZRegion.h:12,
                 from sfzero/SFZEG.h:10,
                 from SFZero.h:19,
                 from SFZero.cpp:4:
../../modules/water/text/String.h: In member function ‘void water::String::appendCharPointer(CharPointer)’:
../../modules/water/text/String.h:238:47: error: ‘numeric_limits’ is not a member of ‘std’
  238 |         appendCharPointer (textToAppend, std::numeric_limits<size_t>::max());
      |                                               ^~~~~~~~~~~~~~
../../modules/water/text/String.h:238:68: error: expected primary-expression before ‘>’ token
  238 |   appendCharPointer (textToAppend, std::numeric_limits<size_t>::max());
      |                                                              ^

../../modules/water/text/String.h:238:71: error: ‘::max’ has not been declared; did you mean ‘std::max’?
  238 |   appendCharPointer (textToAppend, std::numeric_limits<size_t>::max());
      |                                                                 ^~~
      |                                                                 std::max
In file included from /usr/include/c++/11/algorithm:62,
                 from ../../modules/water/text/CharacterFunctions.h:31,
                 from ../../modules/water/text/CharPointer_UTF8.h:29,
                 from ../../modules/water/text/String.h:29,
                 from sfzero/SFZRegion.h:12,
                 from sfzero/SFZEG.h:10,
                 from SFZero.h:19,
                 from SFZero.cpp:4:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
make[1]: *** [Makefile:44: ../../../build/sfzero/Release/SFZero.cpp.o] Error 1
make[1]: Leaving directory '/home/username/test/Carla/source/modules/sfzero'
make: *** [Makefile:157: /home/username/test/Carla/build/modules/Release/sfzero.a] Error 2
ed@ed-VirtualBox:~/test/Carla$ make
make[1]: Entering directory '/home/username/test/Carla/source/backend/engine'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/username/test/Carla/source/backend/engine'
make[1]: Entering directory '/home/username/test/Carla/source/backend/plugin'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/username/test/Carla/source/backend/plugin'
make[1]: Entering directory '/home/username/test/Carla/source/jackbridge'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/username/test/Carla/source/jackbridge'
make[1]: Entering directory '/home/username/test/Carla/source/native-plugins'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/username/test/Carla/source/native-plugins'
make[1]: Entering directory '/home/username/test/Carla/source/modules/rtmempool'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/username/test/Carla/source/modules/rtmempool'
make[1]: Entering directory '/home/username/test/Carla/source/modules/audio_decoder'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/username/test/Carla/source/modules/audio_decoder'
make[1]: Entering directory '/home/username/test/Carla/source/modules/lilv'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/username/test/Carla/source/modules/lilv'
make[1]: Entering directory '/home/username/test/Carla/source/modules/sfzero'
Compiling SFZero.cpp
In file included from ../../modules/water/text/CharPointer_UTF8.h:29,
                 from ../../modules/water/text/String.h:29,
                 from sfzero/SFZRegion.h:12,
                 from sfzero/SFZEG.h:10,
                 from SFZero.h:19,
                 from SFZero.cpp:4:
../../modules/water/text/CharacterFunctions.h: In static member function ‘static double water::CharacterFunctions::readDoubleValue(CharPointerType&)’:
../../modules/water/text/CharacterFunctions.h:126:33: error: ‘numeric_limits’ is not a member of ‘std’
  126 |                     return std::numeric_limits<double>::quiet_NaN();
      |                                 ^~~~~~~~~~~~~~
../../modules/water/text/CharacterFunctions.h:126:48: error: expected primary-expression before ‘double’
  126 |                     return std::numeric_limits<double>::quiet_NaN();
      |                                                ^~~~~~
../../modules/water/text/CharacterFunctions.h:126:48: error: expected ‘;’ before ‘double’
../../modules/water/text/CharacterFunctions.h:125:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  125 |                 if ((text[1] == 'a' || text[1] == 'A') && (text[2] == 'n' || text[2] == 'N'))
      |                 ^~
../../modules/water/text/CharacterFunctions.h:126:48: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  126 |                     return std::numeric_limits<double>::quiet_NaN();
      |                                                ^~~~~~
../../modules/water/text/CharacterFunctions.h:126:54: error: expected unqualified-id before ‘>’ token
  126 |                     return std::numeric_limits<double>::quiet_NaN();
      |                                                      ^
../../modules/water/text/CharacterFunctions.h:132:33: error: ‘numeric_limits’ is not a member of ‘std’
  132 |                     return std::numeric_limits<double>::infinity();
      |                                 ^~~~~~~~~~~~~~
../../modules/water/text/CharacterFunctions.h:132:48: error: expected primary-expression before ‘double’
  132 |                     return std::numeric_limits<double>::infinity();
      |                                                ^~~~~~
../../modules/water/text/CharacterFunctions.h:132:48: error: expected ‘;’ before ‘double’
../../modules/water/text/CharacterFunctions.h:131:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  131 |                 if ((text[1] == 'n' || text[1] == 'N') && (text[2] == 'f' || text[2] == 'F'))
      |                 ^~
../../modules/water/text/CharacterFunctions.h:132:48: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  132 |                     return std::numeric_limits<double>::infinity();
      |                                                ^~~~~~
../../modules/water/text/CharacterFunctions.h:132:54: error: expected unqualified-id before ‘>’ token
  132 |                     return std::numeric_limits<double>::infinity();
      |                                                      ^
../../modules/water/text/CharacterFunctions.h:171:72: error: ‘numeric_limits’ is not a member of ‘std’
  171 |          const double maxAccumulatorValue = (double) ((std::numeric_limits<unsigned int>::max() - 9) / 10);
      |                                                             ^~~~~~~~~~~~~~

../../modules/water/text/CharacterFunctions.h:171:87: error: expected primary-expression before ‘unsigned’
  171 | double maxAccumulatorValue = (double) ((std::numeric_limits<unsigned int>::max() - 9) / 10);
      |                                                             ^~~~~~~~

../../modules/water/text/CharacterFunctions.h:171:87: error: expected ‘)’ before ‘unsigned’
../../modules/water/text/CharacterFunctions.h:171:66: note: to match this ‘(’
  171 |                const double maxAccumulatorValue = (double) ((std::numeric_limits<unsigned int>::max() - 9) / 10);
      |                                                             ^

../../modules/water/text/CharacterFunctions.h:171:118: error: expected ‘)’ before ‘;’ token
  171 | Value = (double) ((std::numeric_limits<unsigned int>::max() - 9) / 10);
      |                                                                       ^

../../modules/water/text/CharacterFunctions.h:171:65: note: to match this ‘(’
  171 |                 const double maxAccumulatorValue = (double) ((std::numeric_limits<unsigned int>::max() - 9) / 10);
      |                                                             ^

In file included from sfzero/SFZRegion.h:12,
                 from sfzero/SFZEG.h:10,
                 from SFZero.h:19,
                 from SFZero.cpp:4:
../../modules/water/text/String.h: In member function ‘void water::String::appendCharPointer(CharPointer)’:
../../modules/water/text/String.h:238:47: error: ‘numeric_limits’ is not a member of ‘std’
  238 |         appendCharPointer (textToAppend, std::numeric_limits<size_t>::max());
      |                                               ^~~~~~~~~~~~~~
../../modules/water/text/String.h:238:68: error: expected primary-expression before ‘>’ token
  238 |   appendCharPointer (textToAppend, std::numeric_limits<size_t>::max());
      |                                                              ^

../../modules/water/text/String.h:238:71: error: ‘::max’ has not been declared; did you mean ‘std::max’?
  238 |   appendCharPointer (textToAppend, std::numeric_limits<size_t>::max());
      |                                                                 ^~~
      |                                                                 std::max
In file included from /usr/include/c++/11/algorithm:62,
                 from ../../modules/water/text/CharacterFunctions.h:31,
                 from ../../modules/water/text/CharPointer_UTF8.h:29,
                 from ../../modules/water/text/String.h:29,
                 from sfzero/SFZRegion.h:12,
                 from sfzero/SFZEG.h:10,
                 from SFZero.h:19,
                 from SFZero.cpp:4:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
make[1]: *** [Makefile:44: ../../../build/sfzero/Release/SFZero.cpp.o] Error 1
make[1]: Leaving directory '/home/username/test/Carla/source/modules/sfzero'
make: *** [Makefile:157: /home/username/test/Carla/build/modules/Release/sfzero.a] Error 2