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

Jiri Vanek jvanek at redhat.com
Thu Jun 30 04:40:03 PDT 2011


Based also on http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-June/014879.html

Hi!

This patch is another attempt o make icedtea-web buildable on rhel 5 with older libraries. Before build of plugin itself is started, then testing c++ program is tried to be linked with same options. If this compilation fails, then original IcedTeaNPPlugin.cc is backuped,  glibBuildable.patch is applied to IcedTeaNPPlugin.cc and then plugin is linked.
During clean-plugin original IcedTeaNPPlugin.cc is restored from backup (and when test application is compiled, then this binary is deleted, also backup is delete)

Please, when you will ask me to include this "solution" more to configure (or autotools or anywhere) then I will need a little bit of help.


cc - Deepak as maintainer of icedtea-web, Andrew as head of idea, Pavel as author of original patch

changelog :

	Makefile.am: added PLUGIN_TOBEPATCHED* variables to work with patched file, TESTGLIBS* variables to work with testing code
	(stamps/patch-for-glib): new goal to test compilation and patch IcedTeaNPPlugin.cc if necessary
	(clean-IcedTeaPlugin): added deleting of compiled test, reverting patched file,and deleting backup of it.
	(stamps/plugin.stamp): now depends on stamps/patch-for-glib
	glibBuildable.patch: new file with patch to plugin/icedteanp/IcedTeaNPPlugin.cc
	testGlibs.cc: testing file which not-successful compilation will leed to patching of IcedTeaNPPlugin.cc


ps: Is funny hat looking for hell, in hello by  g_strcmp0 will return -111 ;)

Regards J.




On 06/30/2011 12:24 AM, Andrew John Hughes wrote:
> On Mon, Jun 27, 2011 at 02:05:36PM +0200, Jiri Vanek wrote:
>> On 06/16/2011 08:10 PM, Jiri Vanek wrote:
>>> On 05/18/2011 07:08 PM, Dr Andrew John Hughes wrote:
>>>> On 12:48 Wed 18 May , Pavel Tisnovsky wrote:
>>>>> Hi all,
>>>>>
>>>>> I've found that IcedTea-web can not be build on RHEL5 because this
>>>>> system has older glibc libraries (2.5-*) and some code in
>>>>> IcedTeaNPPlugin.cc depends on newer functions.
>>>>>
>>>>> I've tried to rewrite this class not to use these functions. Can anybody
>>>>> please look at these changes? They are stored in an attachments as patch
>>>>> file.
>>>>>
>>>>> Any comments are welcome!
>>>>>
>>>>> Cheers,
>>>>> Pavel
>>>>
>>>> Looking at the changes, I think you mean glib not glibc.
>>>>
>>>> I don't think this is the right way to fix this. If RHEL5 is missing these
>>>> glib functions, we should test for that in configure and use local definitions
>>>> of those functions, rather than using inferior functions on all platforms.
>>>
>>> As there was no reply to this issue, I have an idea to add configure otion --with-rhel5-buildable, which will include pavel's patch to icedtea-web and compile it on rhel 5 so he will be able to run it on his rhel 5 test machines. What do you think?
>>>
>
> No, I've already outlined the correct solution above.  configure should check for
> the availability of the missing functions (g_hash_table_iter and g_strcmp0 from what
> I can see in the patch below) and use alternatives if they are unavailable (via
> #ifdef in the code).  The patch below seems to require the user to know how to
> invoke a specific make command to apply a patch, whereas the process should be
> automated.  It's also nothing to do with rhel5 as such; it's to do with supporting
> older versions of glib.
>
>>> Regards J.
>>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: autoRhel5patching.diff
Type: text/x-patch
Size: 5684 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110630/034e845f/autoRhel5patching.diff 


More information about the distro-pkg-dev mailing list