NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.08k stars 14.13k forks source link

python3Packages.pyside2: fails to build on nixos-unstable #91726

Closed iyra closed 4 years ago

iyra commented 4 years ago

Describe the bug nix-env -i syncplay, a package which requires PySide2, fails to install, either system-wide, nix-env local, nix-env global, or with home-manager.

To Reproduce nix-env -i syncplay

Results Running the above command:

Generating enum model (4)...                 [OK]
Generating namespace model (11)...           [OK]
Resolving typedefs (2617)...                 [OK]
qt.shiboken: (widgets) While traversing QOpenGLShaderProgram: setAttributeArray(int,const float*,int,int): Cannot use parameter 2 as an array: <array> modification already applied.
Fixing class inheritance...                  qt.shiboken: (widgets) class 'QAccessibleWidget' inherits from unknown base class 'QAccessibleActionInterface'
qt.shiboken: (widgets) class not found for setup inheritance 'QAccessibleActionInterface'
[WARNING]
Detecting inconsistencies in class model...  [OK]
[OK]
Done, (widgets) 12s, 16 warnings (1012 known issues)
[225/1234] cd /build/pyside-setup-everywhere-src-5.12.3/sources/pyside2/build/PySide2/QtCore && /nix/store/61lh89v2ygppjngh7smghz1qqk3x4xc5-cmake-3.17.2/bin/cmake -E env LD_LIBRARY_PATH=/build/pyside-setup-everywhere-src-5.12.3/sources/pyside2/build/libpyside:/nix/store/rkninbdy96wqcg5qqc3xdx9lgyzgbm9y-shiboken2-5.12.3/lib /nix/store/jli50q24fvik6pfsnjs1jd90g3dy4p6y-python3-3.8.3/bin/python3.8 /build/pyside-setup-everywhere-src-5.12.3/sources/pyside2/PySide2/QtCore/../support/generate_pyi.py run --skip --sys-path /build/pyside-setup-everywhere-src-5.12.3/sources/pyside2/build /nix/store/rkninbdy96wqcg5qqc3xdx9lgyzgbm9y-shiboken2-5.12.3/lib/python3.8/site-packages/shiboken2
FAILED: PySide2/QtCore/CMakeFiles/QtCore_pyi 
cd /build/pyside-setup-everywhere-src-5.12.3/sources/pyside2/build/PySide2/QtCore && /nix/store/61lh89v2ygppjngh7smghz1qqk3x4xc5-cmake-3.17.2/bin/cmake -E env LD_LIBRARY_PATH=/build/pyside-setup-everywhere-src-5.12.3/sources/pyside2/build/libpyside:/nix/store/rkninbdy96wqcg5qqc3xdx9lgyzgbm9y-shiboken2-5.12.3/lib /nix/store/jli50q24fvik6pfsnjs1jd90g3dy4p6y-python3-3.8.3/bin/python3.8 /build/pyside-setup-everywhere-src-5.12.3/sources/pyside2/PySide2/QtCore/../support/generate_pyi.py run --skip --sys-path /build/pyside-setup-everywhere-src-5.12.3/sources/pyside2/build /nix/store/rkninbdy96wqcg5qqc3xdx9lgyzgbm9y-shiboken2-5.12.3/lib/python3.8/site-packages/shiboken2
INFO:generate_pyi:Generated: /build/pyside-setup-everywhere-src-5.12.3/sources/pyside2/build/PySide2/QtCore.pyi
Traceback (most recent call last):
  File "/build/pyside-setup-everywhere-src-5.12.3/sources/pyside2/build/PySide2/QtCore.pyi", line 135, in <module>
    class QAbstractEventDispatcher(PySide2.QtCore.QObject):
TypeError: 'Shiboken.ObjectType' object is not iterable
Traceback (most recent call last):
  File "/build/pyside-setup-everywhere-src-5.12.3/sources/pyside2/PySide2/QtCore/../support/generate_pyi.py", line 380, in <module>
    generate_all_pyi(outpath, options=options)
  File "/build/pyside-setup-everywhere-src-5.12.3/sources/pyside2/PySide2/QtCore/../support/generate_pyi.py", line 347, in generate_all_pyi
    step = generate_pyi(import_name, outpath, options)
  File "/build/pyside-setup-everywhere-src-5.12.3/sources/pyside2/PySide2/QtCore/../support/generate_pyi.py", line 287, in generate_pyi
    subprocess.check_output([sys.executable, outfilepath])
  File "/nix/store/jli50q24fvik6pfsnjs1jd90g3dy4p6y-python3-3.8.3/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/nix/store/jli50q24fvik6pfsnjs1jd90g3dy4p6y-python3-3.8.3/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/nix/store/jli50q24fvik6pfsnjs1jd90g3dy4p6y-python3-3.8.3/bin/python3.8', '/build/pyside-setup-everywhere-src-5.12.3/sources/pyside2/build/PySide2/QtCore.pyi']' returned non-zero exit status 1.
[236/1234] Building CXX object PySide2/QtGui/CMakeFiles/QtGui.dir/PySide2/QtGui/qtextformat_wrapper.cpp.o.o.cpp.o[K[K
ninja: build stopped: subcommand failed.
builder for '/nix/store/884pih5ql9dbj94m420n6ln4bh697zxb-pyside2-5.12.3.drv' failed with exit code 1
cannot build derivation '/nix/store/3iajcz89xl2633p5ymbi5mgmv9xsapwc-syncplay-1.6.4a.drv': 1 dependencies couldn't be built
error: build of '/nix/store/3iajcz89xl2633p5ymbi5mgmv9xsapwc-syncplay-1.6.4a.drv' failed

Expected behavior Syncplay installs correctly without error.

Notify maintainers pyside2: @gebner syncplay: @Enzime

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

these paths will be fetched (0.05 MiB download, 0.28 MiB unpacked):
  /nix/store/3fd40kcri44gl9nkzn75krvh2rpgbp3n-bash-interactive-4.4-p23-dev
copying path '/nix/store/3fd40kcri44gl9nkzn75krvh2rpgbp3n-bash-interactive-4.4-p23-dev' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 5.7.4, NixOS, 20.09pre231796.22a81aa5fc1 (Nightingale)`
 - multi-user?: `no`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.6`
 - channels(root): `"nixos-20.09pre231796.22a81aa5fc1"`
 - channels(iyra): `"home-manager"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
rowanG077 commented 4 years ago

This not only affects syncplay. Many other dependencies are broken as well. Freecad for instance does not build either.

ashkitten commented 4 years ago

looks like updating pyside2 to 5.12.6 fixed this issue on my fork: https://github.com/ashkitten/nixpkgs/commit/9ad580585cea1e706fc2b7cb0e0d775b5982bca5

gebner commented 4 years ago

@ashkitten Your fix looks good to me. Could you PR it?

ashkitten commented 4 years ago

@gebner done, https://github.com/NixOS/nixpkgs/pull/92773