* add-on lib versioning (concrete example g-wrap) -- what to do?
@ 2002-12-12 20:25 Rob Browning
2002-12-13 8:47 ` tomas
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Rob Browning @ 2002-12-12 20:25 UTC (permalink / raw)
So a concrete case for our add-on library policy which unless I'm
overlooking something obvious, raises some important questions about
our current position (which I fear may be untenable, but I'd like a
sanity check). There's a broader issue here, but practically
speaking, the question I have to answer *right now* with respect to
g-wrap is pretty straightforward.
I have to settle on versions for the libraries in the latest release
of g-wrap. There are a number of libraries, but lets consider just
one, libgwrap-glib.so, which depends on both libglib and libguile, and
it can be built against either guile1.4 or guile1.6 (and perhaps
multiple major releases of glib, but that's not relevant here).
So how do I pick the soname for this library? Say I pick 1 and then
you (the user) configures and builds gwrap against guile 1.4, and ends
up with libgwrap-glib.so.1.
OK, so presume other apps are then built against guile 1.4 and gwrap
and installed on the system. Now say you install guile 1.6 and
rebuild g-wrap against 1.6, which again produces libgwrap-glib.so.1,
but this one is linked against libguile from 1.6. Now you have a file
conflict. You can't install the new libgwrap-glib.so.1 without
breaking any apps or libs on your system that are still linked against
and using the old libgwrap-glib.so.1 and the old libguile9.
So what to do? To fix this you need to end up with two copies of
libgwrap-glib either with different names, or different sonames.
However in discussions in the past, we've rejected the first solution
-- the idea of embedding the guile version in the library name.
i.e. libguile1.6-gwrap-glib.
So that just leaves the different soname approach (i.e. compile the
guile 1.4 and guile 1.6 linked versions of libgwrap-glib with
different sonames), but how do we portably handle that? Do I pick the
soname at configure time, somehow based on the version of libguile
that libgwrap-glib is about to link against? Do all add-on libs have
to do this? If so, then all add-on libs are going to have to follow
the same restrictions that we've agreed to for internal guile libs,
which means that (1) they may *not* change their major soname during a
guile stable series, and (2) they *must* change their major soname
whenever guile has a new major release and consequently changes its
major soname. i.e. all add-on libs will have to remain in lock-step
with guile library version-wise.
Perhaps I'm wrong, but this seems like it might be restrictive enough
to significantly stifle development, and it isn't really much
different than just requiring the add-on libs to put the guile version
number in their name -- which makes the rule explicit while still
leaving the add-on libs the flexibility to change their major-soname
if they need to. Note I'm not necessarily suggesting we should switch
to the policy of embedding the guile version in the add-on lib name,
just pointing out that of the above two choices, it accomplishes
roughly the same thing and is perhaps clearer since it's more
explicit.
(Of course you could just say that you can't have two copies of gwrap
on the same system, but even so, that still leaves open the question
of how the soname should be chosen -- since even across machines of
the same arch, the same soname is supposed to indicate ABI
compatibility.)
All that said, I'm not quite sure what a better solution would be[1].
I'm just still somewhat worried that guile might be painting itself
into a corner here, though I'd love to be proven wrong.
FWIW I'd also like to point out that this is definitely a point
against guile in the broader "which language should I use for X
project" arena. I've actually seen it have a negative impact. I also
suspect that unless we address this, it's may be difficult for our
outside guile-core "add-on" base to grow and maintain much long-term
stability.
[1] The only contenders I can think ATM of are
- put the guile version in the add-on lib name.
- use a /usr/lib/guile/VERSION/ subdir for add on libs and just
figure out and deal with the -L/LD_LIBRARY_PATH/rpath issues.
- more radically, drop the idea that people will directly link via
gcc/ld against guile libs, and require some kind of run-time
dlopen/dlsym/function-pointer-patchup initialization. i.e.
scm_make_u8_vector = scm_lt_dlsym (srfi_4_lib, "scm_make_u8_vector");
or similar.
The first two are probably the least intrusive if we can work out
the details.
Thoughts?
--
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: add-on lib versioning (concrete example g-wrap) -- what to do?
2002-12-12 20:25 add-on lib versioning (concrete example g-wrap) -- what to do? Rob Browning
@ 2002-12-13 8:47 ` tomas
2002-12-13 21:37 ` Christopher Cramer
2002-12-14 16:02 ` Marius Vollmer
2 siblings, 0 replies; 6+ messages in thread
From: tomas @ 2002-12-13 8:47 UTC (permalink / raw)
Cc: guile-devel
On Thu, Dec 12, 2002 at 02:25:46PM -0600, Rob Browning wrote:
>
[good explanation of the problem of `same' add-on lib built
against different guile versions]
OK, it's me again, the guy talking about the big Pees ;-)
> [1] The only contenders I can think ATM of are
>
> - put the guile version in the add-on lib name.
Hmmm. I find library names already nearly unreadable. Imagine making a
Debian package from that...
> - use a /usr/lib/guile/VERSION/ subdir for add on libs and just
> figure out and deal with the -L/LD_LIBRARY_PATH/rpath issues.
I'd favor this way. The advantages I see:
- It's the thing ``the others'' do (Perl, Python, Emacs...). I'm not only
saying that it's tried and tested, but sysadmin's expectations play a
role here too. I'd put *any* add-on which depends on the version
in /usr/lib/guile/VERSION/, be it an .so or an .scm or whatever.
- Note that it'd be possible to put version independent stuff in
/usr/lib/guile still.
Make provision for a `local' place, be it /usr/local/lib/guile/...
(preferred) or something with .../site/...
(one could consider even doing /usr/lib/guile/MAJOR/MINOR, to be able
to put major-version-dependent stuff together, but it seems a bit like
overkill. OTOH it'd be a boon for those poor guys trying to keep several
versions of guile running, e.g. for testing purposes).
> - more radically, drop the idea that people will directly link via
> gcc/ld against guile libs, and require some kind of run-time
> dlopen/dlsym/function-pointer-patchup initialization. i.e.
If the above scheme is to work, one should consider this independently,
I'd say. Fix first the requirements and see whether the tools at hand
(ld/libtool/whatnot) do the job. Develop own tools if necessary.
> scm_make_u8_vector = scm_lt_dlsym (srfi_4_lib, "scm_make_u8_vector");
>
> or similar.
I'd consider this quite attractive, from an introspection standpoint,
but... it's me again ;-)
Regars
-- tomas
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: add-on lib versioning (concrete example g-wrap) -- what to do?
2002-12-12 20:25 add-on lib versioning (concrete example g-wrap) -- what to do? Rob Browning
2002-12-13 8:47 ` tomas
@ 2002-12-13 21:37 ` Christopher Cramer
2002-12-13 22:53 ` Rob Browning
2002-12-14 16:02 ` Marius Vollmer
2 siblings, 1 reply; 6+ messages in thread
From: Christopher Cramer @ 2002-12-13 21:37 UTC (permalink / raw)
Cc: guile-devel
On Thu, Dec 12, 2002 at 02:25:46PM -0600, Rob Browning wrote:
> FWIW I'd also like to point out that this is definitely a point
> against guile in the broader "which language should I use for X
> project" arena. I've actually seen it have a negative impact. I also
> suspect that unless we address this, it's may be difficult for our
> outside guile-core "add-on" base to grow and maintain much long-term
> stability.
What have the other languages (i.e. Perl, Python) done wrt this
problem? They have presumably made a choice already and are dealing
the consequences.
> - use a /usr/lib/guile/VERSION/ subdir for add on libs and just
> figure out and deal with the -L/LD_LIBRARY_PATH/rpath issues.
I like this solution, but I guess it might cause too many other
problems.
--
Christopher Cramer <crayc@pyro.net> <http://www.pyro.net/~crayc/>
"Gore would have finished ahead by the barest of margins had he pursued
and gained a complete statewide recount." -- Associated Press, 9/6/2002
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: add-on lib versioning (concrete example g-wrap) -- what to do?
2002-12-13 21:37 ` Christopher Cramer
@ 2002-12-13 22:53 ` Rob Browning
0 siblings, 0 replies; 6+ messages in thread
From: Rob Browning @ 2002-12-13 22:53 UTC (permalink / raw)
Christopher Cramer <crayc@pyro.net> writes:
> What have the other languages (i.e. Perl, Python) done wrt this
> problem? They have presumably made a choice already and are dealing
> the consequences.
AFAIK they don't really have the problem because they just don't
encourage direct C linking to add-on libs for things like
scm_make_u8_vector or gwrap_foo. So they can just put .so's in
lib/perl* or lib/perl*/VERSION and not worry about it.
I presume that if you did try to create a C library that linked
against libperl which exported perl_do_something () for public use via
plain vanilla -L/-l linking, you'd have exactly the same problem.
--
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: add-on lib versioning (concrete example g-wrap) -- what to do?
2002-12-12 20:25 add-on lib versioning (concrete example g-wrap) -- what to do? Rob Browning
2002-12-13 8:47 ` tomas
2002-12-13 21:37 ` Christopher Cramer
@ 2002-12-14 16:02 ` Marius Vollmer
2002-12-14 18:47 ` Rob Browning
2 siblings, 1 reply; 6+ messages in thread
From: Marius Vollmer @ 2002-12-14 16:02 UTC (permalink / raw)
Cc: guile-devel
Rob Browning <rlb@defaultvalue.org> writes:
> FWIW I'd also like to point out that this is definitely a point
> against guile in the broader "which language should I use for X
> project" arena. I've actually seen it have a negative impact. I also
> suspect that unless we address this, it's may be difficult for our
> outside guile-core "add-on" base to grow and maintain much long-term
> stability.
But is it a genuine Guile problem? What is the difference between
libguile and, say, libX11? Libguile is changing incompatibly much
more often than libX11 is, and people don't want to have multiple
incompatible versions of libX11 on their system simultaneously.
So we should probably works towards that as well: we should give
people no reason to want to compile new software against Guile 1.4.
Why do they want this?
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: add-on lib versioning (concrete example g-wrap) -- what to do?
2002-12-14 16:02 ` Marius Vollmer
@ 2002-12-14 18:47 ` Rob Browning
0 siblings, 0 replies; 6+ messages in thread
From: Rob Browning @ 2002-12-14 18:47 UTC (permalink / raw)
Cc: guile-devel
Marius Vollmer <mvo@zagadka.ping.de> writes:
> But is it a genuine Guile problem? What is the difference between
> libguile and, say, libX11? Libguile is changing incompatibly much
> more often than libX11 is, and people don't want to have multiple
> incompatible versions of libX11 on their system simultaneously.
Actually I don't know enough about X11's API and protocols to address
that issue clearly, but as I recall, the X11R5 to R6 transition was a
big pain and wouldn't be something people would be likely to want to
revisit with each upstream release. i.e. it's OK to do it once every
so many years, but not with each release. The same applied for the
libc5 to libc6 release. The problem is that it looks like we're
setting ourselves up to throw everything into upheaval with each
non-micro upstream release.
> So we should probably works towards that as well: we should give
> people no reason to want to compile new software against Guile 1.4.
> Why do they want this?
I believe people have kept libc5 stuff and old X11 stuff around for
long periods of time. Even in Debian it takes a little while for
everything to get recompiled against the newer libs, and some things,
the ones that can't be recompiled b/c of source differences are
usually expected to continue to function -- they just have to compile
against the older libs, i.e. they Depend: libguile9 rather than
libguile12. My point isn't about whether or not people should be
encouraged to migrate to the new version, it's about whether or not we
should break a bunch of existing stuff on their system when they just
want to upgrade a few things.
The real issue isn't evident when considering just the "individual
compiling stuff on their own machine" perspective, but it is much
clearer when you think of the the problem from a distributor's
perspective. From a distribution perspective libs have to pick
sonames that allow system upgrades without breaking old software.
Say we have
guile-1.4: (provides libguile.so.9)
libgwrap-glib1: (provides libgwrap-glib.so.1) (depends libguile.so.9)
gnucash: (depends libgwrap-glib.so.1)
snd: (depends libgwrap-glib.so.1)
now the guile maintainer gets ready and produces
guile-1.6: (provides libguile.so.12)
and now the gwrap maintainer wants to rebuild his package against the
new guile. So he rebuilds gwrap and we have:
libgwrap-glib???: (provides libgwrap-glib.so.???) (depends libguile.so.12)
What goes where the ??? is above? If a "1", then as soon as the gwrap
maintainer uploads the new gwrap packages and they're installed, both
gnucash and snd are broken, even though all of their dependencies are
still satisfied. Debian doesn't allow this. So if not "1", then
what, and who chooses it?
I'm not positive, but I suspect this problem is why the gtk/gnome
packages have done something we've been trying to avoid -- puting the
version name in the library name, i.e. you now have libgtk-1.2.so.0 in
package libgtk1.2, not libgtk.so.0 in package libgtk or even
in package libgtk-1.2.
One super-heavy-handed way you could avoid the problem is to just make
policy that two versions of guile can't coexist in a distribution at
the same time *period*, and require all guile based debian packages to
name themselves somehow based on the guile they're compiled against,
and then include package dependencies that would force all packages
using the old guile (directly or indirectly) the system when the new
guile is installed, but this is not likely to win us any friends, and
it's likely that not all the various maintainers would even remember
to set these dependencies right all the time.
All that said, let me be clear, I don't really like the solutions I'm
proposing, and I'd actually prefer if we could just use the "put libs
in /usr/lib, don't cruft up our lib names, and let ld.so sort it out"
approach. That's a lot nicer looking, but so far it still looks to me
like that approach is unlikely to scale.
--
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-12-14 18:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-12 20:25 add-on lib versioning (concrete example g-wrap) -- what to do? Rob Browning
2002-12-13 8:47 ` tomas
2002-12-13 21:37 ` Christopher Cramer
2002-12-13 22:53 ` Rob Browning
2002-12-14 16:02 ` Marius Vollmer
2002-12-14 18:47 ` Rob Browning
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).