Build Failure: Mixxx

by ADMIN 21 views

Introduction

Mixxx is a free and open-source DJ software that allows users to mix and scratch digital audio files. However, when trying to build Mixxx using Nixpkgs, users may encounter a build failure. In this article, we will explore the steps to reproduce the build failure, the relevant log output, and the additional context that may help resolve the issue.

Nixpkgs Version

The Nixpkgs version used in this article is Unstable (25.05).

Steps to Reproduce

To reproduce the build failure, follow these steps:

  1. Open a terminal and run the following command:

nix-shell -p 'mixxx'

2. Inside the Nix shell, run the following command to modify the `CMakeFlags`:
   ```nix
pkgs = import <nixpkgs> {}
mixxx = pkgs.mixxx.overrideAttrs (prev: {
  cmakeFlags = prev.cmakeFlags ++ [ "-DQML=OFF" ];
})

Can Hydra Reproduce this Build Failure?

Yes, Hydra can reproduce this build failure.

Link to Hydra Build Job

The link to the Hydra build job is: https://hydra.nixos.org/job/nixpkgs/staging-next/mixxx.x86_64-linux

Relevant Log Output

The relevant log output is:

(Relevant logs with modified cMakeFlags ("-DQML=OFF"))
[ 30%] Building CXX object CMakeFiles/mixxx-lib.dir/src/engine/sidechain/enginerecord.cpp.o
[ 30%] Building CXX object CMakeFiles/mixxx-lib.dir/src/engine/sidechain/enginesidechain.cpp.o
[ 30%] Building CXX object CMakeFiles/mixxx-lib.dir/src/engine/sidechain/networkinputstreamworker.cpp.o
/build/source/src/engine/sidechain/enginerecord.cpp: In member function 'QString EngineRecord::getRecordedDurationStr()':
/build/source/src/engine/sidechain/enginerecord.cpp:228:22: error: no matching function for call to 'QString::arg(quint64, int, char, int, char)'
  227 |     return QString("%1:%2")
      |            ~~~~~~~~~~~~~~~~
  228 |                  .arg(m_recordedDuration / 60, 2, 'f', 0, '0')   // minutes
      |                  ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /nix/store/cp30fin83aimfljxb5988bkn2micgi04-qtbase-6.9.0/include/QtCore/qhashfunctions.h:9,
                 from /nix/store/cp30fin83aimfljxb5988bkn2micgi04-qtbase-6.9.0/include/QtCore/qfloat16.h:10,
                 from /nix/store/cp30fin83aimfljxb5988bkn2micgi04-qtbase-6.9.0/include/QtCore/qdebug.h:14,
                 from /nix/store/cp30fin83aimfljxb5988bkn2micgi04-qtbase-6.9.0/include/QtCore/QDebug:1,
                 from /build/source/src/audio.h:3,
                 from /build/source/build/CMakeFiles/mixxx-lib.dir/cmake_pch.hxx:5,
                 from <command-line>:
/nix/store/cp30fin83aimfljxb5988bkn2micgi04-qtbase-6.9.0/include/QtCore/qstring.h:316:27: note: candidate: 'template<class T, typename std::enable_if<conjunction_v<std::disjunction<std::is_convertible<T, long long unsigned int>, std::is_convertible<T, long long int> >, std::negation<std::disjunction<std::is_same<typename std::remove_cvref<_Tp>::type, _Float16>, std::is_same<typename std::remove_cvref<_Tp>::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'
  316 |     [[nodiscard]] QString arg(T a, int fieldWidth = 0, int base = 10,
      |                           ^~~
/nix/store/cp30fin83aimfljxb5988bkn2micgi04-qtbase-6.9.0/include/QtCore/qstring.h:316:27: note:   candidate expects 4 arguments, 5 provided
/nix/store/cp30fin83aimfljxb5988bkn2micgi04-qtbase-6.9.0/include/QtCore/qstring.h:331:27: note: candidate: 'template<class T, typename std::enable_if<std::disjunction<std::is_same<typename std::remove_cvref<_Tp>::type, _Float16>, std::is_same<typename std::remove_cvref<_Tp>::type, qfloat16>, std::is_floating_point<_Tp> >::value, bool>::type <anonymous> > QString QString::arg(T, int, char, int, QChar) const'
  331 |     [[nodiscard]] QString arg(T a, int fieldWidth = 0, char format = 'g', int precision = -1,
      |                           ^~~
/nix/store/cp30fin83aimfljxb5988bkn2micgi04-qtbase-6.9.0/include/QtCore/qstring.h:331:27: note:   template argument deduction/substitution failed:
/nix/store/cp30fin83aimfljxb5988bkn2micgi04-qtbase-6.9.0/include/QtCore/qstring.h:330:50: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  330 |     template <typename T, if_floating_point<T> = true>
      |                                                  ^~~~
/nix/store/cp30fin83aimfljxb5988bkn2micgi04-qtbase-6.9.0/include/QtCore/qstring.h:336:27: note: candidate: '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> >,::is_convertible<T, QAnyStringView> >::value, bool>::type <anonymous> > QString QString::arg(const T&, int, QChar) const'
  336 |     [[nodiscard]] QString arg(const T &a, int fieldWidth = 0, QChar fillChar = u' ') const
      |                           ^~~
/nix/store/cp30fin83aimfljxb5988bkn2micgi04-qtbase-6.9.0/include/QtCore/qstring.h:336:27: note:   candidate expects 3 arguments, 5 provided
/nix/store/cp30fin83aimfljxb5988bkn2micgi04-qtbase-6.9.0/include/QtCore/qstring.h:356:5: note: candidate: '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'
  356 |     arg(Args &&...args) const
      |     ^~~
/nix/store/cp30fin83aimfljxb5988bkn2micgi04-qtbase-6.9.0/include/QtCore/qstring.h:356:5: note:   template argument deduction/substitution failed:
/nix/store/cp30fin83aimfljxb5988bkn2micgi04-qtbase-6.9.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 = {long long unsigned int, int, char, int, char}]':
/build/source/src/engine/sidechain/enginerecord.cpp:228:22:   required from here
  227 |     return QString("%1:%2")
      |            ~~~~~~~~~~~~~~~~
  228 |                  .arg(m_recordedDuration / 60, 2, 'f', 0, '0')   // minutes
      |                  ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/nix/store/cp30fin83aimfljxb5988bkn2micgi04-qtbase-6.9.0/include/QtCore/qstring.h:356:5: error: no type named<br/>
**Q&A: Build Failure in Mixxx**
=============================

**Q: What is the cause of the build failure in Mixxx?**
------------------------------------------------

A: The build failure in Mixxx is caused by a mismatch between the expected and actual number of arguments in the `QString::arg` function. This function is used to format strings, but in this case, it is being called with the wrong number of arguments.

**Q: What is the specific error message that is being displayed?**
---------------------------------------------------------

A: The specific error message that is being displayed is:

error: no matching function for call to 'QString::arg(quint64, int, char, int, char)'

This error message indicates that the `QString::arg` function is being called with the wrong number of arguments.

**Q: How can I fix this build failure?**
--------------------------------------

A: To fix this build failure, you can modify the `CMakeFlags` to disable the `QML` feature, which is causing the issue. You can do this by adding the following line to your `CMakeFlags`:
```bash
-DQML=OFF

This will disable the QML feature and allow the build to proceed.

Q: What is the upstream issue that has been fixed?

A: The upstream issue that has been fixed is this PR. This PR fixes the issue by modifying the QString::arg function to accept the correct number of arguments.

Q: How can I verify that the build failure has been fixed?

A: To verify that the build failure has been fixed, you can try building Mixxx again with the modified CMakeFlags. If the build is successful, then the issue has been fixed.

Q: What are the system metadata that are relevant to this issue?

A: The system metadata that are relevant to this issue are:

  • System: "x86_64-linux"
  • Host OS: Linux 6.14.4, NixOS, 25.05 (Warbler), 25.05.20250427.5461b7f
  • Multi-user: yes
  • Sandbox: yes
  • Version: nix-env (Nix) 2.28.2
  • Channels(root): ""
  • Nixpkgs: /nix/store/hpimnbshj9a3j18ja8hmxfsh76khxc66-source

Q: How can I notify the maintainers of this issue?

A: To notify the maintainers of this issue, you can add a comment to the issue with the following text:

@benley @bfortz

This will notify the maintainers of the issue and allow them to take action to fix it.

Q: Is this issue important to you?

A: Yes, this issue is important to me because it affects the build of Mixxx, which is a critical component of the NixOS ecosystem.