Bug#752354: perl: trivial test C program fails to compile

Niko Tyni ntyni at debian.org
Mon Jun 23 08:50:25 UTC 2014


On Mon, Jun 23, 2014 at 01:19:28AM -0700, Russ Allbery wrote:
> Niko Tyni <ntyni at debian.org> writes:
> 
> > Thanks for looking at this.
> 
> > The probe doesn't actually use anything from the headers, it just
> > includes them:

> It's from a static inline function defined in the headers.  See perl.h:
> 
> #ifndef PERL_NO_INLINE_FUNCTIONS
> /* Static inline funcs that depend on includes and declarations above.
>    Some of these reference functions in the perl object files, and some
>    compilers aren't smart enough to eliminate unused static inline
>    functions, so including this file in source code can cause link errors
>    even if the source code uses none of the functions. Hence including these
>    can be be suppressed by setting PERL_NO_INLINE_FUNCTIONS. Doing this will
>    (obviously) result in unworkable XS code, but allows simple probing code
>    to continue to work, because it permits tests to include the perl headers
>    for definitions without creating a link dependency on the perl library
>    (which may not exist yet).
> */
> 
> #  include "inline.h"
> #endif
> 
> So the solution is to either always link with the Perl flags, not just
> compile, or to define that macro in probes.

Ah, that makes sense. Thanks for educating me! (and apologies for not taking
the time to dig this up myself.)

So it's indeed xchat-gnome that needs to be fixed. Will file a proper
report tonight (but anybody is naturally free to beat me to it.)
-- 
Niko




More information about the Perl-maintainers mailing list