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

llvm-packages: fix manpages on darwin #44164

Merged
merged 4 commits into from Jul 27, 2018
Merged

Conversation

LnL7
Copy link
Member

@LnL7 LnL7 commented Jul 27, 2018

Motivation for this change

Fixes manpages and removes .man attribute.

/cc @Ericson2314 @jwiegley

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.

@LnL7 LnL7 requested a review from FRidh as a code owner July 27, 2018 20:11
@GrahamcOfBorg GrahamcOfBorg added the 6.topic: darwin Running or building packages on Darwin label Jul 27, 2018
Copy link
Contributor

@jwiegley jwiegley left a comment

Choose a reason for hiding this comment

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

Thank you, this is much needed on Darwin.

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: llvm-manpages

Partial log (click to expand)

-- Installing: /nix/store/nxhby5bw38ccbvybq48ayx7d19md3h9a-llvm-manpages-5.0.2/share/man/man1/llvm-stress.1
-- Installing: /nix/store/nxhby5bw38ccbvybq48ayx7d19md3h9a-llvm-manpages-5.0.2/share/man/man1/llvm-symbolizer.1
-- Installing: /nix/store/nxhby5bw38ccbvybq48ayx7d19md3h9a-llvm-manpages-5.0.2/share/man/man1/opt.1
-- Installing: /nix/store/nxhby5bw38ccbvybq48ayx7d19md3h9a-llvm-manpages-5.0.2/share/man/man1/tblgen.1
make: Leaving directory '/private/tmp/nix-build-llvm-manpages-5.0.2.drv-0/llvm/build/docs'
post-installation fixup
gzipping man pages under /nix/store/nxhby5bw38ccbvybq48ayx7d19md3h9a-llvm-manpages-5.0.2/share/man/
strip is /nix/store/4q1c84f1ynfvsd85a932375sg0jc89v8-bootstrap-tools/bin/strip
patching script interpreter paths in /nix/store/nxhby5bw38ccbvybq48ayx7d19md3h9a-llvm-manpages-5.0.2
/nix/store/nxhby5bw38ccbvybq48ayx7d19md3h9a-llvm-manpages-5.0.2

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: llvm-manpages

Partial log (click to expand)

-- Installing: /nix/store/ygq2mkpcjzqfmnc9fs96dg9ajla92yzz-llvm-manpages-5.0.2/share/man/man1/llvm-build.1
-- Installing: /nix/store/ygq2mkpcjzqfmnc9fs96dg9ajla92yzz-llvm-manpages-5.0.2/share/man/man1/lit.1
make: Leaving directory '/build/llvm/build/docs'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/ygq2mkpcjzqfmnc9fs96dg9ajla92yzz-llvm-manpages-5.0.2
gzipping man pages under /nix/store/ygq2mkpcjzqfmnc9fs96dg9ajla92yzz-llvm-manpages-5.0.2/share/man/
strip is /nix/store/a245zacjzf3qw0davhvlfarihcy2yyrc-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/ygq2mkpcjzqfmnc9fs96dg9ajla92yzz-llvm-manpages-5.0.2
checking for references to /build in /nix/store/ygq2mkpcjzqfmnc9fs96dg9ajla92yzz-llvm-manpages-5.0.2...
/nix/store/ygq2mkpcjzqfmnc9fs96dg9ajla92yzz-llvm-manpages-5.0.2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: llvm-manpages

Partial log (click to expand)

-- Installing: /nix/store/5miplc1fhxxbcm1mzgwyvhjljp175902-llvm-manpages-5.0.2/share/man/man1/llvm-dis.1
-- Installing: /nix/store/5miplc1fhxxbcm1mzgwyvhjljp175902-llvm-manpages-5.0.2/share/man/man1/llvm-ar.1
make: Leaving directory '/build/llvm/build/docs'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/5miplc1fhxxbcm1mzgwyvhjljp175902-llvm-manpages-5.0.2
gzipping man pages under /nix/store/5miplc1fhxxbcm1mzgwyvhjljp175902-llvm-manpages-5.0.2/share/man/
strip is /nix/store/a3nk8z2i7m7wa3jdckgv710n7j3yx4b5-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/5miplc1fhxxbcm1mzgwyvhjljp175902-llvm-manpages-5.0.2
checking for references to /build in /nix/store/5miplc1fhxxbcm1mzgwyvhjljp175902-llvm-manpages-5.0.2...
/nix/store/5miplc1fhxxbcm1mzgwyvhjljp175902-llvm-manpages-5.0.2

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: llvm-manpages

Partial log (click to expand)

/nix/store/ygq2mkpcjzqfmnc9fs96dg9ajla92yzz-llvm-manpages-5.0.2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: llvm-manpages

Partial log (click to expand)

-- Installing: /nix/store/5miplc1fhxxbcm1mzgwyvhjljp175902-llvm-manpages-5.0.2/share/man/man1/llvm-build.1
-- Installing: /nix/store/5miplc1fhxxbcm1mzgwyvhjljp175902-llvm-manpages-5.0.2/share/man/man1/lit.1
make: Leaving directory '/build/llvm/build/docs'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/5miplc1fhxxbcm1mzgwyvhjljp175902-llvm-manpages-5.0.2
gzipping man pages under /nix/store/5miplc1fhxxbcm1mzgwyvhjljp175902-llvm-manpages-5.0.2/share/man/
strip is /nix/store/a3nk8z2i7m7wa3jdckgv710n7j3yx4b5-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/5miplc1fhxxbcm1mzgwyvhjljp175902-llvm-manpages-5.0.2
checking for references to /build in /nix/store/5miplc1fhxxbcm1mzgwyvhjljp175902-llvm-manpages-5.0.2...
/nix/store/5miplc1fhxxbcm1mzgwyvhjljp175902-llvm-manpages-5.0.2

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: llvm-manpages

Partial log (click to expand)

/nix/store/nxhby5bw38ccbvybq48ayx7d19md3h9a-llvm-manpages-5.0.2

@@ -386,7 +378,7 @@ in rec {

# Hack to avoid man pages in stdenv, building bootstrap python
Copy link
Member

Choose a reason for hiding this comment

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

Make sure you update this comment.

@@ -6213,6 +6213,7 @@ with pkgs;
};

clang = llvmPackages.clang;
clang-manpages = llvmPackages.clang-manpages;
Copy link
Member

Choose a reason for hiding this comment

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

I definitely dislike this because with basically every other package you can just do ${lib.getOutput "man" pkg}/share/man to get the manpages. I guess it's okay as a short term fix but it just seems like something to be avoided. What if we just made this clang = llvmPackages.clang-manpages? I think most users want clang with manpages & this will only be used when people are doing nix-env -iA nixpkgs.clang (stdenv uses llvmPackages directly IIRC).

Copy link
Member Author

Choose a reason for hiding this comment

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

clang and clang-manpages are 2 separate packages.

Copy link
Member Author

@LnL7 LnL7 Jul 27, 2018

Choose a reason for hiding this comment

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

Also nix-env -i clang is bad practice and doesn't even work properly. Given #24717 I actually consider this to be an advantage.

Copy link
Member

Choose a reason for hiding this comment

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

FWIW If we bind clang-manpages and clang-nomanpages, we can in a "late bind" fashion do the man output trick so that the bootstrap-persisted clang and fresh manpages are combined together

Copy link
Member

Choose a reason for hiding this comment

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

Ok I guess it is okay in this instance just because of the complications of bootstrapping/stdenv. But in general asking people to remember things like x-manpages seems like a bad idea. #24717 is definitely a bug that affects this but we shouldn't let it dictate how these things work.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm a bit reluctant to do that given the problems it's caused so far. But yes, that's an option.

LnL7 added 3 commits July 28, 2018 00:08
On darwin llvmPackages is built using python-boot to avoid dependencies
in the stdenv, but we can't and shouldn't use that when building the
manpages since it depends on python packages.
Only for the default version, we probably shouldn't be exposing
most attributes all versions.
@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: llvm-manpages

Partial log (click to expand)

/nix/store/nxhby5bw38ccbvybq48ayx7d19md3h9a-llvm-manpages-5.0.2

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: llvm-manpages

Partial log (click to expand)

/nix/store/ygq2mkpcjzqfmnc9fs96dg9ajla92yzz-llvm-manpages-5.0.2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: llvm-manpages

Partial log (click to expand)

/nix/store/5miplc1fhxxbcm1mzgwyvhjljp175902-llvm-manpages-5.0.2

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.

Per https://github.com/NixOS/nixpkgs/pull/44164/files#r205919591 we can fix .man better than it was later. Nice job matching what 6 did already, too.

@Ericson2314 Ericson2314 merged commit 574871e into NixOS:master Jul 27, 2018
@LnL7 LnL7 deleted the llvm-man-output branch July 27, 2018 23:32
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