NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.93k stars 13.95k forks source link

Build failure: qpdfview #342087

Closed foolnotion closed 1 month ago

foolnotion commented 1 month ago

Steps To Reproduce

Steps to reproduce the behavior: try to build qpdfview.

Full build log on Hydra: https://hydra.nixos.org/build/272025147

Additional context

I attempted to git bisect the issue and ended up with:

1bcca7d66b0a052b703d029c4593434b84136455 is the first bad commit
commit 1bcca7d66b0a052b703d029c4593434b84136455
Author: Wolfgang Walther <walther@technowledgy.de>
Date:   Wed Jun 12 18:31:45 2024 +0200

    qt: support structuredAttrs in qmake hook

    Tested qbs with and without __structuredAttrs.

 pkgs/development/libraries/qt-5/hooks/qmake-hook.sh         | 36 ++++++++++++++++--------------------
 pkgs/development/libraries/qt-5/hooks/qttools-setup-hook.sh |  2 +-
 pkgs/development/libraries/qt-6/hooks/qmake-hook.sh         | 28 ++++++++++++----------------
 3 files changed, 29 insertions(+), 37 deletions(-)

Looking at the log it looks like the qmakeFlags are not set/used properly, e.g. PLUGIN_INSTALL_PATH below:

make[1]: Entering directory '/build/qpdfview-0.5' g++ -c -pipe -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DAPPLICATION_VERSION=\"0.5.0\" -DWITH_SVG -DWITH_SQL -DWITH_DBUS -DPLUGIN_INSTALL_PATH=\"/usr/lib/qpdfview\" -DWITH_PDF -DPOPPLER_VERSION=\"24.02.0\" -DPDF_PLUGIN_NAME=\"libqpdfview_pdf.so\" -DWITH_PS -DLIBSPECTRE_VERSION=\"0.2.12\" -DPS_PLUGIN_NAME=\"libqpdfview_ps.so\" -DWITH_DJVU -DDJVULIBRE_VERSION=\"3.5.28\" -DDJVU_PLUGIN_NAME=\"libqpdfview_djvu.so\" -DWITH_IMAGE -DIMAGE_PLUGIN_NAME=\"libqpdfview_image.so\" -DWITH_CUPS -DCUPS_VERSION=\"2.4.10\" -DWITH_SYNCTEX -DHAS_SYNCTEX_2 -DWITH_SIGNALS -DDATA_INSTALL_PATH=\"/usr/share/qpdfview\" -DAPP_DIR_DATA_PATH=\"data\" -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_SQL_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Isynctex -Iicons -I/nix/store/4xk5njji85yszys9hg8v2mml7wp4y8k1-qtbase-5.15.14-dev/include/QtPrintSupport -I/nix/store/b76svm0rpryy2vc70mcs8al73x9d2kb2-qtsvg-5.15.14-dev/include/QtSvg -I/nix/store/4xk5njji85yszys9hg8v2mml7wp4y8k1-qtbase-5.15.14-dev/include/QtWidgets -I/nix/store/4xk5njji85yszys9hg8v2mml7wp4y8k1-qtbase-5.15.14-dev/include/QtGui -I/nix/store/4xk5njji85yszys9hg8v2mml7wp4y8k1-qtbase-5.15.14-dev/include/QtConcurrent -I/nix/store/4xk5njji85yszys9hg8v2mml7wp4y8k1-qtbase-5.15.14-dev/include/QtSql -I/nix/store/4xk5njji85yszys9hg8v2mml7wp4y8k1-qtbase-5.15.14-dev/include/QtDBus -I/nix/store/4xk5njji85yszys9hg8v2mml7wp4y8k1-qtbase-5.15.14-dev/include/QtCore -Imoc -I/nix/store/0nifpiwvav0p4nh67w5vzy3xfdy2m50g-libglvnd-1.7.0-dev/include -I/nix/store/4xk5njji85yszys9hg8v2mml7wp4y8k1-qtbase-5.15.14-dev/mkspecs/linux-g++ -o objects/settings.o sources/settings.cpp

Notify maintainers

@raskin @wolfgangwalther

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.10.10, NixOS, 24.11 (Vicuna), 24.11.20240914.c60562f`
 - multi-user?: `yes

Add a :+1: reaction to issues you find important.

wolfgangwalther commented 1 month ago

Seems like the following pattern in preConfigure is the problem:

    qmakeFlags+=(*.pro)

Should be possible to fix this by turning structuredAttrs on. Will test and see whether there are others.

wolfgangwalther commented 1 month ago

Hm. My commit is already on master and I can build qpdfview fine there. What am I missing?

foolnotion commented 1 month ago

Hm. My commit is already on master and I can build qpdfview fine there. What am I missing?

Really not sure, I get the exact failure as on Hydra, also using nixpkgs master.

wolfgangwalther commented 1 month ago

I can tell from the log that the install path is not passed correctly, but my build still succeeds. Odd. In any case, I will open a PR to fix it, hopefully you can confirm it works.