chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Don't add LIBDIR to rpath by default


From: Peter Bex
Subject: Re: [PATCH] Don't add LIBDIR to rpath by default
Date: Mon, 24 Jan 2022 08:09:14 +0100

On Sun, Jan 23, 2022 at 12:54:58PM +0100, Sören Tempel wrote:
> I recently started working on Alpine packages for Scheme software which
> I compiled with CHICKEN. While doing so, I noticed that csc(1)
> unconditionally adds $(LIBDIR) as an rpath entry by adding
> -Wl,-rpath=$(LIBDIR) to the linker flags. I find this surprising as (in
> the common case) LIBDIR should already be part of the default rpath on
> (hopefully) all systems (otherwise it doesn't make sense to install .so
> files to it). Since this rpath entry is redundant it causes a warning on
> Alpine.

Hi Sören,

Thanks for pointing this out.  If memory serves, we started adding rpath
because BSD systems require it.  They don't have a ld.so.conf or
something similar (I don't know what modern Linux uses to set the
default rpath).

Even on Linux, many people also install CHICKEN to nonstandard locations.
For instance, if you don't have root, it's very convenient to install
CHICKEN to your homedir, and in our own infrastructure we typically
install CHICKEN to /usr/local/chickens/<some-version> and then symlink
to it as /usr/local/chickens/qwiki for example, to indicate that the
CHICKEN installation for qwiki is <some-version>.  This allows us to
gradually upgrade our infrastructure.

> I was wondering if it would be possible to only add additional rpath
> entries if -deployed is given or non-host-mode is used. The attached
> git-format-patch(1) implements this. Would it be possible to integrate
> it upstream?

Given what I said above, I think simply removing the rpath entirely for
host-local builds is not the right thing to do, as changing the C flags
to include -rpath is too onerous and obscure for users to care about.

Is there a simple way of detecting whether an rpath is the default?

Cheers,
Peter

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]