Building SuperCollider 3.14.1 in NixOS

Hello everyone,

I’m working on updating the SuperCollider package in the nixpkgs repository. The package hasn’t been updated since version 3.13.1 and has the QtWebEngine disabled, which makes browsing local documentation somewhat limited. So far, I’ve been able to compile the language without Qt (see build_sans_qt.log), but there seem to be a few errors when compiling scide (in build_with_qt.log). The only file that I’ve changed here is the default.nix file, which I’m also posting.

I suspect that there might be some kind of subtly broken feature in Qt 6.11—unless of course if other people have managed to compile SC with Qt 6.11—though I don’t know enough C++ to say for certain. The main errors are as follows:

[ 59%] Building CXX object editors/sc-ide/CMakeFiles/libscide.dir/widgets/code_editor/overlay.cpp.o
/build/SuperCollider-3.14.1-Source/editors/sc-ide/widgets/code_editor/editor.cpp: In member function 'virtual void ScIDE::GenericCodeEditor::mousePressEvent(QMouseEvent*)':
/build/SuperCollider-3.14.1-Source/editors/sc-ide/widgets/code_editor/editor.cpp:701:46: error: no matching function for call to 'QString::arg(Qt::KeyboardModifiers)'
  701 |                                          .arg(e->modifiers())
      |                                              ^
/build/SuperCollider-3.14.1-Source/editors/sc-ide/widgets/code_editor/editor.cpp:701:46: note: there are 4 candidates
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:360:27: note: candidate 1: 'template<class T, typename std::enable_if<conjunction_v<std::disjunction<std::is_integral<_Tp>, std::conjunction<std::is_enum<_Tp>, std::negation<q23::is_scoped_enum<E, is_enum_v<E> > > > >, std::negation<std::disjunction<std::is_same<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, _Float16>, std::is_same<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, qfloat16>, std::is_floating_point<_Tp> > >, std::negation<std::conjunction<std::negation<QtPrivate::treat_as_integral_arg<typename std::remove_cv< <template-parameter-1-1> >::type> >, std::is_convertible<T, QAnyStringView> > > >, bool>::type <anonymous> > QString QString::arg(T, int, int, QChar) const'
  360 |     [[nodiscard]] QString arg(T a, int fieldWidth = 0, int base = 10,
      |                           ^~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:360:27: note: template argument deduction/substitution failed:
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:359:53: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  359 |     template <typename T, if_integral_non_char<T> = true>
      |                                                     ^~~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:375:27: note: candidate 2: 'template<class T, typename std::enable_if<std::disjunction<std::is_same<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, _Float16>, std::is_same<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, qfloat16>, std::is_floating_point<_Tp> >::value, bool>::type <anonymous> > QString QString::arg(T, int, char, int, QChar) const'
  375 |     [[nodiscard]] QString arg(T a, int fieldWidth = 0, char format = 'g', int precision = -1,
      |                           ^~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:375:27: note: template argument deduction/substitution failed:
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:374:50: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  374 |     template <typename T, if_floating_point<T> = true>
      |                                                  ^~~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:380:27: note: candidate 3: 'template<class T, typename std::enable_if<std::conjunction<std::negation<QtPrivate::treat_as_integral_arg<typename std::remove_cv< <template-parameter-1-1> >::type> >, std::is_convertible<T, QAnyStringView> >::value, bool>::type <anonymous> > QString QString::arg(const T&, int, QChar) const'
  380 |     [[nodiscard]] QString arg(const T &a, int fieldWidth = 0, QChar fillChar = u' ') const
      |                           ^~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:380:27: note: template argument deduction/substitution failed:
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:379:47: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  379 |     template <typename T, if_string_like<T> = true>
      |                                               ^~~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:400:5: note: candidate 4: 'template<class ... Args> typename std::enable_if<((sizeof... (Args) >= 2) && conjunction_v<std::conjunction<std::negation<QtPrivate::treat_as_integral_arg<typename std::remove_cv<Args>::type> >, std::is_convertible<Args, QAnyStringView> >...>), QString>::type QString::arg(Args&& ...) const'
  400 |     arg(Args &&...args) const
      |     ^~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:400:5: note: template argument deduction/substitution failed:
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h: In substitution of 'template<class ... Args> typename std::enable_if<((sizeof... (Args) >= 2) && conjunction_v<std::conjunction<std::negation<QtPrivate::treat_as_integral_arg<typename std::remove_cv<Args>::type> >, std::is_convertible<Args, QAnyStringView> >...>), QString>::type QString::arg(Args&& ...) const [with Args = {QFlags<Qt::KeyboardModifier>}]':
/build/SuperCollider-3.14.1-Source/editors/sc-ide/widgets/code_editor/editor.cpp:701:46:   required from here
  701 |                                          .arg(e->modifiers())
      |                                              ^
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:400:5: error: no type named 'type' in 'struct std::enable_if<false, QString>'
  400 |     arg(Args &&...args) const
      |     ^~~
/build/SuperCollider-3.14.1-Source/editors/sc-ide/widgets/code_editor/editor.cpp: In member function 'virtual void ScIDE::GenericCodeEditor::mouseDoubleClickEvent(QMouseEvent*)':
/build/SuperCollider-3.14.1-Source/editors/sc-ide/widgets/code_editor/editor.cpp:735:46: error: no matching function for call to 'QString::arg(Qt::KeyboardModifiers)'
  735 |                                          .arg(e->modifiers())
      |                                              ^
/build/SuperCollider-3.14.1-Source/editors/sc-ide/widgets/code_editor/editor.cpp:735:46: note: there are 4 candidates
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:360:27: note: candidate 1: 'template<class T, typename std::enable_if<conjunction_v<std::disjunction<std::is_integral<_Tp>, std::conjunction<std::is_enum<_Tp>, std::negation<q23::is_scoped_enum<E, is_enum_v<E> > > > >, std::negation<std::disjunction<std::is_same<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, _Float16>, std::is_same<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, qfloat16>, std::is_floating_point<_Tp> > >, std::negation<std::conjunction<std::negation<QtPrivate::treat_as_integral_arg<typename std::remove_cv< <template-parameter-1-1> >::type> >, std::is_convertible<T, QAnyStringView> > > >, bool>::type <anonymous> > QString QString::arg(T, int, int, QChar) const'
  360 |     [[nodiscard]] QString arg(T a, int fieldWidth = 0, int base = 10,
      |                           ^~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:360:27: note: template argument deduction/substitution failed:
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:359:53: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  359 |     template <typename T, if_integral_non_char<T> = true>
      |                                                     ^~~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:375:27: note: candidate 2: 'template<class T, typename std::enable_if<std::disjunction<std::is_same<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, _Float16>, std::is_same<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, qfloat16>, std::is_floating_point<_Tp> >::value, bool>::type <anonymous> > QString QString::arg(T, int, char, int, QChar) const'
  375 |     [[nodiscard]] QString arg(T a, int fieldWidth = 0, char format = 'g', int precision = -1,
      |                           ^~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:375:27: note: template argument deduction/substitution failed:
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:374:50: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  374 |     template <typename T, if_floating_point<T> = true>
      |                                                  ^~~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:380:27: note: candidate 3: 'template<class T, typename std::enable_if<std::conjunction<std::negation<QtPrivate::treat_as_integral_arg<typename std::remove_cv< <template-parameter-1-1> >::type> >, std::is_convertible<T, QAnyStringView> >::value, bool>::type <anonymous> > QString QString::arg(const T&, int, QChar) const'
  380 |     [[nodiscard]] QString arg(const T &a, int fieldWidth = 0, QChar fillChar = u' ') const
      |                           ^~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:380:27: note: template argument deduction/substitution failed:
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:379:47: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  379 |     template <typename T, if_string_like<T> = true>
      |                                               ^~~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:400:5: note: candidate 4: 'template<class ... Args> typename std::enable_if<((sizeof... (Args) >= 2) && conjunction_v<std::conjunction<std::negation<QtPrivate::treat_as_integral_arg<typename std::remove_cv<Args>::type> >, std::is_convertible<Args, QAnyStringView> >...>), QString>::type QString::arg(Args&& ...) const'
  400 |     arg(Args &&...args) const
      |     ^~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:400:5: note: template argument deduction/substitution failed:
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h: In substitution of 'template<class ... Args> typename std::enable_if<((sizeof... (Args) >= 2) && conjunction_v<std::conjunction<std::negation<QtPrivate::treat_as_integral_arg<typename std::remove_cv<Args>::type> >, std::is_convertible<Args, QAnyStringView> >...>), QString>::type QString::arg(Args&& ...) const [with Args = {QFlags<Qt::KeyboardModifier>}]':
/build/SuperCollider-3.14.1-Source/editors/sc-ide/widgets/code_editor/editor.cpp:735:46:   required from here
  735 |                                          .arg(e->modifiers())
      |                                              ^
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:400:5: error: no type named 'type' in 'struct std::enable_if<false, QString>'
  400 |     arg(Args &&...args) const
      |     ^~~
/build/SuperCollider-3.14.1-Source/editors/sc-ide/widgets/code_editor/editor.cpp: In member function 'virtual void ScIDE::GenericCodeEditor::mouseReleaseEvent(QMouseEvent*)':
/build/SuperCollider-3.14.1-Source/editors/sc-ide/widgets/code_editor/editor.cpp:769:46: error: no matching function for call to 'QString::arg(Qt::KeyboardModifiers)'
  769 |                                          .arg(e->modifiers())
      |                                              ^
/build/SuperCollider-3.14.1-Source/editors/sc-ide/widgets/code_editor/editor.cpp:769:46: note: there are 4 candidates
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:360:27: note: candidate 1: 'template<class T, typename std::enable_if<conjunction_v<std::disjunction<std::is_integral<_Tp>, std::conjunction<std::is_enum<_Tp>, std::negation<q23::is_scoped_enum<E, is_enum_v<E> > > > >, std::negation<std::disjunction<std::is_same<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, _Float16>, std::is_same<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, qfloat16>, std::is_floating_point<_Tp> > >, std::negation<std::conjunction<std::negation<QtPrivate::treat_as_integral_arg<typename std::remove_cv< <template-parameter-1-1> >::type> >, std::is_convertible<T, QAnyStringView> > > >, bool>::type <anonymous> > QString QString::arg(T, int, int, QChar) const'
  360 |     [[nodiscard]] QString arg(T a, int fieldWidth = 0, int base = 10,
      |                           ^~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:360:27: note: template argument deduction/substitution failed:
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:359:53: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  359 |     template <typename T, if_integral_non_char<T> = true>
      |                                                     ^~~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:375:27: note: candidate 2: 'template<class T, typename std::enable_if<std::disjunction<std::is_same<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, _Float16>, std::is_same<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, qfloat16>, std::is_floating_point<_Tp> >::value, bool>::type <anonymous> > QString QString::arg(T, int, char, int, QChar) const'
  375 |     [[nodiscard]] QString arg(T a, int fieldWidth = 0, char format = 'g', int precision = -1,
      |                           ^~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:375:27: note: template argument deduction/substitution failed:
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:374:50: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  374 |     template <typename T, if_floating_point<T> = true>
      |                                                  ^~~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:380:27: note: candidate 3: 'template<class T, typename std::enable_if<std::conjunction<std::negation<QtPrivate::treat_as_integral_arg<typename std::remove_cv< <template-parameter-1-1> >::type> >, std::is_convertible<T, QAnyStringView> >::value, bool>::type <anonymous> > QString QString::arg(const T&, int, QChar) const'
  380 |     [[nodiscard]] QString arg(const T &a, int fieldWidth = 0, QChar fillChar = u' ') const
      |                           ^~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:380:27: note: template argument deduction/substitution failed:
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:379:47: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  379 |     template <typename T, if_string_like<T> = true>
      |                                               ^~~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:400:5: note: candidate 4: 'template<class ... Args> typename std::enable_if<((sizeof... (Args) >= 2) && conjunction_v<std::conjunction<std::negation<QtPrivate::treat_as_integral_arg<typename std::remove_cv<Args>::type> >, std::is_convertible<Args, QAnyStringView> >...>), QString>::type QString::arg(Args&& ...) const'
  400 |     arg(Args &&...args) const
      |     ^~~
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:400:5: note: template argument deduction/substitution failed:
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h: In substitution of 'template<class ... Args> typename std::enable_if<((sizeof... (Args) >= 2) && conjunction_v<std::conjunction<std::negation<QtPrivate::treat_as_integral_arg<typename std::remove_cv<Args>::type> >, std::is_convertible<Args, QAnyStringView> >...>), QString>::type QString::arg(Args&& ...) const [with Args = {QFlags<Qt::KeyboardModifier>}]':
/build/SuperCollider-3.14.1-Source/editors/sc-ide/widgets/code_editor/editor.cpp:769:46:   required from here
  769 |                                          .arg(e->modifiers())
      |                                              ^
/nix/store/wzvm2pvf98a71v0scgfhmi01lqcxahfr-qtbase-6.11.0/include/QtCore/qstring.h:400:5: error: no type named 'type' in 'struct std::enable_if<false, QString>'
  400 |     arg(Args &&...args) const
      |     ^~~
[ 59%] Building CXX object lang/CMakeFiles/libsclang.dir/LangPrimSource/PyrPlatformPrim.cpp.o
[ 59%] Building CXX object editors/sc-ide/CMakeFiles/libscide.dir/widgets/code_editor/autocompleter.cpp.o
[ 59%] Building CXX object editors/sc-ide/CMakeFiles/libscide.dir/widgets/code_editor/completion_menu.cpp.o
[ 60%] Building CXX object editors/sc-ide/CMakeFiles/libscide.dir/widgets/settings/dialog.cpp.o
[ 60%] Building CXX object lang/CMakeFiles/libsclang.dir/LangPrimSource/PyrStringPrim.cpp.o
make[2]: *** [editors/sc-ide/CMakeFiles/libscide.dir/build.make:688: editors/sc-ide/CMakeFiles/libscide.dir/widgets/code_editor/editor.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

I’m out of ideas at the moment, so any suggestions would be appreciated.

default.nix.txt (3.4 KB)
build_sans_qt.log.txt (335.3 KB)
build_with_qt.log.txt (157.0 KB)

Hey,

see compilation error on slackware-current (linux) with 3.14.1 · Issue #7279 · supercollider/supercollider · GitHub

3.14.1 supports up to Qt 6.9 - if you want to use Qt 6.11 you need to use the development version or you need to apply the patch as stated here ide: Explicitly convert KeyboardModifiers to an integer type by xunil-cloud · Pull Request #7290 · supercollider/supercollider · GitHub

1 Like