bug-libtool
[Top][All Lists]
Advanced

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

Re: Libtool 2.2 ABI issue


From: Yoann Vandoorselaere
Subject: Re: Libtool 2.2 ABI issue
Date: Wed, 12 Nov 2008 10:13:33 +0100

Hi Ralf,

Le mardi 11 novembre 2008 à 21:04 +0100, Ralf Wildenhues a écrit : 
> * Yoann Vandoorselaere wrote on Tue, Nov 04, 2008 at 04:16:47PM CET:
> > I found a partial solution to this problem by rewriting the table if its
> > first symbol is NULL or doesn't contain @address@hidden However, I find this
> > solution less than ideal, so any comment on this solution will be
> > welcome. 
> 
> Looks ok, only nits:
> 
> > void prelude_plugin_set_preloaded_symbols(void *symlist)

[...]

> Here, you overwrite the last entry's ".name" record.

Thanks for the review!


> > The second problem is due to libtool 2.2 renaming the symbol table from
> > lt_preloaded_symbols to lt__PROGRAM__LTX_preloaded_symbols.
> > 
> > A fixe for this issue would be to be able to determine the libtool
> > version being used at compile time.
> 
> I haven't fully understood your setting, thus your needs.  Let me try:
> 
> You have a package you control (prelude) plus a number of packages that
> you don't control, but that use your headers/build plugins with prelude.
> 
> You control the libtool and libltdl versions with which prelude is built
> and installed (both from the Libtool 2.2.x tree), but you do not control
> the libtool version with which your "client packages" are built.  These
> client packages typically do not have anything to do with libltdl.
> 
> You do not need to be able to build prelude itself with Libtool 1.5.x
> any more (neither libtool nor libltdl).
> 
> Right so far?

That's mostly correct, but you need to keep into account that I have no
control on the version of libprelude installed on the system. Depending
on its version, libprelude will use 1.5 or 2.2 libltdl. 

If there is a mismatch between the libltdl version used to build
libprelude, and the libtool version used to build an application using
the libprelude plugin system, then the application will crash (unless we
install the workaround above).

Shouldn't the above workaround be done directly within libltdl?

> I think you could write an Autoconf macro for your users' packages to
> incorporate into their configure scripts.  In it, you could AC_DEFINE
> a couple of variables based upon whether they use Libtool 1.5.x or
> 2.2.x.
> 
> In order to require a certain Libtool version, the macro LT_PREREQ
> has been added to 2.2.x, and LT_PACKAGE_VERSION contains some version
> string.  However, in your case I'd probably do something like
> m4_ifdef([LT_INIT],
> [deal with 2.2.x],
> [deal with 1.5.x or older])

Thanks for the tips, I will try using the following workaround:

Add the following to libprelude prelude-plugin.h:

#ifdef PRELUDE_APPLICATION_USE_LIBTOOL2
# define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols
#endif

extern const void *lt_preloaded_symbols[];

#define PRELUDE_PLUGIN_SET_PRELOADED_SYMBOLS_LIBTOOL()         \
        prelude_plugin_set_preloaded_symbols(lt_preloaded_symbols)


Then in libprelude.m4, which content is called at application configure
time:

m4_ifdef([LT_INIT],
         [AC_DEFINE([PRELUDE_APPLICATION_USE_LIBTOOL2], [], 
                    [Define whether application use libtool >= 2.0])],
[])


Thanks!

-- 
Yoann Vandoorselaere <address@hidden>





reply via email to

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