All of lore.kernel.org
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Paul Smith <paul@mad-scientist.net>
Cc: Elmar Pruesse <p@ucdenver.edu>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Reducing git size by building libgit.so
Date: Wed, 12 Jun 2019 23:31:42 +0000	[thread overview]
Message-ID: <20190612233142.GC8616@genre.crustytoothpaste.net> (raw)
In-Reply-To: <9c488ce8c1e1e6d6d4c343b0b40c8a64c8147a7f.camel@mad-scientist.net>

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

On 2019-06-12 at 13:57:43, Paul Smith wrote:
> On Tue, 2019-06-11 at 23:48 +0000, brian m. carlson wrote:
> > Also, some people install Git into their home directories, and a
> > shared library means that they'll have to use LD_LIBRARY_PATH (or
> > equivalent) to run Git.
> 
> I don't have strong feeling about .so's although obviously less disk
> space used is always a good thing, everything else being equal.
> 
> However, the above concern isn't actually an issue.  You can install
> the .so in a known location relative to the binaries, then link the
> binaries with an RPATH setting using $ORIGIN (or the equivalent on
> MacOS which does exist but I forget the name).  On Windows, DLLs are
> installed in the same directory as the binary, typically.
> 
> Allowing relocatable binaries with .so dependencies without requiring
> LD_LIBRARY_PATH settings is a solved problem, to the best of my
> understanding.

This is possible to do, but it's not especially portable.  People use
various C toolchains to compile our code, which may or may not have easy
access to linker flags.  The proper syntax also varies depending on
whether you're using ELF, Mach-O, PE[0], or another object format.  And
Debian tries hard to avoid RPATH settings[1], so we'd need to be sure to
have an option not to set it.

None of these are intractable problems, but there's not simply an easy
solution that we can magically set that will work everywhere.  If we
were using autoconf and friends exclusively, this would be easier, but
we're not.  So someone is welcome to attack these problems with a set of
patches, but I expect it to be fairly involved to get all the corner
cases right if we want to make it the default.

[0] AFAIUI, Windows doesn't have RPATH-like functionality, and from what
I've read, the same-directory behavior may be going away due to security
concerns.  I don't use Windows, so any solution there is fine as long as
Dscho is happy.
[1] https://wiki.debian.org/RpathIssue
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]

  reply	other threads:[~2019-06-13 17:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 19:52 Reducing git size by building libgit.so Elmar Pruesse
2019-06-11 23:48 ` brian m. carlson
2019-06-12  9:29   ` Duy Nguyen
2019-06-12 13:57   ` Paul Smith
2019-06-12 23:31     ` brian m. carlson [this message]
2019-06-13 19:19       ` Johannes Sixt
2019-06-13  7:51     ` Johannes Schindelin
2019-06-13 17:28       ` Paul Smith
2019-06-13 18:23         ` Junio C Hamano
2019-06-12  9:41 ` Ævar Arnfjörð Bjarmason
2019-06-12  9:46   ` Duy Nguyen
2019-06-12 10:25   ` SZEDER Gábor

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190612233142.GC8616@genre.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=p@ucdenver.edu \
    --cc=paul@mad-scientist.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.