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

mpv: patch shebang for macOS #44147

Closed
wants to merge 1 commit into from
Closed

mpv: patch shebang for macOS #44147

wants to merge 1 commit into from

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Jul 27, 2018

Motivation for this change

mpv is broken as of: #43977
not sure if this works, let's wait for ofBorg....

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.

@GrahamcOfBorg GrahamcOfBorg added the 6.topic: darwin Running or building packages on Darwin label Jul 27, 2018
@Mic92
Copy link
Member Author

Mic92 commented Jul 27, 2018

@GrahamcOfBorg build mpv

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: mpv

Partial log (click to expand)

[1/1] Compiling version.sh
[  2/418] Processing osdep/macOS_swift.o osdep/macOS_swift.h osdep/macOS_swift.swiftmodule: osdep/macOS_mpv_helper.swift video/out/cocoa-cb/events_view.swift video/out/cocoa-cb/video_layer.swift video/out/cocoa-cb/window.swift video/out/cocoa_cb_common.swift -> build/osdep/macOS_swift.o build/osdep/macOS_swift.h build/osdep/macOS_swift.swiftmodule
[  3/418] Compiling TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns
/bin/sh: []: command not found

Waf: Leaving directory `/private/tmp/nix-build-mpv-0.29.0.drv-0/source/build'
Build failed
 -> task in 'osdep/macOS_swift.o osdep/macOS_swift.h osdep/macOS_swift.swiftmodule' failed with exit status 127 (run with -v to display more information)
builder for '/nix/store/d0xjwjqyxibzvnni9k0pic76zgsqadkd-mpv-0.29.0.drv' failed with exit code 1
�[31;1merror:�[0m build of '/nix/store/d0xjwjqyxibzvnni9k0pic76zgsqadkd-mpv-0.29.0.drv' failed

@Mic92
Copy link
Member Author

Mic92 commented Jul 27, 2018

apparently not.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: mpv

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/4s39d04yfzir66bq253kxqsmdbgd1cj1-mpv-0.29.0
shrinking /nix/store/4s39d04yfzir66bq253kxqsmdbgd1cj1-mpv-0.29.0/lib/libmpv.so.1.101.0
shrinking /nix/store/4s39d04yfzir66bq253kxqsmdbgd1cj1-mpv-0.29.0/bin/.mpv-wrapped
gzipping man pages under /nix/store/4s39d04yfzir66bq253kxqsmdbgd1cj1-mpv-0.29.0/share/man/
strip is /nix/store/a3nk8z2i7m7wa3jdckgv710n7j3yx4b5-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/4s39d04yfzir66bq253kxqsmdbgd1cj1-mpv-0.29.0/lib  /nix/store/4s39d04yfzir66bq253kxqsmdbgd1cj1-mpv-0.29.0/bin
patching script interpreter paths in /nix/store/4s39d04yfzir66bq253kxqsmdbgd1cj1-mpv-0.29.0
checking for references to /build in /nix/store/4s39d04yfzir66bq253kxqsmdbgd1cj1-mpv-0.29.0...
/nix/store/4s39d04yfzir66bq253kxqsmdbgd1cj1-mpv-0.29.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: mpv

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/g2fmm2gn0vydb6bsid31vkwcqccqxinv-mpv-0.29.0
shrinking /nix/store/g2fmm2gn0vydb6bsid31vkwcqccqxinv-mpv-0.29.0/lib/libmpv.so.1.101.0
shrinking /nix/store/g2fmm2gn0vydb6bsid31vkwcqccqxinv-mpv-0.29.0/bin/.mpv-wrapped
gzipping man pages under /nix/store/g2fmm2gn0vydb6bsid31vkwcqccqxinv-mpv-0.29.0/share/man/
strip is /nix/store/a245zacjzf3qw0davhvlfarihcy2yyrc-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/g2fmm2gn0vydb6bsid31vkwcqccqxinv-mpv-0.29.0/lib  /nix/store/g2fmm2gn0vydb6bsid31vkwcqccqxinv-mpv-0.29.0/bin
patching script interpreter paths in /nix/store/g2fmm2gn0vydb6bsid31vkwcqccqxinv-mpv-0.29.0
checking for references to /build in /nix/store/g2fmm2gn0vydb6bsid31vkwcqccqxinv-mpv-0.29.0...
/nix/store/g2fmm2gn0vydb6bsid31vkwcqccqxinv-mpv-0.29.0

@Mic92
Copy link
Member Author

Mic92 commented Jul 27, 2018

@GrahamcOfBorg build mpv

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: mpv

Partial log (click to expand)

[1/1] Compiling version.sh
[  2/418] Processing osdep/macOS_swift.o osdep/macOS_swift.h osdep/macOS_swift.swiftmodule: osdep/macOS_mpv_helper.swift video/out/cocoa-cb/events_view.swift video/out/cocoa-cb/video_layer.swift video/out/cocoa-cb/window.swift video/out/cocoa_cb_common.swift -> build/osdep/macOS_swift.o build/osdep/macOS_swift.h build/osdep/macOS_swift.swiftmodule
[  3/418] Compiling TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns
/bin/sh: []: command not found

Waf: Leaving directory `/private/tmp/nix-build-mpv-0.29.0.drv-0/source/build'
Build failed
 -> task in 'osdep/macOS_swift.o osdep/macOS_swift.h osdep/macOS_swift.swiftmodule' failed with exit status 127 (run with -v to display more information)
builder for '/nix/store/j3d4zf5q71hk5jjg49mnj4a9zi2alacd-mpv-0.29.0.drv' failed with exit code 1
�[31;1merror:�[0m build of '/nix/store/j3d4zf5q71hk5jjg49mnj4a9zi2alacd-mpv-0.29.0.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: mpv

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/a1dcgnlsh0al708nv742mkh94rcfyr0b-mpv-0.29.0
shrinking /nix/store/a1dcgnlsh0al708nv742mkh94rcfyr0b-mpv-0.29.0/bin/.mpv-wrapped
shrinking /nix/store/a1dcgnlsh0al708nv742mkh94rcfyr0b-mpv-0.29.0/lib/libmpv.so.1.101.0
gzipping man pages under /nix/store/a1dcgnlsh0al708nv742mkh94rcfyr0b-mpv-0.29.0/share/man/
strip is /nix/store/a3nk8z2i7m7wa3jdckgv710n7j3yx4b5-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/a1dcgnlsh0al708nv742mkh94rcfyr0b-mpv-0.29.0/lib  /nix/store/a1dcgnlsh0al708nv742mkh94rcfyr0b-mpv-0.29.0/bin
patching script interpreter paths in /nix/store/a1dcgnlsh0al708nv742mkh94rcfyr0b-mpv-0.29.0
checking for references to /build in /nix/store/a1dcgnlsh0al708nv742mkh94rcfyr0b-mpv-0.29.0...
/nix/store/a1dcgnlsh0al708nv742mkh94rcfyr0b-mpv-0.29.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: mpv

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/xs1yllzzvqhsv9g3w7jgb6wx7jiqvk64-mpv-0.29.0
shrinking /nix/store/xs1yllzzvqhsv9g3w7jgb6wx7jiqvk64-mpv-0.29.0/lib/libmpv.so.1.101.0
shrinking /nix/store/xs1yllzzvqhsv9g3w7jgb6wx7jiqvk64-mpv-0.29.0/bin/.mpv-wrapped
gzipping man pages under /nix/store/xs1yllzzvqhsv9g3w7jgb6wx7jiqvk64-mpv-0.29.0/share/man/
strip is /nix/store/a245zacjzf3qw0davhvlfarihcy2yyrc-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/xs1yllzzvqhsv9g3w7jgb6wx7jiqvk64-mpv-0.29.0/lib  /nix/store/xs1yllzzvqhsv9g3w7jgb6wx7jiqvk64-mpv-0.29.0/bin
patching script interpreter paths in /nix/store/xs1yllzzvqhsv9g3w7jgb6wx7jiqvk64-mpv-0.29.0
checking for references to /build in /nix/store/xs1yllzzvqhsv9g3w7jgb6wx7jiqvk64-mpv-0.29.0...
/nix/store/xs1yllzzvqhsv9g3w7jgb6wx7jiqvk64-mpv-0.29.0

@Mic92
Copy link
Member Author

Mic92 commented Jul 27, 2018

Sorry, I cannot debug this further without macOS. The script that is used to build this does not open a shell so the error message does not make sense to me: https://github.com/mpv-player/mpv/blob/master/wscript_build.py#L55

https://github.com/mpv-player/mpv/blob/master/TOOLS/file2string.py

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: mpv

Partial log (click to expand)

/nix/store/xs1yllzzvqhsv9g3w7jgb6wx7jiqvk64-mpv-0.29.0

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: mpv

Partial log (click to expand)

[1/1] Compiling version.sh
[  2/418] Processing osdep/macOS_swift.o osdep/macOS_swift.h osdep/macOS_swift.swiftmodule: osdep/macOS_mpv_helper.swift video/out/cocoa-cb/events_view.swift video/out/cocoa-cb/video_layer.swift video/out/cocoa-cb/window.swift video/out/cocoa_cb_common.swift -> build/osdep/macOS_swift.o build/osdep/macOS_swift.h build/osdep/macOS_swift.swiftmodule
[  3/418] Compiling TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns
/bin/sh: []: command not found

Waf: Leaving directory `/private/tmp/nix-build-mpv-0.29.0.drv-0/source/build'
Build failed
 -> task in 'osdep/macOS_swift.o osdep/macOS_swift.h osdep/macOS_swift.swiftmodule' failed with exit status 127 (run with -v to display more information)
builder for '/nix/store/j3d4zf5q71hk5jjg49mnj4a9zi2alacd-mpv-0.29.0.drv' failed with exit code 1
�[31;1merror:�[0m build of '/nix/store/j3d4zf5q71hk5jjg49mnj4a9zi2alacd-mpv-0.29.0.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: mpv

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/a1dcgnlsh0al708nv742mkh94rcfyr0b-mpv-0.29.0
shrinking /nix/store/a1dcgnlsh0al708nv742mkh94rcfyr0b-mpv-0.29.0/lib/libmpv.so.1.101.0
shrinking /nix/store/a1dcgnlsh0al708nv742mkh94rcfyr0b-mpv-0.29.0/bin/.mpv-wrapped
gzipping man pages under /nix/store/a1dcgnlsh0al708nv742mkh94rcfyr0b-mpv-0.29.0/share/man/
strip is /nix/store/a3nk8z2i7m7wa3jdckgv710n7j3yx4b5-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/a1dcgnlsh0al708nv742mkh94rcfyr0b-mpv-0.29.0/lib  /nix/store/a1dcgnlsh0al708nv742mkh94rcfyr0b-mpv-0.29.0/bin
patching script interpreter paths in /nix/store/a1dcgnlsh0al708nv742mkh94rcfyr0b-mpv-0.29.0
checking for references to /build in /nix/store/a1dcgnlsh0al708nv742mkh94rcfyr0b-mpv-0.29.0...
/nix/store/a1dcgnlsh0al708nv742mkh94rcfyr0b-mpv-0.29.0

@Enzime
Copy link
Member

Enzime commented Jul 27, 2018

The issue doesn't have to do with version.sh, it has to do with getting the swift compiler name from the environment variable which returns [] as there is no Swift in the build environment currently.

You can check this by running waf -v build.

@Mic92
Copy link
Member Author

Mic92 commented Jul 27, 2018

@Enzime if you add swift to buildInputs does it then compile for you?

@Enzime
Copy link
Member

Enzime commented Jul 27, 2018

@Mic92 Swift inside nixpkgs only supports Linux for now, I'll try and test later to see if I can get Swift to compile on macOS.

@Mic92 Mic92 deleted the mpv branch August 1, 2018 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants