bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: problems building/linking gettext on powerpc-apple-darwin6.3


From: Bruno Haible
Subject: Re: problems building/linking gettext on powerpc-apple-darwin6.3
Date: Mon, 17 Feb 2003 23:43:14 +0100 (CET)

Ruth and Dave O'Riva writes:
> I've been trying to build gettext-0.11.5 on my Mac (OSX 10.2.3), and 
> have been encountering the (apparently) common "undefined symbol: 
> libintl_gettext" error when attempting to link anything, including 
> libgettext, against libintl.
> 
> I tracked this down to a problem that looks pretty ugly; when libintl.h 
> tries to do an asm redirect, it issues _INTL_ASM(libintl_gettext), 
> which expands to __asm__( "libintl_gettext" ).  Unfortunately, the 
> version of gcc that "came" with my Mac (claiming to be gcc 3.1 
> (prerelease)), requires that line to read __asm__("_libintll_gettext") 
> in order for everything to link correctly.
> 
> There is another define referenced by the _INTL_ASM macro, 
> __USER_LABEL_PREFIX__, that looks like it should actually contain that 
> underscore.  However, it does not, and I haven't been able to find a 
> place where it gets defined anywhere.

This seems like a gcc internal that is not supported by Apple's
version of GCC.

> When __USER_LABEL_PREFIX__ is 
> defined to be a single underscore ("_"), then everything magically 
> starts to work,

Thanks for telling me; but I fear to use this solution because it will
break the day when Apple will drop the leading underscore. So I
recommend this patch.


*** intl/libgnuintl.h   23 Jul 2002 12:33:14 -0000      1.10
--- intl/libgnuintl.h   18 Sep 2002 20:12:52 -0000      1.11
***************
*** 93,99 ****
     If he doesn't, we choose the method.  A third possible method is
     _INTL_REDIRECT_ASM, supported only by GCC.  */
  #if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
! # if __GNUC__ >= 2 && (defined __STDC__ || defined __cplusplus)
  #  define _INTL_REDIRECT_ASM
  # else
  #  ifdef __cplusplus
--- 93,99 ----
     If he doesn't, we choose the method.  A third possible method is
     _INTL_REDIRECT_ASM, supported only by GCC.  */
  #if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
! # if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined 
__cplusplus)
  #  define _INTL_REDIRECT_ASM
  # else
  #  ifdef __cplusplus




reply via email to

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