[RFC]: make IcedTea-web to be compatible with RHEL5 libraries

Jiri Vanek jvanek at redhat.com
Fri Aug 26 06:35:51 PDT 2011


On 08/25/2011 08:12 PM, Deepak Bhole wrote:
> * Jiri Vanek<jvanek at redhat.com>  [2011-08-25 05:53]:
>> On 08/23/2011 01:33 PM, Jiri Vanek wrote:
>>> On 08/22/2011 10:55 PM, Deepak Bhole wrote:
>>>> * Jiri Vanek<jvanek at redhat.com>  [2011-08-22 09:21]:
>>>>> On 07/21/2011 03:21 PM, Dr Andrew John Hughes wrote:
>>>>>> On 12:08 Thu 21 Jul , Jiri Vanek wrote:
>>>>>>>
snip
>>>>
>>
>> Following Omair's advice, instead of version checking I have used AC_TRY_LINK:
>>
>
> Hi Jiri,
>
> Just noticed this now.. why is the variable called GLIBC*? You are
> checking GLIB, not GLIBC..
>
> Also, I am still not sure why we are checking by functions.. the
> iterator functions were added between 2.14 and 2.15 according to the git
> history. So we just need to check if GLIB is<  2.15 and then define
> RHEL5Compatible.. although I think that should be renamed. It should
> instead be called -DGLIB214 or something, as this is a glib thing, not a
> RHEL thing.
>
> Comments below:
>
>>
>>   $(PLUGIN_DIR)/%.o: $(PLUGIN_SRCDIR)/%.cc
>> +	if [ "$(GLIBCVERSION)" == "no" ] ; then \
>> +	  RHEL5COMPATIBLE="-DRhel5Compatible" ;\
>> +	else \
>> +	  RHEL5COMPATIBLE="" ;\
>> +	fi; \
>> +	echo "rhel5comaptible="$$RHEL5COMPATIBLE ;\
>
> Rhel5Compatible should be renamed do GLIB214. Also, the if is not
> needed, see below.
>
>>
>> +AC_DEFUN_ONCE([IT_GET_GLIBCVERSION],
>> +[
>> +AC_MSG_CHECKING([for glibc  version>= 2.12])
>> +AC_LANG_PUSH(C++)
>> +CXXFLAGS_BACKUP=$CXXFLAGS
>> +CXXFLAGS=$CXXFLAGS" "$GLIB_CFLAGS" "$GTK_CFLAGS" "$GLIB_LIBS" "$GTK_LIB
>> +AC_TRY_LINK([
>> +#include<glib.h>
>> +],[
>> +GHashTable* instance_to_id_map = g_hash_table_new(NULL, NULL);
>> +GHashTableIter iter;
>> +gpointer id, instance;
>> +g_hash_table_iter_init (&iter, instance_to_id_map);
>> +g_hash_table_iter_next (&iter,&instance,&id);
>> +g_strcmp0 ("hell", "hello");
>> +],[
>> +AC_MSG_RESULT(yes)
>> +GLIBCVERSION="yes"
>> +],[
>> +GLIBCVERSION="no"
>
> Just a version check will suffice, and it can set a variable
> "GLIB214=-DGLIB214" or keep it empty if version is>= 2.15
>
> Cheers,
> Deepak

Based also on attached irc discussion:

2011-08-26 Jiri Vanek<jvanek at redhat.com>
     Added functionality to allow icedtea web to be buildable with
      rhel5 libraries
     *acinclude.m4: added block to test version of glib installed and
       setting variable GLIB214 to -DGLIB214 if version is <2.15
     * plugin/icedteanp/IcedTeaNPPlugin.cc: added replacements for incompatible
     functions, added #define sections for use this function instead of glib ones
     *Makefile.am: ($(PLUGIN_DIR)/%.o): using GLIB214 setted by configure
      to define GLIB214
     ($(PLUGIN_DIR)/IcedTeaPlugin.so): same as ^
     *configure.ac: added IT_GET_GLIBVERSION

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: discusion
Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110826/be1f2b47/discusion.ksh 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rhel5compatible.diff
Type: text/x-patch
Size: 5232 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110826/be1f2b47/rhel5compatible.diff 


More information about the distro-pkg-dev mailing list