unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: Olivier Dion <olivier.dion@polymtl.ca>, 54780@debbugs.gnu.org
Subject: [bug#54780] [PATCH] gnu: lttng-ust: Fix dependencies.
Date: Fri, 08 Apr 2022 21:41:34 +0200	[thread overview]
Message-ID: <77e920c46bbecdbc2164151b0b194ef86bb54357.camel@telenet.be> (raw)
In-Reply-To: <87o81bv6iz.fsf@laura>

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

Olivier Dion schreef op vr 08-04-2022 om 13:17 [-0400]:
> --------------------
> (modify-phases %standard-phases
>          (add-after 'patch-source-shebangs 'patch-source-headers
>            (lambda* (#:key inputs #:allow-other-keys)
>              (substitute* (find-files "./include" ".h")
>                (("<(urcu/(compiler|pointer|arch|system|uatomic|config|list|tls-compat|debug|ref|rculist).h)>" _ letters _)
>                 (format #f "<~a>"
>                         (search-input-file inputs
>                                            (string-append "include/" letters))))))))

This is for the lttng-ust package, right?
The idea was to do this in a post-install phase of liburcu.

> --------------------
> 
> this seems to build the package correctly and also change the RCU
> headers for lttng-ust.  However, liburcu also include some architecture
> specific headers.  So I get the following error while compiling my
> program:
> 
> --------------------
> In file included from /gnu/store/5qk5mmffc1m9cla71jywn0qz03bk6yhi-profile/include/lttng/urcu/pointer.h:14,
>                  from /gnu/store/5qk5mmffc1m9cla71jywn0qz03bk6yhi-profile/include/lttng/tracepoint-rcu.h:11,
>                  from /gnu/store/5qk5mmffc1m9cla71jywn0qz03bk6yhi-profile/include/lttng/tracepoint.h:13,
>                  from tracepoint.h:10,
>                  from tracepoint.c:4:
> /gnu/store/25nlsljfziysgbhhj9nhwfm4qn5h4b71-liburcu-0.13.1/include/urcu/arch.h:65:10: fatal error: urcu/arch/x86.h: No such file or directory
>    65 | #include <urcu/arch/x86.h>
>       |          ^~~~~~~~~~~~~~~~~
> compilation terminated.
> --------------------
> 
> How could this be fix?   That would require to modify the inputs no?

I suggest moving the post-unpack substitute* phase from lttng-ust to a
post-install phase in liburcu.  That way, urcu/arch.h can be patched to
use an absolute file name.

Also, this ...

 (urcu/(compiler|pointer|arch|system|uatomic|config|list|tls compat|debug|ref|rculist).h)>

seems rather fragile and could easily break on future updates of lttng-ust.
The idea of the 'absolute-inclusions.scm' file I sent, is to automate things.
More concretely, my suggestion is to:

  * add absolute-inclusions.scm to the Guix repo, in guix/build
  * modify liburcu to:

  (package
    (name "liburcu")
    [...]
    (arguments
      (list #:imported-modules `(,@%gnu-build-system-modules (guix build absolute-inclusions))
            #:modules '((guix build gnu-build-system)
                        (guix build absolute-inclusions))
            #:phases
            #~(modify-phases %standard-phases
                (add-after 'install 'absolute-inclusions absolute-inclusions)))))

Greetings,
Maxime.

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

  reply	other threads:[~2022-04-08 19:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08  0:18 [bug#54780] [PATCH] gnu: lttng-ust: Fix dependencies Olivier Dion via Guix-patches via
2022-04-08 14:04 ` Maxime Devos
2022-04-08 14:23   ` Olivier Dion via Guix-patches via
2022-04-08 14:28     ` Olivier Dion via Guix-patches via
2022-04-08 15:32       ` [bug#54780] (C include header depropagation) " Maxime Devos
2022-04-08 15:39       ` Maxime Devos
2022-04-08 15:59         ` Olivier Dion via Guix-patches via
2022-04-08 17:17         ` Olivier Dion via Guix-patches via
2022-04-08 19:41           ` Maxime Devos [this message]
2022-04-08 22:56             ` Olivier Dion via Guix-patches via
2022-04-08 23:15               ` [bug#54780] [PATCH v2 1/2] guix: build: Add absolute-inclusions.scm Olivier Dion via Guix-patches via
2022-04-21 16:46                 ` [bug#54780] [PATCH v3 " Olivier Dion via Guix-patches via
2022-04-21 16:46                 ` [bug#54780] [PATCH v3 2/2] gnu: packages: Use absolute headers inclusion Olivier Dion via Guix-patches via
2022-04-08 23:15               ` [bug#54780] [PATCH v2 " Olivier Dion via Guix-patches via
2022-04-09  9:11               ` [bug#54780] [PATCH] gnu: lttng-ust: Fix dependencies Maxime Devos
2022-04-09  9:13                 ` Maxime Devos
2022-04-09 14:40                   ` Olivier Dion via Guix-patches via
2022-04-09 16:01                     ` Maxime Devos
2022-04-09 16:34                       ` Olivier Dion via Guix-patches via
2022-04-08 15:23     ` Maxime Devos
2022-05-17 20:38 ` Olivier Dion via Guix-patches via
2022-06-14 21:26   ` bug#54780: " 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

  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=77e920c46bbecdbc2164151b0b194ef86bb54357.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=54780@debbugs.gnu.org \
    --cc=olivier.dion@polymtl.ca \
    /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 public inbox

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

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).