gnucap-devel
[Top][All Lists]
Advanced

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

Re: [Gnucap-devel] libtool?


From: Felix Salfelder
Subject: Re: [Gnucap-devel] libtool?
Date: Tue, 3 May 2016 11:29:22 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, May 01, 2016 at 03:42:17AM -0400, al davis wrote:
> error in configure (all of them) ..
> in test, "==" should be "=".
> It doesn't work for me, after changing, it does.

thanks.

> It didn't work at first for me because I didn't have the "libtool-bin"
> package installed.

i had suggested to include libtool, as others do. for my (optional)
proof-of-concept, it was not a requirement.

> I'm not sure I like the LIBTOOL_TRUE LIBTOOL_FALSE method of
> switching.  Just generate one or the other?  Or maybe it is a good
> idea, it enables editing of the generated file.

the reason why the makefile templates are embedded in shell scripts is
not obvious. anyway they could easily be split to seperate files right
now. i consider splitting a good idea, and the *TRUE, *FALSE thing does
not interfere with this.

> Since it looks like all libtool is doing is managing the version
> numbers, I would like to see what it takes to just do it explicitly
> without libtool.

run make. it invokes libtool --mode=whatever. libtool will print a
command and run it. this command is likely platform dependent, i have no
way to test on more than one or two platforms.

$ wc -l `which libtool`
11160 /usr/bin/libtool
try with fewer lines :)

no worries: even if we include libtool now (with all the lines), we can
easily replace it later on. it's a plugin.

> I am not sure how main tracks the version.  It's hidden.

the version is put into the only relevant place. from there, the dynamic
loader picks it up.

$ ldd `which gnucap` |grep libgnucap
libgnucap.so.0 => /usr/local/lib/libgnucap.so.0 (0x00007f16d0a3e000)

essentially libtool links main.o against libgnucap.la. which is a
"libtool library". it includes everything needed to figure out the
version (and some more). it couldn't be any less hidden. libgnucap.la is
a verbosely commented shell fragment. have a look.

> Side note .. I see a script "gnucap" and an executable "gnucap.real" in
> gnucap-uf.  It is simple and solves a known problem finding the right
> library when installed (or not installed).

in gnucap-uf, finding the right library is handled by libtool. this is
really generic and used by zillions of projects.

gnucap (the script) is taking care of finding plugins. plugins are
(afaics) *not* supported by libtool. also the script sets some
environment for gnucap.mk. i once wanted to seamlessly run gnucap (with
all the extensions) from the respective builddirs. it turned out to be
slightly insane. but the script comes in handy for testing (!).

what we should do is

1. install gnucap (system wide, e.g. through package manager).
2. build extension(s)
3. install extension, if there are cross dependencies.

for 1. to work right, we need a library version...

hth, cheers
felix



reply via email to

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