bugGNU gettext - Bugs: bug #19585, dlopen doesn't work for expat 2.0

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #19585: dlopen doesn't work for expat 2.0

Submitter:  Wade Berrier <wberrier>
Submitted:  Thu 12 Apr 2007 10:17:18 PM UTC
   
 
Category:  Glade Severity:  3 - Normal
Item Group:  None Status:  Fix Released
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Mon 03 Sep 2007 11:49:57 AM UTC, comment #3: 

Thanks, Bruno. I've integrated your changes into our version.

Philipp Thomas <phitho>
Sun 02 Sep 2007 04:29:03 PM UTC, comment #2: 

Wade, you are right that using XML_MAJOR_VERSION is pointless
in the part of the code that does dynamic loading.

Philipp (btw. there must be a typo in your savannah login),
using expat.h when using dynamic loading is wrong, because
there are three possible ABIs of libexpat (version < 2.0,
version >= 2.0 default, version >= 2.0 with -DXML_LARGE_SIZE),
and the include file that you include at compile time is
unrelated to the library that will be found at run time.

I have now added a patch to x-glade.c that fixes the issue with
the 3 possible ABIs.

Bruno Haible <haible>
Group administrator
Wed 25 Apr 2007 10:47:59 AM UTC, comment #1: 

I propose the attached patch which always includes expat.h if it's available, independend of whther dynloading is used or not.


(file #12593)

Philipp Thomas <phitho>
Thu 12 Apr 2007 10:17:18 PM UTC, original submission:  

from gettext-tools/src/x-glade.c:

#if DYNLOAD_LIBEXPAT
# include <dlfcn.h>
#else
# if HAVE_LIBEXPAT
#  include <expat.h>
# endif
#endif


and then a check for XML_MAJOR_VERSION:

#if XML_MAJOR_VERSION >= 2
      handle = dlopen ("libexpat.so.1", RTLD_LAZY);
#else
      handle = dlopen ("libexpat.so.0", RTLD_LAZY);

So, if I use dynamic loading, I'll never be able to use libexpat.so.1 because XML_MAJOR_VERSION (from expat.h) isn't included if using dlopen.

On newer distributions expat 2.0 is used, but xgettext glade support fails because libexpat.so.0 is attempted, instead of .so.1.

Wade Berrier <wberrier>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #12593:  gettext-expat_check.patch added by phitho (285B - text/x-patch - Always include expat.h if it's available.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Posted a comment)
  • -email is unavailable- added by phitho (Updated the item)
  • -email is unavailable- added by wberrier (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-04 haible StatusFixed Fix Released
    2016-11-26 haible CategoryNone Glade
    2007-09-30 haible Open/ClosedOpen Closed
    2007-09-02 haible StatusNone Fixed
        Assigned toNone haible
    2007-04-25 phitho Attached File- Added gettext-expat_check.patch, #12593
    2007-04-12 wberrier Carbon-Copy- Added wberrier

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code