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

2022-01-29 Thread Peter Bex
On Sat, Jan 29, 2022 at 12:08:17PM +0100, Sören Tempel wrote:
> I don't think there is a semi-portable way of doing this, or at least I
> am personally not aware of one. However, maybe a Makefile configuration
> variable could be introduced specifically for creating CHICKEN Scheme
> packages for a distribution (for example as in `make PACKAGING=1
> install`)? If $PACKAGING is set it could then be assumed that $(LIBDIR)
> and other variables point to directories which are already in the
> default search path.

Hi Sören,

I think that too is too simplistic - as explained before, in for example
pkgsrc on NetBSD you still need to set the rpath, even though that's a
package manager.  And when you run pkgsrc on Linux, I suppose the rpath
might be unnecessary, strictly speaking.  So, in my opinion it doesn't
seem to be a packaging/non-packaging question.  It's more a question of
whether the libdir to be installed to happens to be in the default search
path, which is highly OS-dependent.

But, let me flip the question around: how exactly is it *wrong* to
include a "redundant" rpath?  Technically speaking, is there a good
reason to want to avoid explicitly baking in the rpath for default
search paths?

Cheers,
Peter


signature.asc
Description: PGP signature


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

2022-01-29 Thread Sören Tempel
Peter Bex  wrote:
> Hi Sören,

Hi Peter,

> > 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?

I don't think there is a semi-portable way of doing this, or at least I
am personally not aware of one. However, maybe a Makefile configuration
variable could be introduced specifically for creating CHICKEN Scheme
packages for a distribution (for example as in `make PACKAGING=1
install`)? If $PACKAGING is set it could then be assumed that $(LIBDIR)
and other variables point to directories which are already in the
default search path.

Greetings,
Sören