GNU bug report logs - #22430
Relocation error with libstdbuf.so on Solaris SPARC with Studio compilation.

Previous Next

Package: coreutils;

Reported by: Rich Burridge <rich.burridge <at> oracle.com>

Date: Fri, 22 Jan 2016 10:30:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Rich Burridge <rich.burridge <at> oracle.com>
To: Pádraig Brady <P <at> draigBrady.com>, 22430 <at> debbugs.gnu.org
Subject: bug#22430: Relocation error with libstdbuf.so on Solaris SPARC with Studio compilation.
Date: Sun, 24 Jan 2016 13:51:43 -0800
On 01/24/2016 09:06 AM, Pádraig Brady wrote:
> ...
> The simplest fix would be to turn it into a macro:
>
> diff --git a/src/system.h b/src/system.h
> index 9898bc7..857e56d 100644
> --- a/src/system.h
> +++ b/src/system.h
> @@ -650,11 +650,16 @@ emit_ancillary_info (char const *program)
>             node, node == program ? " invocation" : "");
>   }
>
> -static inline void
> -emit_try_help (void)
> -{
> -  fprintf (stderr, _("Try '%s --help' for more information.\n"), program_name);
> -}
> +/* A macro rather than an inline function, as it references
> +   the global program_name, which causes run time linking issues
> +   in libstdbuf.so where unused functions are not removed by the linker.  */
> +#define emit_try_help() \
> +  do \
> +    { \
> +      fprintf (stderr, _("Try '%s --help' for more information.\n"), \
> +               program_name); \
> +    } \
> +  while (0)
>
>   #include "inttostr.h"

This works great.

Thanks!





This bug report was last modified 9 years and 121 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.