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

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

Re: Solaris 8, gettext


From: Igor Brezac
Subject: Re: Solaris 8, gettext
Date: Thu, 25 Apr 2002 21:05:20 GMT

On Thu, 25 Apr 2002, Bruno Haible wrote:

> Igor Brezac writes:
>
> > I do have one request for the gettext library.  Most of the functions in
> > GNU libintl are defined in libc (solaris in my case) as well.  This
> > presents a problem if libc is loaded before libintl; in this case the
> > solaris runtime linker will use *gettext from libc.
>
> Are you sure about that? On Solaris 8, the symbols 'gettext',
> 'dgettext', 'dcgettext' are defined as "weak" in /lib/libc.so, which
> means that the definition in libintl.so will take precedence over
> them.

Yup, but it does not work like this.  I am missing something or things are
broken in Sol 8 somewhere.

# nm -x /usr/lib/libc.so.1 | grep gettext
[433]   |0x0007a2e8|0x0000009c|FUNC |LOCL |0    |9      |_dcgettext
[3960]  |0x0007a24c|0x0000009c|FUNC |GLOB |0    |9      |_dgettext
[372]   |0x0007a1b4|0x00000098|FUNC |LOCL |0    |9      |_gettext
[4524]  |0x0007a2e8|0x0000009c|FUNC |WEAK |0    |9      |dcgettext
[2099]  |0x0007a384|0x00000c54|FUNC |LOCL |0    |9      |dcgettext_u
[4240]  |0x0007a24c|0x0000009c|FUNC |WEAK |0    |9      |dgettext
[3300]  |0x0007a1b4|0x00000098|FUNC |WEAK |0    |9      |gettext
[2087]  |0x00000000|0x00000000|FILE |LOCL |0    |ABS    |gettext.c

logrotate is compiled with -lpopt -lintl -lc
# ldd ./logrotate
        libpopt-1.6.4.so =>      /usr/local/lib/libpopt-1.6.4.so
        libintl-0.11.1.so =>     /usr/local/lib/libintl-0.11.1.so
        libc.so.1 =>     /usr/lib/libc.so.1
        libiconv-1.7.so =>       /usr/local/lib/libiconv-1.7.so
        libdl.so.1 =>    /usr/lib/libdl.so.1
        /usr/platform/SUNW,UltraAX-MP/lib/libc_psr.so.1

# sotruss -Tlibintl-0.11.1.so -Flibpopt-1.6.4.so ./logrotate -h
libpopt-1.6.4.so -> libintl-0.11.1.so:*dgettext(0xff2f5ed0, 0xff2f6050, 0x48)
logrotate: bad argument -h: unknown error

---------------------

logrotate is compiled with just -lpopt -lc
# ldd ./logrotate
        libpopt-1.6.4.so =>      /usr/local/lib/libpopt-1.6.4.so
        libc.so.1 =>     /usr/lib/libc.so.1
        libintl-0.11.1.so =>     /usr/local/lib/libintl-0.11.1.so
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libiconv-1.7.so =>       /usr/local/lib/libiconv-1.7.so
        /usr/platform/SUNW,UltraAX-MP/lib/libc_psr.so.1

# sotruss -Tlibintl-0.11.1.so -Flibpopt-1.6.4.so ./logrotate -h
logrotate: bad argument -h: unknown error

# sotruss -Tlibc.so.1 -Flibpopt-1.6.4.so ./logrotate -h | less
libpopt-1.6.4.so ->       libc.so.1:*malloc(0x190, 0x27048, 0x20)
.... (stuff deleted)
libpopt-1.6.4.so ->       libc.so.1:*dgettext(0xff2f5ed0, 0xff2f6050, 0x48)

Hope this helps.  I use crle for the runtime linking environment, rather
then hardcoding lib paths.  However, this should not matter.

-Igor




reply via email to

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