Hello all- In a fit of pique, I pushed a new branch of Guile to the repo called wip-replace-ltdl-with-gmodule. It replaces the dynamic linking library libltdl from libtool with the analagous library GModule from GLib. It was remarkably easy, and, after a cursory test I was surprised to find that it seems to be working. GModule itself is a standalone library, but, I think it depends on GLib. It might be possible to remove that dependency without much difficulty, but unfortunately, then you would be left with another library to maintain. Anyway, you may find it amusing, at least. Regards, Mike Gran
On Wed, Mar 25, 2020 at 5:24 AM Mike Gran <spk121@yahoo.com> wrote: > > Hello all- > > In a fit of pique, I pushed a new branch of Guile to the repo > called wip-replace-ltdl-with-gmodule. It replaces the dynamic linking > library libltdl from libtool with the analagous library GModule > from GLib. It was remarkably easy, and, after a cursory test > I was surprised to find that it seems to be working. > > GModule itself is a standalone library, but, I think it depends > on GLib. It might be possible to remove that dependency without > much difficulty, but unfortunately, then you would be left with > another library to maintain. > > Anyway, you may find it amusing, at least. So knee-jerk reaction, what does GModule do better than libltdl? Or perhaps why is libltdl "bad"? > > Regards, > Mike Gran > > -- Duy
[-- Attachment #1: Type: text/plain, Size: 699 bytes --] > From: "Duy Nguyen" > > On Wed, Mar 25, 2020 at 5:24 AM Mike Gran wrote: > > > > In a fit of pique, I pushed a new branch of Guile to the repo > > called wip-replace-ltdl-with-gmodule. It replaces the dynamic linking > > library libltdl from libtool with the analagous library GModule > > from GLib. It was remarkably easy, and, after a cursory test > > I was surprised to find that it seems to be working. > > So knee-jerk reaction, what does GModule do better than libltdl? Or > perhaps why is libltdl "bad"? Hopefully it will return something more detailed than "file not found" for the many error cases that libtool lumps into that one error message. -Dale [-- Attachment #2: Type: text/html, Size: 884 bytes --]
On Wed, Mar 25, 2020 at 04:33:50PM +0700, Duy Nguyen wrote:
> On Wed, Mar 25, 2020 at 5:24 AM Mike Gran <spk121@yahoo.com> wrote:
> >
> > Hello all-
> >
> > In a fit of pique, I pushed a new branch of Guile to the repo
> > called wip-replace-ltdl-with-gmodule. It replaces the dynamic linking
> > library libltdl from libtool with the analagous library GModule
> > from GLib. It was remarkably easy, and, after a cursory test
> > I was surprised to find that it seems to be working.
> >
> > GModule itself is a standalone library, but, I think it depends
> > on GLib. It might be possible to remove that dependency without
> > much difficulty, but unfortunately, then you would be left with
> > another library to maintain.
> >
> > Anyway, you may find it amusing, at least.
>
> So knee-jerk reaction, what does GModule do better than libltdl? Or
> perhaps why is libltdl "bad"?
Technically, GModule and libltdl are quite similar. But
1. Libtool hasn't made a release in 6 years. For something so
often used in GNU, it seems to be quite neglected.
2. Its default error message "file not found" doesn't always mean
that the file is not found.
I haven't used GModule with Guile enough to decide if it is
technically better, yet. But, it is updated more often.
-Mike Gran
[-- Attachment #1: Type: text/plain, Size: 135 bytes --] Looks like (based on ldd output) that it depends on libglib, libpthread, and libpcre beyond all that libltdl also uses. -Dale [-- Attachment #2: Type: text/html, Size: 207 bytes --]
Hello!
Mike Gran <spk121@yahoo.com> skribis:
> In a fit of pique, I pushed a new branch of Guile to the repo
> called wip-replace-ltdl-with-gmodule. It replaces the dynamic linking
> library libltdl from libtool with the analagous library GModule
> from GLib. It was remarkably easy, and, after a cursory test
> I was surprised to find that it seems to be working.
>
> GModule itself is a standalone library, but, I think it depends
> on GLib. It might be possible to remove that dependency without
> much difficulty, but unfortunately, then you would be left with
> another library to maintain.
Fun!
I’m very much tired of “file not found” :-), but I don’t think Guile
should depend on GLib, which is quite big.
I think we should either fix ltdl (probably less work than porting Guile
to GModule, but also less exciting) or have a very basic wrapper around
dlopen instead of using ltdl (I think Andy had made experiments in that
direction.)
Thanks,
Ludo’.
> From: Ludovic Courtès <ludo@gnu.org> > Date: Fri, 27 Mar 2020 13:01:38 +0100 > > I’m very much tired of “file not found” :-), but I don’t think Guile > should depend on GLib, which is quite big. FWIW, I agree. > I think we should either fix ltdl (probably less work than porting Guile > to GModule, but also less exciting) or have a very basic wrapper around > dlopen instead of using ltdl (I think Andy had made experiments in that > direction.) If you drop ltdl, the MinGW port of Guile will be broken, as dlopen there is not guaranteed to exist (it exists in one flavor of MinGW, but not in the other, which is the most popular one, AFAIK). So my recommendation would be to fix ltdl.
On Fri, Mar 27, 2020 at 04:27:57PM +0300, Eli Zaretskii wrote:
> > I think we should either fix ltdl (probably less work than porting Guile
> > to GModule, but also less exciting) or have a very basic wrapper around
> > dlopen instead of using ltdl (I think Andy had made experiments in that
> > direction.)
>
> If you drop ltdl, the MinGW port of Guile will be broken, as dlopen
> there is not guaranteed to exist (it exists in one flavor of MinGW,
> but not in the other, which is the most popular one, AFAIK).
>
> So my recommendation would be to fix ltdl.
>
I must be said that the libtool mailing list appears extremely
conservative with respect to change.
I haven't evaluated it on a technical level, but I do see small
patches in GModule to handle things like UWP, while the last technical
change to libltdl was probably around 2011.
If GModule is up to date, it looks like there are only three families
of dynamic linking that remain: dlopen for UNIX-Likes, AIX's dlopen of
AIX-format .ar archives, and Microsoft's LoadLibrary. MacOS's dyld is
gone.
Maybe when I have a moment, I'll strip GLib from GModule to see what
it looks like, or perhaps see what new information GModule contains
that could be flowed down to ltdl. Not that I expect Guile to
necessarily incorporate it, but, because I find it interesting.
But, I don't see myself as finding any fun in interacting with the
libtool mailing list, so I probably won't do that.
Regards,
Mike Gran