unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Sarah Morgensen <iskarian@mgsn.dev>
To: phodina <phodina@protonmail.com>
Cc: "help-guix@gnu.org" <help-guix@gnu.org>
Subject: Re: File not found during package build
Date: Sat, 24 Jul 2021 14:52:18 -0700	[thread overview]
Message-ID: <86v94zpegd.fsf@mgsn.dev> (raw)
In-Reply-To: phodina@protonmail.com's message of "Sat, 24 Jul 2021 18:32:29 +0000"

Hello,

phodina <phodina@protonmail.com> writes:

> Hi All,
>
> during package build in the phase `check` I get a strange error regarding file not found.
>
> The file in question is an executable script within the directory.
>
> It must be present there as the chmod operation succeeds.
> However, invocation of make then fails as it can't find the script.
>
> phase `build' succeeded after 0.1 seconds
> starting phase `check'
> make: Entering directory '/tmp/guix-build-novaboot-20210126a.drv-0/source/tests'
> ./wvtool runall ./novaboot.wv ./parser.wv ./expect.wv ./server.wv ./uboot.wv
> make: ./wvtool: No such file or directory
> make: *** [Makefile:6: all] Error 127

The issue here is that wvtool begins with the shebang

  #!/usr/bin/env python3

so you'll need python in native-inputs.

>
> ---
> (define-public novaboot
> (package
>   (name "novaboot")
>   (version "20210126a")
>   (source (origin
>             (method git-fetch)
>             (uri
> 	      (git-reference
> 		(url "https://github.com/wentasah/novaboot")
> 		(commit version)))
>             (sha256
>              (base32
>               "1xwgxpngjp345fg4xmacyxm21wqvx4h6n6b51wnvivvzjj9vga4z"))))
>   (build-system gnu-build-system)
>   (inputs `(("perl" ,perl) ("perl-expect" ,perl-expect)))
>   (arguments
>     '(#:phases (modify-phases %standard-phases
> 		(delete 'configure)
> 		 (add-before 'build 'set-prefix-in-makefile
>                     (lambda* (#:key outputs #:allow-other-keys)
>                      (let ((out (assoc-ref outputs "out")))
>                         (substitute* "Makefile"
>                           (("PREFIX=.*")
>                            (string-append "PREFIX="
>                                            "\n")))
> 			(substitute* "Makefile"
> 				     (("DESTDIR=.*")
> 				      (string-append "DESTDIR=" out "\n"))))
> 		      ))
> 		 (replace 'check
> 			     (lambda* (#:key outputs #:allow-other-keys)
> 				      (chdir "tests")
> 				     (chmod "wvtool" #o555)
> 				     (invoke "make"))))))

Also, the main Makefile has a 'test' target so you can just use

  #:test-target "test"

in arguments rather than replacing the check phase.

>   (synopsis "A tool that automates booting of operating systems on target hardware or in qemu")
>   (description "Novaboot is a tool that automates booting of operating systems on target hardware (typically embedded boards) or in Qemu. Initially, it was developed to boot NOVA Microhypervisor (hence the name), but nowadays is well suited for booting Linux (and perhaps other OSes) too.")
>   (home-page "https://github.com/wentasah/novaboot")
>   (license license:gpl2)))

Hope that helps,
Sarah


             reply	other threads:[~2021-07-24 22:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-24 21:52 Sarah Morgensen [this message]
2021-07-25 19:09 ` File not found during package build phodina
  -- strict thread matches above, loose matches on Subject: below --
2021-07-24 18:32 phodina
2021-08-18 14:41 ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86v94zpegd.fsf@mgsn.dev \
    --to=iskarian@mgsn.dev \
    --cc=help-guix@gnu.org \
    --cc=phodina@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).