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.
Created attachment 83750 [details] Testcase ebuild of BMPx SVN HEAD, with USE="nls"
Problem goes away, when libexpat.so.1.5.0 is symlinked to libexpat.so.0
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; }
Created attachment 83758 [details, diff] Make gettext look just .so instead of .so.0 as both versions of expat provides it.
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
Created attachment 83943 [details, diff] gettext-expat-2.patch please give this patch a test from upstream
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..
Seems to be working.
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
Created attachment 84007 [details] Ebuild I used for testing.
Created attachment 84008 [details, diff] Patch I used for testing.
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..
BMPx now compiles, but still.. problem is still there. gettext doesn't use expat 2.x at all, because of hardcoding. See comment 3.
spanky, can you version bump gettext to 0.15, it was relesed yesterday and has code for expat 2.0. and close this bug.
0.15 now in cvs