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

Nethack cross #47023

Merged
merged 5 commits into from Sep 29, 2018
Merged

Nethack cross #47023

merged 5 commits into from Sep 29, 2018

Conversation

lheckemann
Copy link
Member

@lheckemann lheckemann commented Sep 20, 2018

Motivation for this change

Allow cross-compiling nethack for a wider range of dungeon-crawling fun.

cc maintainer @abbradar

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.

Tested by building pkgsCross.aarch64-multiplatform.nethack on an x86_64 machine, copying the result to the community box, and running it.

@lheckemann
Copy link
Member Author

@GrahamcOfBorg build pkgsCross.raspberryPi.nethack pkgsCross.aarch64-multiplatform.nethack nethack nethack-qt

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: nethack, nethack-qt

The following builds were skipped because they don't evaluate on x86_64-darwin: pkgsCross.raspberryPi.nethack, pkgsCross.aarch64-multiplatform.nethack

Partial log (click to expand)

/nix/store/hj3nr3ab7xss7g0a8nyj4f8yysy7250d-qtbase-5.11.1-dev/bin/moc -o qt4plsel.moc ../win/Qt4/qt4plsel.h
/nix/store/hj3nr3ab7xss7g0a8nyj4f8yysy7250d-qtbase-5.11.1-dev/bin/moc -o qt4set.moc ../win/Qt4/qt4set.h
/nix/store/hj3nr3ab7xss7g0a8nyj4f8yysy7250d-qtbase-5.11.1-dev/bin/moc -o qt4stat.moc ../win/Qt4/qt4stat.h
[CXX] ../win/Qt4/qt4str.cpp
/nix/store/cblfnvb5rmhd2z231mqasn0brzh1hhv4-bash-4.4-p23/bin/bash: g++: command not found
make[1]: *** [Makefile:920: qt4str.o] Error 127
make[1]: Leaving directory '/private/tmp/nix-build-nethack-qt-3.6.1.drv-0/nethack-3.6.1/src'
make: *** [Makefile:155: nethack] Error 2
builder for '/nix/store/y393i5nznyipkr0g08hzs18gdkf5psai-nethack-qt-3.6.1.drv' failed with exit code 2
error: build of '/nix/store/y393i5nznyipkr0g08hzs18gdkf5psai-nethack-qt-3.6.1.drv' failed

sed \
-e 's,^QTDIR *=.*,QTDIR=${qt5.qtbase.dev},' \
-e 's,CFLAGS.*QtGui.*,CFLAGS += `pkg-config Qt5Gui --cflags`,' \
-e 's,CFLAGS+=-DCOMPRESS.*,CFLAGS+=-DCOMPRESS=\\"${gzip}/bin/gzip\\" \\\
-DCOMPRESS_EXTENSION=\\".gz\\",' \
-i sys/unix/hints/linux-qt4
''}
${lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
${buildPackages.perl}/bin/perl -p \
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a comment what you do here?

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: pkgsCross.raspberryPi.nethack, pkgsCross.aarch64-multiplatform.nethack, nethack, nethack-qt

Partial log (click to expand)

shrinking /nix/store/zdqy2cvcvnzvqfni4f95jysjsdkyq5wl-nethack-3.6.1-aarch64-unknown-linux-gnu/libexec/nethack/dlb
shrinking /nix/store/zdqy2cvcvnzvqfni4f95jysjsdkyq5wl-nethack-3.6.1-aarch64-unknown-linux-gnu/libexec/nethack/dgn_comp
shrinking /nix/store/zdqy2cvcvnzvqfni4f95jysjsdkyq5wl-nethack-3.6.1-aarch64-unknown-linux-gnu/games/lib/nethackdir/recover
shrinking /nix/store/zdqy2cvcvnzvqfni4f95jysjsdkyq5wl-nethack-3.6.1-aarch64-unknown-linux-gnu/games/lib/nethackdir/nethack
aarch64-unknown-linux-gnu-strip is /nix/store/nncs4b6jsbfzx9c8i3p27qrj3z74fh9d-aarch64-unknown-linux-gnu-binutils-2.30/bin/aarch64-unknown-linux-gnu-strip
stripping (with command aarch64-unknown-linux-gnu-strip and flags -S) in /nix/store/zdqy2cvcvnzvqfni4f95jysjsdkyq5wl-nethack-3.6.1-aarch64-unknown-linux-gnu/libexec  /nix/store/zdqy2cvcvnzvqfni4f95jysjsdkyq5wl-nethack-3.6.1-aarch64-unknown-linux-gnu/bin
patching script interpreter paths in /nix/store/zdqy2cvcvnzvqfni4f95jysjsdkyq5wl-nethack-3.6.1-aarch64-unknown-linux-gnu
/nix/store/zdqy2cvcvnzvqfni4f95jysjsdkyq5wl-nethack-3.6.1-aarch64-unknown-linux-gnu/games/nethack: interpreter directive changed from "/bin/sh" to "/nix/store/czx8vkrb9jdgjyz8qfksh10vrnqa723l-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/zdqy2cvcvnzvqfni4f95jysjsdkyq5wl-nethack-3.6.1-aarch64-unknown-linux-gnu...
error: build of '/nix/store/j3q7912ysgmgi4f0grk6zlihwpn1gd06-nethack-qt-3.6.1.drv' failed

@lheckemann
Copy link
Member Author

@GrahamcOfBorg build nethack-qt

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@lheckemann
Copy link
Member Author

@GrahamcOfBorg build nethack-qt nethack-x11 nethack

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@lheckemann
Copy link
Member Author

@GrahamcOfBorg build pkgsCross.raspberryPi.nethack pkgsCross.aarch64-multiplatform.nethack

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: nethack

Partial log (click to expand)

/nix/store/abp821niw07wf3q1c6zggl1aw044k2jb-nethack-3.6.1

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@lheckemann
Copy link
Member Author

I think this is a success now? >.< so many interleaved borg notifications

@grahamc
Copy link
Member

grahamc commented Sep 28, 2018

@lheckemann maybe re-trigger the build now, I hid all the comments.

@lheckemann
Copy link
Member Author

@GrahamcOfBorg build pkgsCross.raspberryPi.nethack pkgsCross.raspberryPi.nethack-x11 nethack-x11 nethack-qt nethack

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: pkgsCross.raspberryPi.nethack, pkgsCross.raspberryPi.nethack-x11, nethack-x11, nethack-qt, nethack

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/wbha7rl1wdrz4g7v22vi15kv23p9pc70-libSM-1.2.2-armv6l-unknown-linux-gnueabihf-doc
armv6l-unknown-linux-gnueabihf-strip is /nix/store/d49yh2v3rrvvr4784bwpfn4v1c32zzy4-armv6l-unknown-linux-gnueabihf-binutils-2.30/bin/armv6l-unknown-linux-gnueabihf-strip
patching script interpreter paths in /nix/store/wbha7rl1wdrz4g7v22vi15kv23p9pc70-libSM-1.2.2-armv6l-unknown-linux-gnueabihf-doc
checking for references to /build in /nix/store/wbha7rl1wdrz4g7v22vi15kv23p9pc70-libSM-1.2.2-armv6l-unknown-linux-gnueabihf-doc...
cannot build derivation '/nix/store/pfmfzd2a57iac58461qwzbl2dj3l76kw-libXt-1.1.5-armv6l-unknown-linux-gnueabihf.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/f0vxybfhw3wkqcpz03nhxmj97s1049y9-libXmu-1.1.2-armv6l-unknown-linux-gnueabihf.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/8vsihkhypkj8cwlvwrwwpk5xwkqcsbl6-libXpm-3.5.12-armv6l-unknown-linux-gnueabihf.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/qbzgpizsvxs0c9w96250yi0mpfjzkdv5-libXaw-1.0.13-armv6l-unknown-linux-gnueabihf.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/39agfdir72999pnvsk7cidsyf9nsd6q6-nethack-x11-3.6.1-armv6l-unknown-linux-gnueabihf.drv': 2 dependencies couldn't be built
error: build of '/nix/store/39agfdir72999pnvsk7cidsyf9nsd6q6-nethack-x11-3.6.1-armv6l-unknown-linux-gnueabihf.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: pkgsCross.raspberryPi.nethack, pkgsCross.raspberryPi.nethack-x11, nethack-x11, nethack-qt, nethack

Partial log (click to expand)

builder for '/nix/store/1ry8h3scz5vg31mk54xjn0kni3lykg7y-xcb-proto-1.12-armv6l-unknown-linux-gnueabihf.drv' failed with exit code 1
cannot build derivation '/nix/store/lgcisc1qyf23p7pq4pwkjp5r0asqawwc-libxcb-1.12-armv6l-unknown-linux-gnueabihf.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/12mpri7m5z1qb6jgcyprdwh4vqjgd83c-libX11-1.6.6-armv6l-unknown-linux-gnueabihf.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/br1q7gyjlh7w7g4s0lf669np8c61ab3b-libXext-1.3.3-armv6l-unknown-linux-gnueabihf.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/py6d3k8jni6n1kcgasgsnrfpj9l1bqj3-libXt-1.1.5-armv6l-unknown-linux-gnueabihf.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/lzzbb23sfl4xbrmrh4kji9a3yg9y9fv4-libXmu-1.1.2-armv6l-unknown-linux-gnueabihf.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/zgkghrh6dfag2xbnyck9j2v7lxr1r5nq-libXpm-3.5.12-armv6l-unknown-linux-gnueabihf.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/2wprj13ic3xka9zzzmqy3s4ma2nryff3-libXaw-1.0.13-armv6l-unknown-linux-gnueabihf.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/qa7vwwcc4j2ijh4bj9my913bkm7xqqn5-nethack-x11-3.6.1-armv6l-unknown-linux-gnueabihf.drv': 2 dependencies couldn't be built
error: build of '/nix/store/qa7vwwcc4j2ijh4bj9my913bkm7xqqn5-nethack-x11-3.6.1-armv6l-unknown-linux-gnueabihf.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: pkgsCross.raspberryPi.nethack, pkgsCross.raspberryPi.nethack-x11, nethack-qt, nethack

The following builds were skipped because they don't evaluate on x86_64-darwin: nethack-x11

Partial log (click to expand)

cannot build derivation '/nix/store/m6yax5q6v2ibmmwdkaaphnaxhzxs394r-util-linux-2.32.1-armv6l-unknown-linux-gnueabihf.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/vmjai4b3qcn5v27z457z4hy498zhyyr6-libSM-1.2.2-armv6l-unknown-linux-gnueabihf.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/3kg4mz9ryc8dpy7k88mfkiycj9b4rwy1-libX11-1.6.6-armv6l-unknown-linux-gnueabihf.drv': 8 dependencies couldn't be built
cannot build derivation '/nix/store/h6spmhhikinbb8zy0hicq7jwjh69bp8y-libXext-1.3.3-armv6l-unknown-linux-gnueabihf.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/mzr60ws9fc79bj5m8cxm6ynd3j3p7225-libXt-1.1.5-armv6l-unknown-linux-gnueabihf.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/ajk9r12hz4x6cf0irfq9wq8xj11f4vbc-libXmu-1.1.2-armv6l-unknown-linux-gnueabihf.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/4fjxxxf31xbbp0n4yrjz5blflgwf5a9m-libXpm-3.5.12-armv6l-unknown-linux-gnueabihf.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/6y3shdzk4aw7ms8brw0zgbkyr3ms23p6-libXaw-1.0.13-armv6l-unknown-linux-gnueabihf.drv': 8 dependencies couldn't be built
cannot build derivation '/nix/store/1bnpif8d6ays7wkicq516n3knhkrm3wj-nethack-x11-3.6.1-armv6l-unknown-linux-gnueabihf.drv': 7 dependencies couldn't be built
error: build of '/nix/store/1bnpif8d6ays7wkicq516n3knhkrm3wj-nethack-x11-3.6.1-armv6l-unknown-linux-gnueabihf.drv', '/nix/store/3rd3wlwspamvz0vhh8nz8aavpik7vcbs-nethack-3.6.1-armv6l-unknown-linux-gnueabihf.drv', '/nix/store/9h1b2jizjcabn5mzdmfzhpir79pa5b8i-nethack-qt-3.6.1.drv' failed

@lheckemann
Copy link
Member Author

OK, nethack-x11 fails to cross-compile because of failed dependencies, so let's try that again without x11.

@lheckemann
Copy link
Member Author

@GrahamcOfBorg build pkgsCross.raspberryPi.nethack nethack-x11 nethack-qt nethack

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: pkgsCross.raspberryPi.nethack, nethack-qt, nethack

The following builds were skipped because they don't evaluate on x86_64-darwin: nethack-x11

Partial log (click to expand)

cannot build derivation '/nix/store/lj77mn22l9q0xvfydin8z3jkvrkzq781-stdenv-darwin.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/vf10qmijhs25x1bm8k79mr24zdszxgj7-attr-2.4.47-armv6l-unknown-linux-gnueabihf.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/mqqfipgzpic9a5ka7447k2zpg8dra1kq-gmp-6.1.2-armv6l-unknown-linux-gnueabihf.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/6c0qlrk0m3cwyqgzz0yiv0zrh2p8dvg9-gzip-1.9-armv6l-unknown-linux-gnueabihf.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/9m7aiwzm96ca3m8jpflwjz9k90p99q5r-ncurses-6.1-armv6l-unknown-linux-gnueabihf.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/qppc9b7angsqahpnn01bza4kfbxhqz37-acl-2.2.52-armv6l-unknown-linux-gnueabihf.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/yb3bhm4xc7cad0ixb6sb9kq3vj58amf8-less-530-armv6l-unknown-linux-gnueabihf.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/3ykqngzaw315kg08pk2cckhxwv44xj58-coreutils-8.29-armv6l-unknown-linux-gnueabihf.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/3rd3wlwspamvz0vhh8nz8aavpik7vcbs-nethack-3.6.1-armv6l-unknown-linux-gnueabihf.drv': 5 dependencies couldn't be built
error: build of '/nix/store/3rd3wlwspamvz0vhh8nz8aavpik7vcbs-nethack-3.6.1-armv6l-unknown-linux-gnueabihf.drv', '/nix/store/9h1b2jizjcabn5mzdmfzhpir79pa5b8i-nethack-qt-3.6.1.drv' failed

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: pkgsCross.raspberryPi.nethack, nethack-x11, nethack-qt, nethack

Partial log (click to expand)

/nix/store/l2d3yihpdfbpcqrpmg8b001z0kjrxyzm-nethack-3.6.1-armv6l-unknown-linux-gnueabihf
/nix/store/xwc4fa0mcal8b5b3y0v5r8pk8jy3b2jp-nethack-x11-3.6.1
/nix/store/yhhw03ikm22nq3g7p168za6672c3a30y-nethack-qt-3.6.1
/nix/store/x6fdgb6fx85z0pw63m7n9s86dfl39i79-nethack-3.6.1

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: pkgsCross.raspberryPi.nethack, nethack-x11, nethack-qt, nethack

Partial log (click to expand)

shrinking /nix/store/66c8m92lawqdbc51wvqd95fks15fmn1n-nethack-3.6.1-armv6l-unknown-linux-gnueabihf/games/lib/nethackdir/recover
armv6l-unknown-linux-gnueabihf-strip is /nix/store/d49yh2v3rrvvr4784bwpfn4v1c32zzy4-armv6l-unknown-linux-gnueabihf-binutils-2.30/bin/armv6l-unknown-linux-gnueabihf-strip
stripping (with command armv6l-unknown-linux-gnueabihf-strip and flags -S) in /nix/store/66c8m92lawqdbc51wvqd95fks15fmn1n-nethack-3.6.1-armv6l-unknown-linux-gnueabihf/libexec  /nix/store/66c8m92lawqdbc51wvqd95fks15fmn1n-nethack-3.6.1-armv6l-unknown-linux-gnueabihf/bin
patching script interpreter paths in /nix/store/66c8m92lawqdbc51wvqd95fks15fmn1n-nethack-3.6.1-armv6l-unknown-linux-gnueabihf
/nix/store/66c8m92lawqdbc51wvqd95fks15fmn1n-nethack-3.6.1-armv6l-unknown-linux-gnueabihf/games/nethack: interpreter directive changed from "/bin/sh" to "/nix/store/czx8vkrb9jdgjyz8qfksh10vrnqa723l-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/66c8m92lawqdbc51wvqd95fks15fmn1n-nethack-3.6.1-armv6l-unknown-linux-gnueabihf...
/nix/store/66c8m92lawqdbc51wvqd95fks15fmn1n-nethack-3.6.1-armv6l-unknown-linux-gnueabihf
/nix/store/lws1gm8rrhzxjzj3ns2hxj9cb7qvx8nm-nethack-x11-3.6.1
/nix/store/2cyvgy35wvshq92114vf1jjxbflxp71q-nethack-qt-3.6.1
/nix/store/p7m951vwd2479imgj6in41azr7raa7r2-nethack-3.6.1

@lheckemann
Copy link
Member Author

The darwin failure is a problem in cross-building stdenv as well as an issue with nethack-qt that doesn't seem to be introduced by this, so we should be good to merge!

@Mic92 Mic92 merged commit 6a6b3b4 into NixOS:master Sep 29, 2018
@lheckemann lheckemann deleted the nethack-cross branch September 30, 2018 09:03
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