kmatheussen / radium

A graphical music editor. A next generation tracker.
http://users.notam02.no/~kjetism/radium/
GNU General Public License v2.0
843 stars 36 forks source link

Build error; ‘is_integral_v’ is not a member of ‘std’, template argument 1 is invalid, expected unqualified-id before ‘>’ token #1411

Closed mxmilkiib closed 7 months ago

mxmilkiib commented 10 months ago

I trying to build from https://aur.archlinux.org/packages/radium-git but getting this error;

In file included from /home/milk/.cache/yay/radium-git/src/radium/bin/packages/faust/compiler/../architecture/faust/gui/JSONUIDecoder.h:35,
                 from /home/milk/.cache/yay/radium-git/src/radium/bin/packages/faust/compiler/generator/llvm/llvm_dsp_aux.hh:33,
                 from /home/milk/.cache/yay/radium-git/src/radium/bin/packages/faust/compiler/global.cpp:71:
/home/milk/.cache/yay/radium-git/src/radium/bin/packages/faust/compiler/../architecture/faust/gui/CGlue.h: In function ‘void buildUIGlue(UIGlue*, UI*, bool)’:
/home/milk/.cache/yay/radium-git/src/radium/bin/packages/faust/compiler/../architecture/faust/gui/CGlue.h:284:35: warning: cast between incompatible function types from ‘void (*)(void*, const char*, double*, double, double, double, double)’ to ‘addVerticalSliderFun’ {aka ‘void (*)(void*, const char*, float*, float, float, float, float)’} [-Wcast-function-type]
  284 |         glue->addVerticalSlider = reinterpret_cast<addVerticalSliderFun>(addVerticalSliderGlueDouble);
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/milk/.cache/yay/radium-git/src/radium/bin/packages/faust/compiler/../architecture/faust/gui/CGlue.h:285:37: warning: cast between incompatible function types from ‘void (*)(void*, const char*, double*, double, double, double, double)’ to ‘addHorizontalSliderFun’ {aka ‘void (*)(void*, const char*, float*, float, float, float, float)’} [-Wcast-function-type]
  285 |         glue->addHorizontalSlider = reinterpret_cast<addHorizontalSliderFun>(addHorizontalSliderGlueDouble);
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/milk/.cache/yay/radium-git/src/radium/bin/packages/faust/compiler/../architecture/faust/gui/CGlue.h:286:29: warning: cast between incompatible function types from ‘void (*)(void*, const char*, double*, double, double, double, double)’ to ‘addNumEntryFun’ {aka ‘void (*)(void*, const char*, float*, float, float, float, float)’} [-Wcast-function-type]
  286 |         glue->addNumEntry = reinterpret_cast<addNumEntryFun>(addNumEntryGlueDouble);
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/milk/.cache/yay/radium-git/src/radium/bin/packages/faust/compiler/../architecture/faust/gui/CGlue.h:287:39: warning: cast between incompatible function types from ‘void (*)(void*, const char*, double*, double, double)’ to ‘addHorizontalBargraphFun’ {aka ‘void (*)(void*, const char*, float*, float, float)’} [-Wcast-function-type]
  287 |         glue->addHorizontalBargraph = reinterpret_cast<addHorizontalBargraphFun>(addHorizontalBargraphGlueDouble);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/milk/.cache/yay/radium-git/src/radium/bin/packages/faust/compiler/../architecture/faust/gui/CGlue.h:288:37: warning: cast between incompatible function types from ‘void (*)(void*, const char*, double*, double, double)’ to ‘addVerticalBargraphFun’ {aka ‘void (*)(void*, const char*, float*, float, float)’} [-Wcast-function-type]
  288 |         glue->addVerticalBargraph = reinterpret_cast<addVerticalBargraphFun>(addVerticalBargraphGlueDouble);
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/llvm/Support/SwapByteOrder.h:17,
                 from /usr/include/llvm/ADT/Hashing.h:49,
                 from /usr/include/llvm/ADT/ArrayRef.h:12,
                 from /usr/include/llvm/Support/MemoryBuffer.h:17,
                 from /home/milk/.cache/yay/radium-git/src/radium/bin/packages/faust/compiler/generator/llvm/llvm_dsp_aux.hh:43:
/usr/include/llvm/ADT/bit.h: At global scope:
/usr/include/llvm/ADT/bit.h:64:56: error: ‘is_integral_v’ is not a member of ‘std’; did you mean ‘is_integral’?
   64 | template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
      |                                                        ^~~~~~~~~~~~~
      |                                                        is_integral
/usr/include/llvm/ADT/bit.h:64:56: error: ‘is_integral_v’ is not a member of ‘std’; did you mean ‘is_integral’?
   64 | template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
      |                                                        ^~~~~~~~~~~~~
      |                                                        is_integral
/usr/include/llvm/ADT/bit.h:64:70: error: template argument 1 is invalid
   64 | template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
      |                                                                      ^
/usr/include/llvm/ADT/bit.h:64:73: error: expected unqualified-id before ‘>’ token
   64 | template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
      |                                                                         ^
/usr/include/llvm/ADT/bit.h:109:56: error: ‘is_unsigned_v’ is not a member of ‘std’; did you mean ‘is_unsigned’?
  109 | template <typename T, typename = std::enable_if_t<std::is_unsigned_v<T>>>
      |                                                        ^~~~~~~~~~~~~
      |                                                        is_unsigned
compilation terminated due to -fmax-errors=5.
make[5]: *** [CMakeFiles/faust.dir/build.make:986: CMakeFiles/faust.dir/home/milk/.cache/yay/radium-git/src/radium/bin/packages/faust/compiler/global.cpp.o] Error 1
make[5]: Leaving directory '/home/milk/.cache/yay/radium-git/src/radium/bin/packages/faust/build/faustdir'
make[4]: *** [CMakeFiles/Makefile2:156: CMakeFiles/faust.dir/all] Error 2
make[4]: Leaving directory '/home/milk/.cache/yay/radium-git/src/radium/bin/packages/faust/build/faustdir'
make[3]: *** [Makefile:156: all] Error 2
make[3]: Leaving directory '/home/milk/.cache/yay/radium-git/src/radium/bin/packages/faust/build/faustdir'

make[2]: *** [Makefile:79: all] Error 2
make[2]: Leaving directory '/home/milk/.cache/yay/radium-git/src/radium/bin/packages/faust/build'
make[1]: *** [Makefile:33: most] Error 2
make[1]: Leaving directory '/home/milk/.cache/yay/radium-git/src/radium/bin/packages/faust'
make: *** [Makefile:860: bin/packages/deletemetorebuild] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: radium-git-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
radium-git - exit status 4
yay --answeredit none --answerdiff n --bottomup --sudoloop --answerclean n   200.01s user 20.76s system 99% cpu 3:42.74 total
kmatheussen commented 9 months ago

My guess is that you are using a too new version of LLVM, not supported by Radium yet. As a workaround, you can set INCLUDE_FAUSTDEV_BUT_NOT_LLVM="jadda" before compiling. Then you'll only get the faust interpreter backend, which is a little bit slower, but works fine.

kmatheussen commented 8 months ago

Downgrading LLVM is probably the safe solution here, but you could also try to add "-std=gnu++17" to the CXFLAGS variable in bin/packages/build.sh

mxmilkiib commented 8 months ago

I've got llvm 16.0.6 installed, Arch being a rolling release distro, but the official Arch repo also has the older llvm14 and llvm15. I can try these some point soon.

yust1n commented 8 months ago

@mxmilkiib Works with llvm15.

kmatheussen commented 8 months ago

@ust1n just upgraded Faust, so I guess it works with llvm 16 as well now. But I don't know if Arch Linux has updated yet. Probably not since there hasn't been a relase of radium with the updated faust.