unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* clang-12 doesn't contain clang-extra-tools
@ 2021-08-10 10:00 Josua Stingelin
  2021-08-10 10:50 ` Carlo Zancanaro
  0 siblings, 1 reply; 3+ messages in thread
From: Josua Stingelin @ 2021-08-10 10:00 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 1921 bytes --]

Hi all,

I'm pretty new to the distribution so please forgive me if this question seems
trivial. - Also I'm not quite sure if this question belongs to guix-devel or
help-guix.

I've been trying to set up my system with some tools I use for developing to
get to know GNU Guix. One part is installing the `clangd` for c-code analysis
using the vim editor.

Now as far as I can see in `gnu/packages/llvm.scm` the definition of clang-12
contains the clang-extra-tools:

  546 (define-public clang-12
  547   (clang-from-llvm llvm-12 clang-runtime-12
  548                    "1vd9rhhrd8ghdg111lac7w8by71y9l14yh5zxfijsm6lj4p4avp2"
  549                    #:patches '("clang-11.0-libc-search-path.patch")
  550                    #:tools-extra
  551                    (origin
  552                      (method url-fetch)
  553                      (uri (llvm-uri "clang-tools-extra"
  554                                     (package-version llvm-12)))


Which then again seem to contain the `clangd` executable:

  147 (define* (clang-from-llvm llvm clang-runtime hash
  148                           #:key (patches '()) tools-extra)
  ...
  169     (outputs (if tools-extra '("out" "extra") '("out")))
  ...
  228                                 (mkdir-p bin*)
  229                                 (for-each move
  ...
  232                                             "clangd"
  ...

As far as I understand, if tools-extra is defined these get installed when
installing the 'out'-output of the package.

So basically all this compiles down to: Invoking `guix package --install=clang`
should install `clang` as well as `clangd` (among other things). -- Right?

However on my system clangd is missing after installing clang

  % find | grep clangd
  ./lib/libclangdSupport.a
  ./lib/libclangdRemoteIndex.a

Any hints as to what I'm doing wrong?

Would you accept a patch adding `clangd` as a seperate package to llvm.scm?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: clang-12 doesn't contain clang-extra-tools
  2021-08-10 10:00 clang-12 doesn't contain clang-extra-tools Josua Stingelin
@ 2021-08-10 10:50 ` Carlo Zancanaro
  2021-08-10 11:59   ` Josua Stingelin
  0 siblings, 1 reply; 3+ messages in thread
From: Carlo Zancanaro @ 2021-08-10 10:50 UTC (permalink / raw)
  To: Josua Stingelin; +Cc: help-guix

Hi Josua!

On Tue, Aug 10 2021, Josua Stingelin wrote:>
> As far as I understand, if tools-extra is defined these get 
> installed when installing the 'out'-output of the package.

This is where you're running into problems. The clangd binary is 
actually installed into the "extra" output of the package. That's 
what the move procedure is doing in the snippet you quoted.

> So basically all this compiles down to: Invoking `guix package 
> --install=clang` should install `clang` as well as `clangd` 
> (among other things). -- Right?

Since clangd is in the "extra" output, you should be able to 
install it using `guix install clang:extra`. I tried it out with 
`guix environment --ad-hoc clang@12:extra` and clangd was included 
in my PATH.

  $ guix environment --ad-hoc clang@12:extra -- which clangd
  /gnu/store/y1mnviajs1qniw0v497z66r5jr1zla9s-profile/bin/clangd

I hope that helps!

Carlo


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: clang-12 doesn't contain clang-extra-tools
  2021-08-10 10:50 ` Carlo Zancanaro
@ 2021-08-10 11:59   ` Josua Stingelin
  0 siblings, 0 replies; 3+ messages in thread
From: Josua Stingelin @ 2021-08-10 11:59 UTC (permalink / raw)
  To: Carlo Zancanaro; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

> On Tue, Aug 10 2021, Josua Stingelin wrote:>
> > As far as I understand, if tools-extra is defined these get installed
> > when installing the 'out'-output of the package.
> 
> This is where you're running into problems. The clangd binary is actually
> installed into the "extra" output of the package. That's what the move
> procedure is doing in the snippet you quoted.

Aww snap. Obviously.

Thank for the hint!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-10 11:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10 10:00 clang-12 doesn't contain clang-extra-tools Josua Stingelin
2021-08-10 10:50 ` Carlo Zancanaro
2021-08-10 11:59   ` Josua Stingelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).