Skip Menu |

This queue is for tickets about the Glib-Object-Introspection CPAN distribution.

Report information
The Basics
Id: 89552
Status: resolved
Priority: 0/
Queue: Glib-Object-Introspection

People
Owner: Nobody in particular
Requestors: dan [...] berrange.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.016
Fixed in: (no value)



Subject: Tests fail on big-endian architectures.
A report to Fedora bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=919030 Indicates that the tests are failing on big-endian architectures. Specifically s390 and ppc perl-Glib-Object-Introspection-0.016-1.fc20: # Failed test at t/00-basic-types.t line 15. # got: '-1' # expected: '-127' # Failed test at t/00-basic-types.t line 16. # got: '0' # expected: '255' # Failed test at t/00-basic-types.t line 17. # got: '-1' # expected: '-32767' # Failed test at t/00-basic-types.t line 18. # got: '0' # expected: '65535' # Looks like you failed 4 tests of 34. t/00-basic-types.t ............ Dubious, test returned 4 (wstat 1024, 0x400) Failed 4/34 subtests # Failed test at t/arg-checks.t line 11. # got: '-1' # expected: '-127' # Failed test at t/arg-checks.t line 21. # got: '0' # expected: '127' # Looks like you failed 2 tests of 5. t/arg-checks.t ................ Dubious, test returned 2 (wstat 512, 0x200) Failed 2/5 subtests t/arrays.t .................... ok t/boxed.t ..................... ok t/cairo-integration.t ......... ok t/callbacks.t ................. ok t/closures.t .................. ok t/constants.t ................. ok t/enums.t ..................... ok t/hashes.t .................... ok t/interface-implementation.t .. ok t/objects.t ................... ok t/structs.t ................... ok t/values.t .................... ok t/vfunc-chaining.t ............ ok t/vfunc-ref-counting.t ........ ok Test Summary Report ------------------- t/00-basic-types.t (Wstat: 1024 Tests: 34 Failed: 4) Failed tests: 3-6 Non-zero exit status: 4 t/arg-checks.t (Wstat: 512 Tests: 5 Failed: 2) Failed tests: 1, 5 Non-zero exit status: 2 Files=16, Tests=326, 1 wallclock secs ( 0.11 usr 0.02 sys + 0.89 cusr 0.17 csys = 1.19 CPU) Result: FAIL Failed 2/16 test programs. 6/326 subtests failed. make: *** [test_dynamic] Error 255
Subject: Re: [rt.cpan.org #89552] Tests fail on big-endian architectures.
Date: Wed, 16 Oct 2013 22:13:37 +0200
To: bug-Glib-Object-Introspection [...] rt.cpan.org
From: Torsten Schoenfeld <kaffeetisch [...] gmx.de>
On 16.10.2013 15:53, Daniel P. Berrange via RT wrote: Show quoted text
> A report to Fedora bugzilla > > https://bugzilla.redhat.com/show_bug.cgi?id=919030 > > Indicates that the tests are failing on big-endian architectures.
Yeah, I've half-expected that to be the case. Here are some links to related bug reports and patches for similar projects: <https://bugzilla.redhat.com/show_bug.cgi?id=841596> <https://bugzilla.gnome.org/show_bug.cgi?id=680692> <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653308> <https://bugzilla.redhat.com/show_bug.cgi?id=736489> <https://bugzilla.gnome.org/show_bug.cgi?id=659881> <https://git.gnome.org/browse/glib/commit/gobject/gclosure.c?id=8e82225aedf81ea8a33deb3eb27a8878cd606521> <https://git.gnome.org/browse/pygobject/commit/?id=1c5d497d3c354f4d02f1d4570df2c61d6f47300c> I'll try to get to this soon, but I'd be more than happy to accept patches, too.
From: jurica.stanojkovic [...] rt-rk.com
On Wed Oct 16 16:13:52 2013, TSCH wrote: Show quoted text
> On 16.10.2013 15:53, Daniel P. Berrange via RT wrote:
> > A report to Fedora bugzilla > > > > https://bugzilla.redhat.com/show_bug.cgi?id=919030 > > > > Indicates that the tests are failing on big-endian architectures.
> > Yeah, I've half-expected that to be the case. Here are some links to > related bug reports and patches for similar projects: > > <https://bugzilla.redhat.com/show_bug.cgi?id=841596> > <https://bugzilla.gnome.org/show_bug.cgi?id=680692> > <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653308> > <https://bugzilla.redhat.com/show_bug.cgi?id=736489> > <https://bugzilla.gnome.org/show_bug.cgi?id=659881> > <https://git.gnome.org/browse/glib/commit/gobject/gclosure.c?id=8e82225aedf81ea8a33deb3eb27a8878cd606521> > <https://git.gnome.org/browse/pygobject/commit/?id=1c5d497d3c354f4d02f1d4570df2c61d6f47300c> > > I'll try to get to this soon, but I'd be more than happy to accept > patches, too.
Hello, I have attached a patch resolving reported issue on mips architecture. We believe that this fix will work also on other 32-bit big endian architectures, but additional work will be needed for 64-bit big endian. Could someone, please take a look at this patch for big endian architectures. Best regards, Jurica
Subject: gperl-i11n-invoke-c_big_endian_32.patch
Description: patch resolve issues on mips big endian architecture. Author: Jurica Stanojkovic <jurica.stanojkovic@imgtec.com> --- libglib-object-introspection-perl-0.016.orig/gperl-i11n-invoke-c.c +++ libglib-object-introspection-perl-0.016/gperl-i11n-invoke-c.c @@ -180,7 +180,32 @@ invoke_c_code (GICallableInfo *info, ccroak ("Could not prepare a call interface"); } - ffi_call (&cif, func_pointer, &return_value, iinfo.args); + if(iinfo.return_type_ffi==&ffi_type_sint8) + { + ffi_sarg result; + ffi_call (&cif, func_pointer, &result, iinfo.args); + return_value.v_int8=result; + } + else if(iinfo.return_type_ffi==&ffi_type_uint8) + { + ffi_arg result; + ffi_call (&cif, func_pointer, &result, iinfo.args); + return_value.v_uint8=result; + } + else if(iinfo.return_type_ffi==&ffi_type_sint16) + { + ffi_sarg result; + ffi_call (&cif, func_pointer, &result, iinfo.args); + return_value.v_int16=result; + } + else if(iinfo.return_type_ffi==&ffi_type_uint16) + { + ffi_arg result; + ffi_call (&cif, func_pointer, &result, iinfo.args); + return_value.v_uint16=result; + } + else + ffi_call (&cif, func_pointer, &return_value, iinfo.args); /* free call-scoped data */ _invoke_free_after_call_handlers (&iinfo);
Hi, Show quoted text
> Yeah, I've half-expected that to be the case. [...] > I'll try to get to this soon, but I'd be more than happy to accept > patches, too.
JFTR, this affects Debian too: * bugreport: http://bugs.debian.org/724469 * build logs: https://buildd.debian.org/status/package.php?p=libglib-object-introspection-perl
RT-Send-CC: kaffeetisch [...] gmx.de
The above patch only muddles the problem further. The Perl bindings should not deal with libffi stuff directly, but rather use the wrappers provided by libgirepository, e.g. invoke_c_code() should just marshal from Perl to Glib/Gobject, call g_callable_info_invoke() and marshal back to Perl. invoke_c_code() was probably written before g_callable_info_invoke() became public (probably since gobject-instrospection 1.34). Cheers, Roderich
Subject: Re: [rt.cpan.org #89552] Tests fail on big-endian architectures.
Date: Wed, 22 Jan 2014 23:18:13 +0100
To: bug-Glib-Object-Introspection [...] rt.cpan.org
From: Torsten Schoenfeld <kaffeetisch [...] gmx.de>
Please try the attached patch on big-endian architectures. On 17.01.2014 10:57, Roderich Schupp via RT wrote: Show quoted text
> The Perl bindings should not deal with libffi stuff directly, but > rather use the wrappers provided by libgirepository, e.g. > invoke_c_code() should just marshal from Perl to Glib/Gobject, call > g_callable_info_invoke() and marshal back to Perl. invoke_c_code() > was probably written before g_callable_info_invoke() became public > (probably since gobject-instrospection 1.34).
Yes, the invocation code predates the convenience wrappers in gobject-introspection. But I don't think our code can easily be replaced with calls to those wrappers due to some custom features, most notably the handling of "automatic" arguments. I'd love to be proven wrong, though.

Message body is not shown because sender requested not to inline it.

From: jurica.stanojkovic [...] rt-rk.com
On Wed Jan 22 17:18:23 2014, TSCH wrote: Show quoted text
> Please try the attached patch on big-endian architectures. >
I have tried proposed patch on mips (big-endian 32bit). Debian package libglib-object-introspection-perl_0.018-1 was built successfully without errors. Patch was also tested on mipsel (little-endian 32bit). Package was also built successfully without errors. I do not have access to other big-endian architectures to test patch with. Thanks! Jurica
Subject: [rt.cpan.org #89552]
Date: Wed, 29 Jan 2014 19:35:57 +0100
To: bug-Glib-Object-Introspection [...] rt.cpan.org
From: Aurelien Jarno <aurelien [...] aurel32.net>
The patch gperl-i11n-invoke-c_big_endian_32.patch is a good basis, even for 64-bit big-endian. Following the same principle with 32-bit types, I ended up with a new patch attached. With it, the testsuite errors on a 64-bit big-endian machine (s390x) are reduced to the following ones: | t/arrays.t (Wstat: 9 Tests: 2 Failed: 1) | Failed test: 2 | Non-zero wait status: 9 | Parse errors: Bad plan. You planned 29 tests but ran 2. | t/callbacks.t (Wstat: 1536 Tests: 25 Failed: 6) | Failed tests: 3, 6, 9, 14, 19, 25 | Non-zero exit status: 6 | t/enums.t (Wstat: 11 Tests: 1 Failed: 0) | Non-zero wait status: 11 | Parse errors: Bad plan. You planned 4 tests but ran 1. | t/structs.t (Wstat: 65280 Tests: 4 Failed: 0) | Non-zero exit status: 255 | Parse errors: Bad plan. You planned 6 tests but ran 4. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #89552]
Date: Wed, 29 Jan 2014 19:49:38 +0100
To: bug-Glib-Object-Introspection [...] rt.cpan.org
From: Aurelien Jarno <aurelien [...] aurel32.net>
I get exactly the same testsuite results as above with the patch 0001-Fix-return-value-handling-on-big-endian-architecture.patch on 64-bit endian (s390x). -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net
Subject: Re: [rt.cpan.org #89552]
Date: Sun, 09 Feb 2014 21:09:56 +0100
To: bug-Glib-Object-Introspection [...] rt.cpan.org
From: Torsten Schoenfeld <kaffeetisch [...] gmx.de>
Good. Can you also test this more simpler patch? It should produce the same results as the earlier patch, unless I'm misunderstanding something about C unions.

Message body is not shown because sender requested not to inline it.

Aurelien, and other porters: ping?
From: jurica.stanojkovic [...] rt-rk.com
On Sun Feb 09 15:10:08 2014, TSCH wrote: Show quoted text
> Good. Can you also test this more simpler patch? It should produce the > same results as the earlier patch, unless I'm misunderstanding something > about C unions.
Patch 0001-Fix-return-value-handling-on-big-endian-architecture.patch resolve problems on mips32 big endian. I have tried proposed patch on mips (big-endian 32bit). Debian package libglib-object-introspection-perl_0.020-1 was built successfully without errors. I do not have access to other big-endian architectures to test patch with. Thanks! Jurica PS. Is it possible to support at least 32bit big endian arhitectures until problem is resolved for 64bit ones?
FTR, I've applied Torsten's latest patch and uploaded a 0.020-2 package with it to Debian.
On Sun Mar 23 05:36:06 2014, intrigeri@boum.org wrote: Show quoted text
> FTR, I've applied Torsten's latest patch and uploaded a 0.020-2 > package with it to Debian.
... and it has built fine on 32-bit big endian architectures: https://buildd.debian.org/status/package.php?p=libglib-object-introspection-perl Torsten, do you plan to apply this patch upstream? And then, I'm curious what happens with 64-bit big endian architectures. Anyone feels like giving it a try?
Alright, I just committed my patch to the git repository. Let us know if there are more problems.
On Sat May 10 19:45:42 2014, TSCH wrote: Show quoted text
> Alright, I just committed my patch to the git repository.
Thanks a lot! Show quoted text
> Let us know if there are more problems.
My understanding is that "we" have only fixed things for *32-bit* big-endian architectures. Shall I file a dedicated bug report for 64-bit big-endian, or do you prefer to re-open this one?
Subject: Re: [rt.cpan.org #89552] Tests fail on big-endian architectures.
Date: Sat, 02 Aug 2014 17:12:23 +0200
To: bug-Glib-Object-Introspection [...] rt.cpan.org
From: Torsten Schoenfeld <kaffeetisch [...] gmx.de>
On 15.05.2014 11:33, intrigeri via RT wrote: Show quoted text
> My understanding is that "we" have only fixed things for *32-bit* > big-endian architectures. Shall I file a dedicated bug report for > 64-bit big-endian, or do you prefer to re-open this one?
If you find that the tests are still failing, please open a new bug report.