[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multiply exported Gnulib symbols
From: |
Yoann Vandoorselaere |
Subject: |
Re: Multiply exported Gnulib symbols |
Date: |
Wed, 29 Aug 2007 11:16:53 +0200 |
Le mardi 28 août 2007 à 19:23 +0200, Simon Josefsson a écrit :
> Bruno Haible <address@hidden> writes:
>
> >> > 3) Two different libraries, say, libguile and libgettextpo, using
> >> > auxiliary
> >> > functions from gnulib. It may happen that libguile and libgettextpo
> >> > both
> >> > define rpl_strcasecmp, and that this leads to link-time issues.
> >> >
> >> > For this we have nothing prepackaged in gnulib-tool, but there is a
> >> > Makefile snippet that does the necessary #defines, i.e.
> >> > #define rpl_strcasecmp scm_strcasecmp
> >> > in guile's config.h, and
> >> > #define rpl_strcasecmp libgettextpo_strcasecmp
> >> > in libgettextpo's config.h. You find this code in the 'config.h' rule
> >> > in
> >> >
> >> > http://cvs.savannah.gnu.org/viewvc/gettext/gettext-tools/libgettextpo/Makefile.am?revision=1.13&root=gettext&view=text
> >>
> >> I second Simon's request to integrate it in Gnulib. :-)
> >
> > That would be the wrong place. It needs to be integrated into automake,
> > more precisely into automake's support of libtool. automake should allow
> > to specify subsets libfoo_la_SOURCES_HIDDEN of libfoo_la_SOURCES, and
> > libfoo_la_LIBADD_HIDDEN of libfoo_la_LIBADD, such that the exported symbols
> > of these parts get prefixed with 'libfoo_'.
>
> Is there any indication that automake will support this soon? If not,
> perhaps we could adopt the typical approach to work around missing
> functionality by implementing this in gnulib. This namespace-problem
> doesn't typically come up in normal situations (I think?), so it is
> somewhat gnulib-centric and having a solution in gnulib would allow us
> to experiment with it before adding it to automake (if that ever
> happens).
We had a similar problem with libprelude (which both use GnuTLS and
GnuLib, leading to potential symbol conflict). This was fixed using the
-export-symbols-regex libtool option.
--
Yoann Vandoorselaere | Responsable R&D / CTO | PreludeIDS Technologies
Tel: +33 (0)8 70 70 21 58 Fax: +33(0)4 78 42 21 58
http://www.prelude-ids.com