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

mesa: remove darwin-specific derivations #45635

Merged
merged 2 commits into from Sep 8, 2018

Conversation

matthewbauer
Copy link
Member

The ‘mesa-darwin’ stuff was very out of date (2012). This moves darwin
to use the newer mesa. Stuff seems to build okay. Needs more testing
on other stuff though (libraries work). No drivers build but that is
how it should work on macOS.

/cc @cstrahan @Anton-Latukha

Motivation for this change

Trying to eliminate duplication in Nixpkgs.

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.

The ‘mesa-darwin’ stuff was very out of date (2012). This moves darwin
to use the newer mesa. Stuff seems to build okay. Needs more testing
on other stuff though (libraries work). No drivers build but that is
how it should work on macOS.

/cc @cstrahan @Anton-Latukha
@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: mesa

Partial log (click to expand)

/nix/store/5pmi0nipg846hnz9728db349yjp6ha7c-mesa-noglu-18.1.5/lib/libglapi.0.dylib: fixing dylib
/nix/store/5pmi0nipg846hnz9728db349yjp6ha7c-mesa-noglu-18.1.5/lib/libGLESv1_CM.1.dylib: fixing dylib
/nix/store/5pmi0nipg846hnz9728db349yjp6ha7c-mesa-noglu-18.1.5/lib/libGLESv2.2.dylib: fixing dylib
/nix/store/5pmi0nipg846hnz9728db349yjp6ha7c-mesa-noglu-18.1.5/lib/libGLX_mesa.0.dylib: fixing dylib
strip is /nix/store/vvbmqsh5ikrxkiwj71dwfbzcwf4bfav8-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/x2r74sqw1xv0bh4dyjbam74qi28100jy-mesa-noglu-18.1.5-dev/lib
patching script interpreter paths in /nix/store/x2r74sqw1xv0bh4dyjbam74qi28100jy-mesa-noglu-18.1.5-dev
strip is /nix/store/vvbmqsh5ikrxkiwj71dwfbzcwf4bfav8-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/lv7nyzld0dr50pbcd4xycnc2kf0v4rlk-mesa-noglu-18.1.5-drivers
/nix/store/5pmi0nipg846hnz9728db349yjp6ha7c-mesa-noglu-18.1.5

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: mesa

Partial log (click to expand)

stripping (with command strip and flags -S) in /nix/store/bl00x85wzjynyj87zsj0jsjs3grd75vn-mesa-noglu-18.1.5-drivers/lib
patching script interpreter paths in /nix/store/bl00x85wzjynyj87zsj0jsjs3grd75vn-mesa-noglu-18.1.5-drivers
checking for references to /build in /nix/store/bl00x85wzjynyj87zsj0jsjs3grd75vn-mesa-noglu-18.1.5-drivers...
shrinking RPATHs of ELF executables and libraries in /nix/store/cha81vqg85ra001y174v2bbz5gbqic88-mesa-noglu-18.1.5-osmesa
shrinking /nix/store/cha81vqg85ra001y174v2bbz5gbqic88-mesa-noglu-18.1.5-osmesa/lib/libOSMesa.so.8.0.0
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/cha81vqg85ra001y174v2bbz5gbqic88-mesa-noglu-18.1.5-osmesa/lib
patching script interpreter paths in /nix/store/cha81vqg85ra001y174v2bbz5gbqic88-mesa-noglu-18.1.5-osmesa
checking for references to /build in /nix/store/cha81vqg85ra001y174v2bbz5gbqic88-mesa-noglu-18.1.5-osmesa...
/nix/store/v5rad2867nb2n7ayk4k5r45d3qf9ag10-mesa-noglu-18.1.5

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: mesa

Partial log (click to expand)

stripping (with command strip and flags -S) in /nix/store/90mrdklij8yxsnrpcmq6p9zsb97gh5vf-mesa-noglu-18.1.5-drivers/lib
patching script interpreter paths in /nix/store/90mrdklij8yxsnrpcmq6p9zsb97gh5vf-mesa-noglu-18.1.5-drivers
checking for references to /build in /nix/store/90mrdklij8yxsnrpcmq6p9zsb97gh5vf-mesa-noglu-18.1.5-drivers...
shrinking RPATHs of ELF executables and libraries in /nix/store/d1hj8y5zkkrvipz4ypd5z5v3j510zlyh-mesa-noglu-18.1.5-osmesa
shrinking /nix/store/d1hj8y5zkkrvipz4ypd5z5v3j510zlyh-mesa-noglu-18.1.5-osmesa/lib/libOSMesa.so.8.0.0
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/d1hj8y5zkkrvipz4ypd5z5v3j510zlyh-mesa-noglu-18.1.5-osmesa/lib
patching script interpreter paths in /nix/store/d1hj8y5zkkrvipz4ypd5z5v3j510zlyh-mesa-noglu-18.1.5-osmesa
checking for references to /build in /nix/store/d1hj8y5zkkrvipz4ypd5z5v3j510zlyh-mesa-noglu-18.1.5-osmesa...
/nix/store/asy9mzl1iiv2ajhg021c9kxl1ngqjn77-mesa-noglu-18.1.5

@vcunat
Copy link
Member

vcunat commented Aug 30, 2018

I assume the linux rebuild is just about not passing virgl twice anymore EDIT: and other nitpicks like different order of buildInputs, mkdir -p $out/nix-support.

@vcunat
Copy link
Member

vcunat commented Aug 30, 2018

How this works on macos? The driver is provided by OS but apps are supposed/OK to use source-built mesa's libGL?

@matthewbauer matthewbauer changed the base branch from master to staging September 8, 2018 03:13
@matthewbauer
Copy link
Member Author

How this works on macos? The driver is provided by OS but apps are supposed/OK to use source-built mesa's libGL?

Yeah that looks like it. Mostly stuff like libGL and stuff are needed to compile a few dependencies.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: mesa

Partial log (click to expand)

stripping (with command strip and flags -S) in /nix/store/78r9z9m92lmm1wfrizqcy59lxnmls7fr-mesa-noglu-18.1.7-drivers/lib
patching script interpreter paths in /nix/store/78r9z9m92lmm1wfrizqcy59lxnmls7fr-mesa-noglu-18.1.7-drivers
checking for references to /build in /nix/store/78r9z9m92lmm1wfrizqcy59lxnmls7fr-mesa-noglu-18.1.7-drivers...
shrinking RPATHs of ELF executables and libraries in /nix/store/q1rvc2s724gkfh45gvx0li2fm0dnfcbp-mesa-noglu-18.1.7-osmesa
shrinking /nix/store/q1rvc2s724gkfh45gvx0li2fm0dnfcbp-mesa-noglu-18.1.7-osmesa/lib/libOSMesa.so.8.0.0
strip is /nix/store/gsywj1aslzxxlgnarpl5h73f0fj0balx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/q1rvc2s724gkfh45gvx0li2fm0dnfcbp-mesa-noglu-18.1.7-osmesa/lib
patching script interpreter paths in /nix/store/q1rvc2s724gkfh45gvx0li2fm0dnfcbp-mesa-noglu-18.1.7-osmesa
checking for references to /build in /nix/store/q1rvc2s724gkfh45gvx0li2fm0dnfcbp-mesa-noglu-18.1.7-osmesa...
/nix/store/dj5xm9hdkmk1m291a0faix3953ifsbxw-mesa-noglu-18.1.7

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: mesa

Partial log (click to expand)


=============================== warnings summary ===============================
<undetermined location>
  [pytest] section in setup.cfg files is deprecated, use [tool:pytest] instead.

-- Docs: https://docs.pytest.org/en/latest/warnings.html
============= 406 passed, 58 skipped, 1 warnings in 11.83 seconds ==============
pytestcachePhase
cannot build derivation '/nix/store/fp2wab1s9j1pg91jznds8bayjsrq19x3-mesa-noglu-18.1.7.drv': 1 dependencies couldn't be built
error: build of '/nix/store/fp2wab1s9j1pg91jznds8bayjsrq19x3-mesa-noglu-18.1.7.drv' failed

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-darwin (full log)

Attempted: mesa

Partial log (click to expand)

cannot build derivation '/nix/store/5p919faiwldcqs9ka8clwrpd1qqdm4gi-python2.7-pathlib2-2.3.2.drv': 9 dependencies couldn't be built
cannot build derivation '/nix/store/i28afda96nihh9jxq5djqkx85y58a9wr-apple-framework-CoreVideo.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/rpn119w6v8b2676rwrjnrfnagdynpqba-apple-framework-Foundation.drv': 8 dependencies couldn't be built
cannot build derivation '/nix/store/yrb8d0lq0irc5gix4rd3d6i1j43dcqdi-python2.7-pytest-3.7.4.drv': 18 dependencies couldn't be built
cannot build derivation '/nix/store/yz9n8x1cci28r46wbwkynvwp5rjxavp7-apple-framework-QuartzCore.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/7z25jqcsq8rq3ppvhagk2dfh7hyh85ny-python2.7-Mako-1.0.7.drv': 10 dependencies couldn't be built
cannot build derivation '/nix/store/sz6qzh5fyvkvgfzqvymj46zr00kpmfps-apple-framework-Carbon.drv': 9 dependencies couldn't be built
cannot build derivation '/nix/store/rd8c55w7gxx439csvjn3j3cm4zlh195p-apple-lib-Xplugin.drv': 10 dependencies couldn't be built
cannot build derivation '/nix/store/m4676l5ayahpqgzr8yffngv9an3n92p9-mesa-noglu-18.1.7.drv': 30 dependencies couldn't be built
error: build of '/nix/store/m4676l5ayahpqgzr8yffngv9an3n92p9-mesa-noglu-18.1.7.drv' failed

@vcunat
Copy link
Member

vcunat commented Sep 14, 2018

On Linux we've migrated to build-time linking just with the stub libraries provided by glvnd instead of mesa. (And the stubs are supposed to find the right real libraries during runtime).

@matthewbauer
Copy link
Member Author

Ok maybe this won't work then. May need to be reverted if it breaks stuff. My main goal here is just to get rid of the duplication (and also update the mesa version for darwin).

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