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

Submitted by:  Wade Berrier <wberrier>
Submitted on:  Thu 12 Apr 2007 10:17:18 PM UTC  
 
Category: GladeSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Bruno Haible <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>
Project AdministratorIn charge of this item.
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>

 

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
  • -unavailable- added by haible (Posted a comment)
  • -unavailable- added by phitho (Updated the item)
  • -unavailable- added by wberrier (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 26 Nov 2016 11:44:40 PM UTChaibleCategoryNone=>Glade
    Sun 30 Sep 2007 11:24:56 PM UTChaibleOpen/ClosedOpen=>Closed
    Sun 02 Sep 2007 04:29:03 PM UTChaibleStatusNone=>Fixed
      Assigned toNone=>haible
    Wed 25 Apr 2007 10:47:59 AM UTCphithoAttached File-=>Added gettext-expat_check.patch, #12593
    Thu 12 Apr 2007 10:17:18 PM UTCwberrierCarbon-Copy-=>Added wberrier

    Back to the top


    Powered by Savane 3.1-cleanup1