Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qscintilla: Fix qt4 build #71646

Merged
merged 2 commits into from Oct 22, 2019

Conversation

das-g
Copy link
Member

@das-g das-g commented Oct 22, 2019

Backport of #70391

Motivation for this change

Make applications that need qscintilla and qt4 available on release 19.09

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip -s -b release-19.09"
    • not quite sure what to make of the result (see below)
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @peterhoeg

nix-review output

terminal output (click to expand)
$ git fetch --force https://github.com/NixOS/nixpkgs release-19.09:refs/nix-review/0
$ git worktree add /home/das-g/.cache/nix-review/rev-02351ddb3a528383f7e42bc4b0eda9f2f631c525-dirty-5/nixpkgs 02351ddb3a528383f7e42bc4b0eda9f2f631c525
Preparing worktree (detached HEAD 02351ddb3a5)
HEAD is now at 02351ddb3a5 Merge pull request #71600 from aanderse/zabbix
$ nix-env -f /home/das-g/.cache/nix-review/rev-02351ddb3a528383f7e42bc4b0eda9f2f631c525-dirty-5/nixpkgs -qaP --xml --out-path --show-trace
Applying `nixpkgs` diff...
<stdin>:36: trailing whitespace.
 
<stdin>:38: trailing whitespace.
 
<stdin>:38: new blank line at EOF.
+
warning: 3 lines add whitespace errors.
$ nix-env -f /home/das-g/.cache/nix-review/rev-02351ddb3a528383f7e42bc4b0eda9f2f631c525-dirty-5/nixpkgs -qaP --xml --out-path --show-trace --meta
$ nix build --no-link --keep-going --max-jobs 8 --option build-use-sandbox true -f /home/das-g/.cache/nix-review/rev-02351ddb3a528383f7e42bc4b0eda9f2f631c525-dirty-5/build.nix
warning: ignoring the user-specified setting 'sandbox', because it is a restricted setting and you are not a trusted user
builder for '/nix/store/8y51iagi8zrm6kw6415yk9mzh4zsc6jb-octave-4.3.0pre23269.drv' failed with exit code 2; last 10 log lines:
  updating oct-tex-parser.tab.cc
  updating oct-tex-parser.tab.hh
  /nix/store/p6yrqh9awh62n8h1dihim6463fkkd8aw-gnused-4.7/bin/sed: can't read libinterp/corefcn/oct-tex-parser.cc-t: No such file or directory
  make: *** [Makefile:30454: libinterp/corefcn/oct-tex-parser.h] Error 2
  make: *** Waiting for unfinished jobs....
  updating oct-parse.output
  updating oct-parse.tab.cc
  updating oct-parse.tab.hh
  /nix/store/p6yrqh9awh62n8h1dihim6463fkkd8aw-gnused-4.7/bin/sed: can't read libinterp/parse-tree/oct-parse.cc-t: No such file or directory
  make: *** [Makefile:30454: libinterp/parse-tree/oct-parse.h] Error 2
cannot build derivation '/nix/store/85n5br9l0pn4b9yfyl9cwgrs37f81dgq-env.drv': 1 dependencies couldn't be built
[0 built (1 failed)]
error: build of '/nix/store/85n5br9l0pn4b9yfyl9cwgrs37f81dgq-env.drv' failed
1 package failed to build:
octaveHg

7 package were build:
minc_widgets octave octaveFull python27Packages.qscintilla qscintilla sqliteman tortoisehg

$ nix-shell /home/das-g/.cache/nix-review/rev-02351ddb3a528383f7e42bc4b0eda9f2f631c525-dirty-5/shell.nix

questions about nix-review output
  • How can a patch that adds just one line have "3 lines" that "add whitespace errors"?
  • Was octaveHg broken independently? Should it be marked as broken?
  • Do I have to worry about warning: ignoring the user-specified setting 'sandbox', because it is a restricted setting and you are not a trusted user?

lsix and others added 2 commits October 22, 2019 10:40
(cherry picked from commit eb1cd0d)
after backporting from master to release-19.09
@peterhoeg
Copy link
Member

Running nix-review here, I see no errors and no mention of octaveHg.

@peterhoeg peterhoeg merged commit c30a7d7 into NixOS:release-19.09 Oct 22, 2019
@das-g das-g deleted the release-19.09_fix-qscintilla-qt4 branch October 22, 2019 15:56
@das-g
Copy link
Member Author

das-g commented Oct 23, 2019

Oops, maybe backporting this fix wasn't even necessary. Building QGIS on the release-19.09 and master branch fails due to a different derivation (Python package qscintilla) refusing to build with

error: Package ‘python3.7-qscintilla-2.9.4’ in /home/das-g/dev/nixos/nixpkgs/pkgs/development/python-modules/qscintilla-qt5/default.nix:36 is marked as broken, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

(use '--show-trace' to show detailed location information)

When I remove broken = true;, it fails with

/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtWidgets/qwidget.sip:28:10: fatal error: qwidget.h: No such file or directory
 #include <qwidget.h>
          ^~~~~~~~~~~
full output (click to expand)
these derivations will be built:
  /nix/store/zf8bk5msiglxw8qv97jh3pz7j99yvpri-python3.7-qscintilla-2.9.4.drv
  /nix/store/svkyv6la5vz9w4h705fk1ms2zcjc5d99-qgis-unwrapped-3.8.0.drv
  /nix/store/iap3w2i5cswwjd05zfwfh4c8wwh4w13w-qgis-3.8.0.drv
building '/nix/store/zf8bk5msiglxw8qv97jh3pz7j99yvpri-python3.7-qscintilla-2.9.4.drv'...
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
unpacking sources
unpacking source archive /nix/store/7imkmyxwg710gx6dlj3n86rkdyw6yp8l-QScintilla_gpl-2.9.4.zip
source root is QScintilla_gpl-2.9.4
setting SOURCE_DATE_EPOCH to timestamp 1482706914 of file QScintilla_gpl-2.9.4/example-Qt4Qt5/mainwindow.h
patching sources
configuring
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/bin:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/lib:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/lib/python3.7:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/lib/python3.7/site-packages:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/lib/python3.7/site-packages/PyQt5:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/lib/python3.7/site-packages/PyQt5/uic:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/lib/python3.7/site-packages/PyQt5/uic/Compiler:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/lib/python3.7/site-packages/PyQt5/uic/Loader:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/lib/python3.7/site-packages/PyQt5/uic/port_v2:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/lib/python3.7/site-packages/PyQt5/uic/port_v3:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/lib/python3.7/site-packages/PyQt5/uic/widget-plugins:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/lib/python3.7/site-packages/PyQt5-5.13.0.dist-info:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/lib/python3.7/site-packages/dbus:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/lib/python3.7/site-packages/dbus/mainloop:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/Enginio:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QAxContainer:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtAndroidExtras:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtBluetooth:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtCore:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtDBus:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtDesigner:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtGui:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtHelp:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtLocation:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtMacExtras:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtMultimedia:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtMultimediaWidgets:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtNetwork:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtNetworkAuth:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtNfc:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtOpenGL:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtPositioning:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtPrintSupport:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtQml:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtQuick:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtQuickWidgets:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtRemoteObjects:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtSensors:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtSerialPort:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtSql:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtSvg:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtTest:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtWebChannel:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtWebKit:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtWebKitWidgets:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtWebSockets:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtWidgets:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtWinExtras:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtX11Extras:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtXml:
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtXmlPatterns:
Configuring QScintilla 2.9.4...
QScintilla 2.9.4 is being used.
The QScintilla .sip files will be installed in
/nix/store/ws4dkivrzmkxmkk9q33wmam2agvwd4fv-python3.7-qscintilla-2.9.4/share/sip/PyQt5.
QScintilla will be installed in
/nix/store/ws4dkivrzmkxmkk9q33wmam2agvwd4fv-python3.7-qscintilla-2.9.4/lib/python3.7/site-packages/PyQt5.
PyQt 5.13.0 is being used.
Qt 5.12.3 is being used.
sip 4.19.18 is being used.
The sip executable is
/nix/store/w669p1cyvcf22pphdkqbjqw4b1vs0mjw-python3.7-sip-4.19.18/bin/sip.
QScintilla is being built with 'protected' redefined as 'public'.
The PEP 484 stubs will be installed in
/nix/store/ws4dkivrzmkxmkk9q33wmam2agvwd4fv-python3.7-qscintilla-2.9.4/lib/python3.7/site-packages/PyQt5.
The QScintilla API file will be installed in
/nix/store/ws4dkivrzmkxmkk9q33wmam2agvwd4fv-python3.7-qscintilla-2.9.4/api/python3.7/api/python.
Generating the C++ source for the Qsci module...
Generating the .pro file for the Qsci module...
Generating the QScintilla API file...
Generating the top-level .pro file...
Generating the Makefiles...
no configure script, doing nothing
building
build flags: SHELL=/nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin/bash
cd Qsci/ && ( test -e Makefile || /nix/store/pljfpqw4jlfpnsw9r9dnl3kfg93i36s0-qtbase-5.12.3-dev/bin/qmake -o Makefile /build/QScintilla_gpl-2.9.4/Python/Qsci/Qsci.pro ) && make -f Makefile
make[1]: Entering directory '/build/QScintilla_gpl-2.9.4/Python/Qsci'
g++ -c -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /nix/store/qffwi2748pfm94gd3f5jphillqwdwfr0-qscintilla-qt5-2.9.4/include -I/nix/store/w669p1cyvcf22pphdkqbjqw4b1vs0mjw-python3.7-sip-4.19.18/include -isystem /nix/store/zqr5sy6dxnas41s0axyhhvlqnhwj0ywk-python3-3.7.5/include/python3.7m -I/nix/store/pljfpqw4jlfpnsw9r9dnl3kfg93i36s0-qtbase-5.12.3-dev/include -I/nix/store/pljfpqw4jlfpnsw9r9dnl3kfg93i36s0-qtbase-5.12.3-dev/include/QtGui -I/nix/store/pljfpqw4jlfpnsw9r9dnl3kfg93i36s0-qtbase-5.12.3-dev/include/QtCore -I. -I/nix/store/bfdg1270vc8y55c7fmqp2dsjwpmnbckv-mesa-19.1.5-dev/include -I/nix/store/pljfpqw4jlfpnsw9r9dnl3kfg93i36s0-qtbase-5.12.3-dev/mkspecs/linux-g++ -o sipQscicmodule.o sipQscicmodule.cpp
/nix/store/c6y4kgbrk9fk2azcvm6b16631hffa5ny-python3.7-pyqt-5.13.0/share/sip/PyQt5/QtWidgets/qwidget.sip:28:10: fatal error: qwidget.h: No such file or directory
 #include <qwidget.h>
          ^~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:615: sipQscicmodule.o] Error 1
make[1]: Leaving directory '/build/QScintilla_gpl-2.9.4/Python/Qsci'
make: *** [Makefile:47: sub-Qsci-make_first-ordered] Error 2
builder for '/nix/store/zf8bk5msiglxw8qv97jh3pz7j99yvpri-python3.7-qscintilla-2.9.4.drv' failed with exit code 2
cannot build derivation '/nix/store/iap3w2i5cswwjd05zfwfh4c8wwh4w13w-qgis-3.8.0.drv': 1 dependencies couldn't be built
error: build of '/nix/store/iap3w2i5cswwjd05zfwfh4c8wwh4w13w-qgis-3.8.0.drv' failed

How should I handle that @lsix? I don't know how to fix it. Should I file an issue?

@lsix
Copy link
Member

lsix commented Oct 23, 2019

Not that long ago (about 2 weeks I guess) I had a branch ready to backport qgis bump to release-19.09 with its dependencies. I did not push it since qscintilla-qt4 build was not merged into master yet, but it was working fine.

Could #71641 solve your issue ? From a station where I cannot test the builds, it looks like it solves your problem.

If not, I’ll have a look next week (I cannot do it before, I am running on a quite limited internet connection that does not allow me to download the build dependencies)

@das-g
Copy link
Member Author

das-g commented Oct 24, 2019

Could #71641 solve your issue ? From a station where I cannot test the builds, it looks like it solves your problem.

That does indeed fix it. Thank you!

@timor
Copy link
Member

timor commented Nov 7, 2019

In contrast to #70391, this PR does not remove the broken = !withQt5 attribute from meta in qscintilla/default.nix. Is that intended?

EDIT: Ah nevermind. In this branch, it was already gone, it seems.

@willcohen willcohen mentioned this pull request Dec 14, 2021
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants