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

Remove uses of libOnly #39683

Closed
wants to merge 13 commits into from
Closed

Conversation

matthewbauer
Copy link
Member

@matthewbauer matthewbauer commented Apr 29, 2018

We failed to get any sort of consensus on #39515 so I am opening this spinoff PR that focuses on the worst overrides offenders. Basically, a few packages rely on this legacy "libOnly" flag that tells them to only build the "library" part of the package.

What's wrong with libOnly

libOnly is an attempt to be more precise on what a package builds. The goal is to decrease closure size. Unfortunately, it's usage also means that you have to build each package twice - once for the libraries and another for the actual runtime (even though the runtime will still build the library). Since multiple outputs have been released, this is no longer the correct way to decrease closure size. Outputs like "lib" and "dev" should be used instead and mean you only have to build things once.

Current offenders

  • libpulseaudio
  • libjack2
  • libheimdal
  • libkrb5
  • libffado

Backwards compatibility

This PR retains aliases for each of the libOnly overrides so old references to "libpulseaudio", and "libjack", etc. will continue to work.

It looks like libkrb5 is still needed for bootstrapping.
@matthewbauer matthewbauer changed the title libOnly: considered harmful Remove uses of libOnly Apr 29, 2018
@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: krb5, libkrb5, pulseaudio

Partial log (click to expand)

make: *** [Makefile:1523: all-recurse] Error 1
builder for '/nix/store/5wh2j5gzqp3g36lzz30l2jzvbbj7nzkg-krb5-1.15.2.drv' failed with exit code 2
cannot build derivation '/nix/store/6a451k4z3fn78v5v1zg7mm43ybfhx9ks-curl-7.59.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/3gzd1q9244gcfsjxddnpx5hi3l3dsv2s-cyrus-sasl-2.1.26.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/wjls65bjzvxbxwnvd9jm4xsgh0x1g886-libmicrohttpd-0.9.59.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/ccl6a6j3ddyasm678b3jpr7s92n1xa6d-openldap-2.4.45.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/19ybmj7zd1ah8f9b910dhhfhlgi19kd2-krb5-1.15.2.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/7mwd9sdj1hgr3nwyxaqd80zldxiid4jq-systemd-238.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/wpq0l3pc1wx31vp34pi7wdqky8r7p2s4-pulseaudio-11.1.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/19ybmj7zd1ah8f9b910dhhfhlgi19kd2-krb5-1.15.2.drv', '/nix/store/5wh2j5gzqp3g36lzz30l2jzvbbj7nzkg-krb5-1.15.2.drv', '/nix/store/wpq0l3pc1wx31vp34pi7wdqky8r7p2s4-pulseaudio-11.1.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: krb5, libkrb5, pulseaudio

Partial log (click to expand)

/nix/store/51722z52v6mawpxvxagclrv9srl7blf9-pulseaudio-11.1/lib/pulse-11.1/modules/libprotocol-http.dylib: fixing dylib
/nix/store/51722z52v6mawpxvxagclrv9srl7blf9-pulseaudio-11.1/lib/pulse-11.1/modules/libprotocol-native.dylib: fixing dylib
/nix/store/51722z52v6mawpxvxagclrv9srl7blf9-pulseaudio-11.1/lib/pulse-11.1/modules/libprotocol-simple.dylib: fixing dylib
/nix/store/51722z52v6mawpxvxagclrv9srl7blf9-pulseaudio-11.1/lib/pulse-11.1/modules/librtp.dylib: fixing dylib
/nix/store/51722z52v6mawpxvxagclrv9srl7blf9-pulseaudio-11.1/lib/pulseaudio/libpulsecommon-11.1.dylib: fixing dylib
/nix/store/51722z52v6mawpxvxagclrv9srl7blf9-pulseaudio-11.1/lib/pulseaudio/libpulsecore-11.1.dylib: fixing dylib
strip is /nix/store/kdff2gim6417493yha769kh00n63lnrw-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/vbhj3x9sika75w0vgz5xqq9pmq5f6ifc-pulseaudio-11.1-dev/lib
patching script interpreter paths in /nix/store/vbhj3x9sika75w0vgz5xqq9pmq5f6ifc-pulseaudio-11.1-dev
error: build of '/nix/store/adacsch7b2afxbr5q7nvnsjk13xd88vp-krb5-1.15.2.drv', '/nix/store/y7hi7jrxp1xszj72zm85i9b875ynprf8-krb5-1.15.2.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: krb5, libkrb5, pulseaudio

Partial log (click to expand)

make: *** [Makefile:1523: all-recurse] Error 1
builder for '/nix/store/hkk5hrpfmjwk98rfqnv4cyjk94yzqah6-krb5-1.15.2.drv' failed with exit code 2
cannot build derivation '/nix/store/mpkzcp5j8wl49jaqac7f798r1pkcwndg-curl-7.59.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/2jsl5bg45820m5n2hicms2d6vwar5sw5-cyrus-sasl-2.1.26.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/j33rv0kdygb9cwp84ghia7j7047dfhxq-libmicrohttpd-0.9.59.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/pc9z91l5sjqc8yscp4ldvyh02m8qj33s-openldap-2.4.45.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/9cy10g8wm8b8by4sghfqqw0zflryxw63-krb5-1.15.2.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/c2y7qv64xr1ypj3f3d2di42l8m7pcbal-systemd-238.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/v5ldgwar7cfdabbklwwznn3hxsbxr1p0-pulseaudio-11.1.drv': 1 dependencies couldn't be built
error: build of '/nix/store/9cy10g8wm8b8by4sghfqqw0zflryxw63-krb5-1.15.2.drv', '/nix/store/hkk5hrpfmjwk98rfqnv4cyjk94yzqah6-krb5-1.15.2.drv', '/nix/store/v5ldgwar7cfdabbklwwznn3hxsbxr1p0-pulseaudio-11.1.drv' failed

Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

Excellent! Hopefully after these no-brainer split-outs we can get back to tackling the original problem.

@matthewbauer
Copy link
Member Author

@Ericson2314 It looks like we are getting infinite recursion with krb5 (curl depends on it, so anything using fetchurl needs it). I wonder if this is a case where we really need "libOnly"?

There are a few similar "bootstrapping" derivations that are needed for similar reasons like:

  • fetchurlBoot
  • libkrb5
  • utillinuxMinimal
  • maybe more?

It would be nice to hide these so people don't accidentally use them directly. Not sure if that is possible though.

@Ericson2314
Copy link
Member

Ericson2314 commented May 1, 2018

ugh this bootstrapping stuff is no fun. These days I'm not sure why we don't use the corepkg fetchurl more.

When we redo bootstrapping to use the cross stuff, we can finally get rid of these derivations. Making them *Boot in the meantime like you did might help us keep track of them, shrug.

@dezgeg
Copy link
Contributor

dezgeg commented May 1, 2018

Something similar is being done in #38494, might want to coordinate to avoid duplicate work.

@oxij
Copy link
Member

oxij commented May 1, 2018 via email

@matthewbauer
Copy link
Member Author

Closing because #38494 is further along.

@oxij
Copy link
Member

oxij commented May 1, 2018 via email

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

5 participants