From: Nala Ginrut <nalaginrut@gmail.com>
To: guile-devel <guile-devel@gnu.org>
Subject: Re: Why does guile put -lgc into the linker flags?
Date: Mon, 7 Oct 2024 10:47:53 +0900 [thread overview]
Message-ID: <CAPjoZocLYHSOOe2NK6bHmzd5pQH3iFVvkC4D0tc7Hydvrma1BA@mail.gmail.com> (raw)
In-Reply-To: <87seta3g8o.fsf@wolfsden.cz>
[-- Attachment #1: Type: text/plain, Size: 1807 bytes --]
Hello,
I think the issue is that the libguile.h file does not help downstream
packages isolate themselves from libgc completely. There are many static
functions related to bdwgc in gc-inline.h, which will be combined with
downstream code as a whole to compile, similar to using gc directly in your
code.
Best regards
On Sat, Oct 5, 2024, 21:08 Tomas Volf <~@wolfsden.cz> wrote:
>
> Hello,
>
> this might be obvious to some, but I am curious why guile puts -lgc to
> the linker flags:
>
> --8<---------------cut here---------------start------------->8---
> $ guile-config link
> -L/gnu/store/mfkz7fvlfpv3ppwbkv0imb19nrf95akf-guile-3.0.9/lib
> -L/gnu/store/pr73chdirm3jc2j7npc6hqzmcwjs7l8m-libgc-8.2.4/lib -lguile-3.0
> -lgc -lpthread -ldl
> --8<---------------cut here---------------end--------------->8---
>
> Why is it necessary? My guile extension interacts only with the
> libguile, no? Even the GC-related functions are called via their scm_
> interface, I am never directly interacting with the Boehm GC. I even
> thought that the fact that Boehm GC is used is an implementation detail,
> not an ABI thing.
>
> I would have thought that just libguile linking with the libgc is
> enough, but I am far from expert in this area. So I would appreciate if
> someone could enlighten me.
>
> (I am not sure about the -lpthread and -ldl neither, but the -lgc is the
> one that caused me some problems, so I am asking about that one.)
>
> Thanks and have a nice day,
> Tomas
>
> PS: So once we switch to whippet, all extensions will need to be rebuilt
> due to linking against -lgc, which will no longer be Guile's dependency?
> So I guess .so version bump will be used for that?
>
> --
> There are only two hard things in Computer Science:
> cache invalidation, naming things and off-by-one errors.
>
[-- Attachment #2: Type: text/html, Size: 2216 bytes --]
prev parent reply other threads:[~2024-10-07 1:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-05 12:07 Why does guile put -lgc into the linker flags? Tomas Volf
2024-10-07 1:47 ` Nala Ginrut [this message]
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://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPjoZocLYHSOOe2NK6bHmzd5pQH3iFVvkC4D0tc7Hydvrma1BA@mail.gmail.com \
--to=nalaginrut@gmail.com \
--cc=guile-devel@gnu.org \
/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).