Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 128557

Summary: sys-devel/gettext-0.15 is released with expat-2.0 support
Product: Gentoo Linux Reporter: Samuli Suominen (RETIRED) <ssuominen>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: 2006.0   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Testcase ebuild of BMPx SVN HEAD, with USE="nls"
Make gettext look just .so instead of .so.0 as both versions of expat provides it.
gettext-expat-2.patch
5454-gettext-0.14.5-r1.log, building with new patch. OK.
Ebuild I used for testing.
Patch I used for testing.

Description Samuli Suominen (RETIRED) gentoo-dev 2006-04-02 12:58:20 UTC
dev-libs/expat-2.0.0 provides /usr/lib/libexpat.so.1 but gettext doesn't find it.

unaffiliated portage # strings $(which xgettext) | grep expat
libexpat.so.0
Language "glade" is not supported. %s relies on expat.
This version was built without expat.

resulting this..

sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed
mv t-remove-potcdate.sed remove-potcdate.sed
/usr/bin/xgettext --default-domain=program --directory=.. \
  --add-comments=TRANSLATORS: --keyword=_ --keyword=N_ \
  --files-from=./POTFILES.in \
  --copyright-holder='Free Software Foundation, Inc.' \
  --msgid-bugs-address=''
/usr/bin/xgettext: warning: The option --msgid-bugs-address was not specified.
                            If you are using a `Makevars' file, please specify
                            the MSGID_BUGS_ADDRESS variable there; otherwise please
                            specify an --msgid-bugs-address command line option.
/usr/bin/xgettext: Language "glade" is not supported. xgettext relies on expat.
                   This version was built without expat.
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2006-04-02 13:10:41 UTC
Created attachment 83750 [details]
Testcase ebuild of BMPx SVN HEAD, with USE="nls"
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2006-04-02 13:11:11 UTC
Problem goes away, when libexpat.so.1.5.0 is symlinked to libexpat.so.0
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2006-04-02 13:36:04 UTC
in gettext-0.14.5/gettext-tools/src/x-glade.c

load_libexpat ()
{
  if (libexpat_loaded == 0)
    {
      void *handle = dlopen ("libexpat.so.0", RTLD_LAZY);
      if (handle != NULL
          && (p_XML_ParserCreate = dlsym (handle, "XML_ParserCreate")) != NULL
          && (p_XML_SetElementHandler = dlsym (handle, "XML_SetElementHandler")) != NULL
          && (p_XML_SetCharacterDataHandler = dlsym (handle, "XML_SetCharacterDataHandler")) != NULL
          && (p_XML_SetCommentHandler = dlsym (handle, "XML_SetCommentHandler")) != NULL
          && (p_XML_Parse = dlsym (handle, "XML_Parse")) != NULL
          && (p_XML_GetErrorCode = dlsym (handle, "XML_GetErrorCode")) != NULL
          && (p_XML_GetCurrentLineNumber = dlsym (handle, "XML_GetCurrentLineNumber")) != NULL
          && (p_XML_GetCurrentColumnNumber = dlsym (handle, "XML_GetCurrentColumnNumber")) != NULL
          && (p_XML_ParserFree = dlsym (handle, "XML_ParserFree")) != NULL
          && (p_XML_ErrorString = dlsym (handle, "XML_ErrorString")) != NULL)
        libexpat_loaded = 1;
      else
        libexpat_loaded = -1;
    }
  return libexpat_loaded >= 0;
}
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2006-04-02 13:59:19 UTC
Created attachment 83758 [details, diff]
Make gettext look just .so instead of .so.0 as both versions of expat provides it.
Comment 5 SpanKY gentoo-dev 2006-04-02 14:36:17 UTC
should maybe be:
void *handle = dlopen ("libexpat.so.0", RTLD_LAZY);
if (handle == NULL)
    void *handle = dlopen ("libexpat.so.1", RTLD_LAZY);

i'll bug upstream
Comment 6 SpanKY gentoo-dev 2006-04-04 19:49:21 UTC
Created attachment 83943 [details, diff]
gettext-expat-2.patch

please give this patch a test from upstream
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2006-04-05 07:02:47 UTC
Created attachment 83977 [details]
5454-gettext-0.14.5-r1.log, building with new patch. OK.

Moment, building the program that uses gettext I encountered this problem in first place..
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2006-04-05 07:38:06 UTC
Seems to be working.
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2006-04-05 12:04:58 UTC
Damn, it didn't work afterall! Sorry about the previous post, builded wrong version by an accident.

make[4]: Leaving directory `/var/tmp/portage/bmpx-9999/work/bmpx-9999/src'
make[3]: Leaving directory `/var/tmp/portage/bmpx-9999/work/bmpx-9999/src'
make[2]: Leaving directory `/var/tmp/portage/bmpx-9999/work/bmpx-9999/src'
Making all in data
make[2]: Entering directory `/var/tmp/portage/bmpx-9999/work/bmpx-9999/data'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/var/tmp/portage/bmpx-9999/work/bmpx-9999/data'
Making all in docs
make[2]: Entering directory `/var/tmp/portage/bmpx-9999/work/bmpx-9999/docs'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/var/tmp/portage/bmpx-9999/work/bmpx-9999/docs'
Making all in po
make[2]: Entering directory `/var/tmp/portage/bmpx-9999/work/bmpx-9999/po'
make bmpx.pot-update
make[3]: Entering directory `/var/tmp/portage/bmpx-9999/work/bmpx-9999/po'
sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed
mv t-remove-potcdate.sed remove-potcdate.sed
/usr/bin/xgettext --default-domain=bmpx --directory=.. \
  --add-comments=TRANSLATORS: --keyword=_ --keyword=N_ \
  --files-from=./POTFILES.in \
  --copyright-holder='Free Software Foundation, Inc.' \
  --msgid-bugs-address=''
/usr/bin/xgettext: warning: The option --msgid-bugs-address was not specified.
                            If you are using a `Makevars' file, please specify
                            the MSGID_BUGS_ADDRESS variable there; otherwise please
                            specify an --msgid-bugs-address command line option./usr/bin/xgettext: Language "glade" is not supported. xgettext relies on expat.
                   This version was built without expat.
make[3]: *** [bmpx.pot-update] Error 1
make[3]: Leaving directory `/var/tmp/portage/bmpx-9999/work/bmpx-9999/po'
make[2]: *** [bmpx.pot] Error 2
make[2]: Leaving directory `/var/tmp/portage/bmpx-9999/work/bmpx-9999/po'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/bmpx-9999/work/bmpx-9999'
make: *** [all] Error 2
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2006-04-05 12:06:14 UTC
Created attachment 84007 [details]
Ebuild I used for testing.
Comment 11 Samuli Suominen (RETIRED) gentoo-dev 2006-04-05 12:07:18 UTC
Created attachment 84008 [details, diff]
Patch I used for testing.
Comment 12 Samuli Suominen (RETIRED) gentoo-dev 2006-04-05 12:30:14 UTC
drac@unaffiliated ~ $ grep MAJOR /usr/include/expat.h
#define XML_MAJOR_VERSION 2

It's there.. but still it doesn't pick it up. This is also strange:

drac@unaffiliated ~ $ strings `which xgettext` | grep -i expat
libexpat.so.0
Language "glade" is not supported. %s relies on expat.
This version was built without expat.

no strings of libexpat.so.1..
Comment 13 Samuli Suominen (RETIRED) gentoo-dev 2006-06-19 13:24:09 UTC
BMPx now compiles, but still.. problem is still there. gettext doesn't use expat 2.x at all, because of hardcoding. See comment 3.
Comment 14 Samuli Suominen (RETIRED) gentoo-dev 2006-07-22 09:28:26 UTC
spanky, can you version bump gettext to 0.15, it was relesed yesterday and has code for expat 2.0.

and close this bug.
Comment 15 SpanKY gentoo-dev 2006-07-30 18:56:10 UTC
0.15 now in cvs