all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: Chadwain Holness <chadwainholness@gmail.com>, 54052@debbugs.gnu.org
Subject: [bug#54052] [PATCH] gnu: cgdb: Add gdb to propagated-inputs
Date: Sun, 20 Feb 2022 11:30:52 +0100	[thread overview]
Message-ID: <d18c61c3127492333183362db9d50e25917b3d11.camel@telenet.be> (raw)
In-Reply-To: <20220220081155.13053-1-chadwainholness@gmail.com>

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

Chadwain Holness schreef op zo 20-02-2022 om 03:11 [-0500]:
> Hello Maxime, thank you for the suggestion. Is this new patch better in your opinion?

It does look quite a bit better, but there's a cross-compilation
problem now: when cross-compiling, 'which' looks in the 'native-inputs'
instead of the 'inputs' (native-inputs = compiled for the architecture
the build is performed on, inputs = compiled for the architecture
'cgdb' will be run on).  You can use 'search-input-file' to solve this:

    (arguments
      (list
         #:phases
         #~(modify-phases %standard-phases
             (add-after 'unpack 'fix-paths
               (lambda* (#:key inputs #:allow-other-keys)
                 (define gdb (search-input-file inputs "bin/gdb"))
                 (define sh (search-input-file inputs "bin/sh"))
                 (substitute* "lib/util/fork_util.cpp"
                   (("GDB = \"gdb\"") (string-append "GDB = \"" gdb))
                   (("/bin/sh") sh)))))))

>      (inputs
> -     (list ncurses readline))
> +     (list ncurses readline gdb))

You are using a 'sh' from 'inputs' in 'fix-paths', so the package
'bash-minimal' needs to be included, otherwise the build would fail
when cross-compiling.

('bash-minimal' is an (implicit) native-input, so the build failure
would not happen when compiling natively).

To test whether cross-compiling cgdb works, you can try

  ./pre-inst-env guix build cgdb --target=aarch64-linux-gnu

(warning: this might build a cross-compiler toolchain first, which can
take quite some time, and possibly 'gdb' is not cross-compilable!)

Greetings,
Maxime.


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  reply	other threads:[~2022-02-20 10:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-18  5:20 [bug#54052] [PATCH] gnu: cgdb: Add gdb to propagated-inputs Chadwain Holness
2022-02-18  7:56 ` Maxime Devos
2022-02-20  8:11   ` Chadwain Holness
2022-02-20 10:30     ` Maxime Devos [this message]
2022-03-03 22:24       ` Ludovic Courtès
2022-03-06  6:24         ` [bug#54052] [PATCH] gnu: cgdb: Reference gdb Chadwain Holness
2022-03-06 21:13           ` bug#54052: [PATCH] gnu: cgdb: Add gdb to propagated-inputs Ludovic Courtès

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

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

  git send-email \
    --in-reply-to=d18c61c3127492333183362db9d50e25917b3d11.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=54052@debbugs.gnu.org \
    --cc=chadwainholness@gmail.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.