guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with `direnv` package definition


From: Christopher Baines
Subject: Re: Problem with `direnv` package definition
Date: Sat, 20 Apr 2019 18:02:45 +0100
User-agent: mu4e 1.0; emacs 26.1

Tanguy Le Carrour <address@hidden> writes:

> Dear Guix
>
> As I'm still in the process of setting up my environment,
> I am not (yet) able to write and submit a patch for package `direnv`,
> so I'm sending this report instead…
>
> As mentioned on the `direnv` homepage, "direnv is compiled into
> a single static executable" [1]. As I understand it, this means that
> Go is required to build it, but not to run it.
>
> [1]: https://github.com/direnv/direnv
>
> However, in the package definition [2], 3 Go packages are listed as
> "inputs" whereas they should be listed as "native-inputs". Is this
> correct?
>
> [2]: gnu/packages/shellutils.scm

Hi Tanguy,

That sounds right to me, although there have been issues with binaries
generated with Go still referencing the Go compiler, and that's
seemingly the case with the direnv package in Guix at the moment.

There's also an important aspect of cross-compilation to these fields,
which you can read about here:

  https://www.gnu.org/software/guix/manual/en/html_node/package-Reference.html

> As I said, I'm still learning. But I've tried, and here is what I've
> done so far…
>
> I've `git clone`d the repo, ran the `guix env… guix` then `bootstrap`
> `configure` and `make` and everything seems to be fine.
> Just to make sure, I did `./pre-… guix env… direnv` then
> ran `./pre-… guix build direnv` and everything went well.
> Then I moved the direnv dependencies from inputs to native-inputs and
> build it again… and it unsurprisingly failed! The error message [3]
> does not say much… at least to me! ^_^'
>
> [3]: output of `./pre-inst-env guix build --keep-failed direnv`
>   direnv-2.15.2/version.txt
>   direnv-2.15.2/xdg.go
>   phase `unpack' succeeded after 0.0 seconds
>   starting phase `bootstrap'
>   no 'configure.ac' or anything like that, doing nothing
>   phase `bootstrap' succeeded after 0.0 seconds
>   starting phase `patch-usr-bin-file'
>   phase `patch-usr-bin-file' succeeded after 0.0 seconds
>   starting phase `patch-source-shebangs'
>   phase `patch-source-shebangs' succeeded after 0.0 seconds
>   starting phase `patch-generated-file-shebangs'
>   phase `patch-generated-file-shebangs' succeeded after 0.0 seconds
>   starting phase `build'
>   make: *** No targets specified and no makefile found.  Stop.
>   Backtrace:
>   4 (primitive-load
>       "/gnu/store/7rrxdai48si293dihzf55zn3svn…")
>   In ice-9/eval.scm:
>      191:35  3 (_ #f)
>   In srfi/srfi-1.scm:
>      863:16  2 (every1 #<procedure 71bfc0 at /gnu/store/i5ip2vy29fqpp…>
>   …)
>   In
>    /gnu/store/i5ip2vy29fqppjb4pq5isq36gqd42d89-module-import/guix/build/gn
>    u-build-system.scm:
>    799:28  1 (_ _)
>   In
>    
> /gnu/store/i5ip2vy29fqppjb4pq5isq36gqd42d89-module-import/guix/build/utils.scm:
>    616:6  0 (invoke _ . _)
>    
> /gnu/store/i5ip2vy29fqppjb4pq5isq36gqd42d89-module-import/guix/build/utils.scm:616:6:
>  In procedure invoke:
>   Throw to key `srfi-34' with args `(#<condition &invoke-error[program: 
> "make" arguments: ("-j" "8"
>   "DESTDIR=/gnu/store/dcvs8cq0ll4hcxc4x3mlcf24y1cw4ckm-direnv-2.15.2")
>   exit-status: 2 term-signal: #f stop-signal: #f] 869e80>)'.
>
>
> I've tried to read the rest of the package definition, but as I'm still
> attending Guile 1-0-1, that didn't help much!
>
> I would very much appreciate it if someone could point out my mistake!

I tried changing the inputs to native-inputs, and the package built for
me. Could you share the exact changes you made?

Chris

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]