bug-gnulib
[Top][All Lists]
Advanced

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

Re: relocwrapper interaction with replacement functions


From: Bruno Haible
Subject: Re: relocwrapper interaction with replacement functions
Date: Tue, 8 Jun 2010 10:51:24 +0200
User-agent: KMail/1.9.9

Hi Ben,

> On OpenBSD 4.7, GNU PSPP from current "master" configured with
> --enable-relocatable fails linking relocwrapper.c at "make
> install" time:
> 
>     /tmp//ccy8gNb6.o(.text+0x64): In function `add_dotbin':
>     gl/relocwrapper.c:105: undefined reference to `rpl_fprintf'
>     /tmp//ccy8gNb6.o(.text+0x172): In function `activate_libdirs':
>     gl/relocwrapper.c:165: undefined reference to `rpl_fprintf'
>     /tmp//ccy8gNb6.o(.text+0x1f9): In function `main':
>     gl/relocwrapper.c:189: undefined reference to `rpl_fprintf'
>     /tmp//ccHe4GuE.o(.text+0xe9): In function `set_relocation_prefix':
>     gl/relocatable.c:154: undefined reference to 
> `libintl_set_relocation_prefix'
>     /tmp//ccIOlqzo.o(.text+0x3c): In function `rpl_strerror':
>     gl/strerror.c:339: undefined reference to `rpl_sprintf'
>     collect2: ld returned 1 exit status
> 
> One solution for the problems with the rpl_* symbols would be to
> build the relocwrapper program in the usual way as part of a
> Makefile.am, and then link it against the Gnulib library, so that
> relocwrapper could take advantage of the wrappers.

But that would require extra Makefile.am rules that the developer has to
write. The --enable-relocatable mechanism tries hard to get away with minimal
changes to the Makefile.am:
<http://www.gnu.org/software/gnulib/manual/html_node/Supporting-Relocation.html>

Therefore I would suggest to solve this problem by adding #undefs in
specific places, such as

/* Use the system functions, not the gnulib overrides in this file.  */
#undef fprintf
#undef sprintf

What is the complete required symbol list (nm ...o | grep ' U ') of the set
of modules compiled for the relocwrapper on your system?

> Another way would be to make the substitutions conditional on
> !IN_RELOCWRAPPER, but that seems fragile

Yes, this would be fragile. But maybe we need this approach for the
set_relocation_prefix functions.

Bruno



reply via email to

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