unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Olivier Dion via Guix-patches via <guix-patches@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>, 54780@debbugs.gnu.org
Subject: [bug#54780] [PATCH] gnu: lttng-ust: Fix dependencies.
Date: Fri, 08 Apr 2022 11:59:38 -0400	[thread overview]
Message-ID: <87sfqnva51.fsf@laura> (raw)
In-Reply-To: <7a376302aab455dae361205a491a4e5fd5bd5922.camel@telenet.be>

On Fri, 08 Apr 2022, Maxime Devos <maximedevos@telenet.be> wrote:
> Olivier Dion schreef op vr 08-04-2022 om 10:28 [-0400]:
>>  and don't fully understand it.
>
> lttn-ust probably has some header
> /gnu/store/...-lttng-unst-VERSION/include/lttng.h or the like.
> It would look something like:
>
>   [...]
>   #include <liburcu.h>
>   int lttng_foo(urcu_stuff *bar);
>   [..]
>
> Then the 'patch-header-inclusion' phase detects the #include
> <liburcu.h>, looks for include/liburcu.h in the package inputs, and
> finds /gnu/store/...-liburcu-VERSION/include/liburcu.h.  It then
> replaces liburcu.h by /gnu/store/...-liburcu-VERSION/include/liburcu.h:
>
>   [...]
>   #include </gnu/store/.../include/liburcu.h>
>   int lttng_foo(urcu_stuff *bar);
>   [...]
>
> Now, suppose I build an application dependning on lttng-ust.  Then the
> C compiler will ‘include’ 'lttng.h' in the {CROSS_,}C_INLUDE_PATH. 
> Then it sees:
>
>   #include </gnu/store/.../include/liburcu.h>
>
> Now, as this is an absolute /gnu/store/... file name, the compiler
> knows where to find it without looking into {CROSS_,}C_INCLUDE_PATH, so
> it will find the header even though it might not be in
> {CROSS_,}C_INCLUDE_PATH.
>
> It's the same system as doing some 'substitute*' to bake in the
> absolute file name of some executable into the compiled application to
> avoid relying on PATH, except applied to C headers instead of
> executables and {CROSS_,}C_CINCLUDE_PATH instead of PATH.

Okay cool!  Thanks for the details.  I will change my patch with your
substitute.

-- 
Olivier Dion
oldiob.dev




  reply	other threads:[~2022-04-08 16:01 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 [this message]
2022-04-08 17:17         ` Olivier Dion via Guix-patches via
2022-04-08 19:41           ` Maxime Devos
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=87sfqnva51.fsf@laura \
    --to=guix-patches@gnu.org \
    --cc=54780@debbugs.gnu.org \
    --cc=maximedevos@telenet.be \
    --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).