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

chessx: fix build #46359

Merged
merged 1 commit into from Sep 8, 2018
Merged

chessx: fix build #46359

merged 1 commit into from Sep 8, 2018

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Sep 8, 2018

Motivation for this change

See https://hydra.nixos.org/build/80998335.

Upstream doesn't support QT 5.11 ATM which broke compilation:

src/dialogs/savedialog.cpp: In constructor ‘SaveDialog::SaveDialog(QWidget*, Qt::WindowFlags)’:
src/dialogs/savedialog.cpp:37:34: error: invalid use of incomplete type ‘class QButtonGroup’
     group = new QButtonGroup(this);

The Arch community recommends to use an older QT version to fix
this (https://aur.archlinux.org/packages/chessx/).

Furthermore the QT_PLUGIN_PATH wasn't set properly which broke the
runtime since QT coudln't find the xcb plugin:

qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized.
Reinstalling the application may fix this problem.

Finally, some minor style fixes were made for consistent indentation.

Addresses #45960

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 nox --run "nox-review wip"
  • 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)
  • Fits CONTRIBUTING.md.

@xeji
Copy link
Contributor

xeji commented Sep 8, 2018

@GrahamcOfBorg build chessx

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: chessx

Partial log (click to expand)

RCC: Error in 'resources.qrc': Cannot find file 'i18n/chessx_de.qm'
RCC: Error in 'resources.qrc': Cannot find file 'i18n/chessx_fr.qm'
RCC: Error in 'resources.qrc': Cannot find file 'i18n/chessx_it.qm'
RCC: Error in 'resources.qrc': Cannot find file 'i18n/chessx_cz.qm'
RCC: Error in 'resources.qrc': Cannot find file 'i18n/chessx_ru.qm'
building
build flags: SHELL=/nix/store/cblfnvb5rmhd2z231mqasn0brzh1hhv4-bash-4.4-p23/bin/bash
make: *** No rule to make target 'mac_osx/qt_menu.nib', needed by 'release/chessx.app/Contents/Resources/qt_menu.nib'.  Stop.
builder for '/nix/store/xnz0xz03jf556dpqm1rx66sbzi1d4maj-chessx-1.4.6.drv' failed with exit code 2
error: build of '/nix/store/xnz0xz03jf556dpqm1rx66sbzi1d4maj-chessx-1.4.6.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: chessx

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/v1q03kc7xaqci64ch674iaykw1hv9v5q-chessx-1.4.6
shrinking /nix/store/v1q03kc7xaqci64ch674iaykw1hv9v5q-chessx-1.4.6/bin/.chessx-wrapped
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/v1q03kc7xaqci64ch674iaykw1hv9v5q-chessx-1.4.6/bin
patching script interpreter paths in /nix/store/v1q03kc7xaqci64ch674iaykw1hv9v5q-chessx-1.4.6
checking for references to /build in /nix/store/v1q03kc7xaqci64ch674iaykw1hv9v5q-chessx-1.4.6...
postPatchMkspecs
postPatchMkspecs
postPatchMkspecs
/nix/store/v1q03kc7xaqci64ch674iaykw1hv9v5q-chessx-1.4.6

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: chessx

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/v1q03kc7xaqci64ch674iaykw1hv9v5q-chessx-1.4.6
shrinking /nix/store/v1q03kc7xaqci64ch674iaykw1hv9v5q-chessx-1.4.6/bin/.chessx-wrapped
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/v1q03kc7xaqci64ch674iaykw1hv9v5q-chessx-1.4.6/bin
patching script interpreter paths in /nix/store/v1q03kc7xaqci64ch674iaykw1hv9v5q-chessx-1.4.6
checking for references to /build in /nix/store/v1q03kc7xaqci64ch674iaykw1hv9v5q-chessx-1.4.6...
postPatchMkspecs
postPatchMkspecs
postPatchMkspecs
/nix/store/v1q03kc7xaqci64ch674iaykw1hv9v5q-chessx-1.4.6

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: chessx

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/0qfp2k5616ssjnchyg8naif3hgci3y5y-chessx-1.4.6
shrinking /nix/store/0qfp2k5616ssjnchyg8naif3hgci3y5y-chessx-1.4.6/bin/.chessx-wrapped
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/0qfp2k5616ssjnchyg8naif3hgci3y5y-chessx-1.4.6/bin
patching script interpreter paths in /nix/store/0qfp2k5616ssjnchyg8naif3hgci3y5y-chessx-1.4.6
checking for references to /build in /nix/store/0qfp2k5616ssjnchyg8naif3hgci3y5y-chessx-1.4.6...
postPatchMkspecs
postPatchMkspecs
postPatchMkspecs
/nix/store/0qfp2k5616ssjnchyg8naif3hgci3y5y-chessx-1.4.6

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: chessx

Partial log (click to expand)

these derivations will be built:
  /nix/store/riznyzg2fw7vzadjh2sca5p21laqwb1c-chessx-1.4.6.drv
waiting for locks or build slots...
/nix/store/0qfp2k5616ssjnchyg8naif3hgci3y5y-chessx-1.4.6

@xeji
Copy link
Contributor

xeji commented Sep 8, 2018

While you're at it, can you please limit this to platforms.linux. Since the platforms attribute was missing Hydra only built it on x86_64-linux only, so we can ignore darwin for now.

@Ma27
Copy link
Member Author

Ma27 commented Sep 8, 2018

@xeji done

'';

meta = with stdenv.lib; {
homepage = http://chessx.sourceforge.net/;
description = "ChessX allows you to browse and analyse chess games";
license = licenses.gpl2;
maintainers = [maintainers.luispedro];
platform = platforms.linux;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

platforms... eval error

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ouch, good catch, thanks!

See https://hydra.nixos.org/build/80998335.

Upstream doesn't support QT 5.11 ATM which broke compilation:

```
src/dialogs/savedialog.cpp: In constructor ‘SaveDialog::SaveDialog(QWidget*, Qt::WindowFlags)’:
src/dialogs/savedialog.cpp:37:34: error: invalid use of incomplete type ‘class QButtonGroup’
     group = new QButtonGroup(this);
```

The Arch community recommends to use an older QT version to fix
this (https://aur.archlinux.org/packages/chessx/).

Furthermore the `QT_PLUGIN_PATH` wasn't set properly which broke the
runtime since QT coudln't find the `xcb` plugin:

```
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized.
Reinstalling the application may fix this problem.
```

Finally, some minor style fixes were made for consistent indentation.

Addresses NixOS#45960
@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: chessx

Partial log (click to expand)

/nix/store/0qfp2k5616ssjnchyg8naif3hgci3y5y-chessx-1.4.6

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: chessx

Partial log (click to expand)

/nix/store/v1q03kc7xaqci64ch674iaykw1hv9v5q-chessx-1.4.6

@xeji
Copy link
Contributor

xeji commented Sep 8, 2018

I see a chess board and can make a move, so this looks great. Thank you!

@xeji xeji merged commit 37032db into NixOS:master Sep 8, 2018
xeji pushed a commit that referenced this pull request Sep 8, 2018
See https://hydra.nixos.org/build/80998335.

Upstream doesn't support QT 5.11 ATM which broke compilation:

```
src/dialogs/savedialog.cpp: In constructor ‘SaveDialog::SaveDialog(QWidget*, Qt::WindowFlags)’:
src/dialogs/savedialog.cpp:37:34: error: invalid use of incomplete type ‘class QButtonGroup’
     group = new QButtonGroup(this);
```

The Arch community recommends to use an older QT version to fix
this (https://aur.archlinux.org/packages/chessx/).

Furthermore the `QT_PLUGIN_PATH` wasn't set properly which broke the
runtime since QT coudln't find the `xcb` plugin:

```
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized.
Reinstalling the application may fix this problem.
```

Finally, some minor style fixes were made for consistent indentation.

Addresses #45960

(cherry picked from commit 37032db)
@xeji
Copy link
Contributor

xeji commented Sep 8, 2018

backported: 3be4b8a

@Ma27 Ma27 deleted the fix-chessx branch September 8, 2018 12:35
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

3 participants