GNOME Bugzilla – Bug 626902
t/64bit.t fails on Win32.
Last modified: 2010-11-08 22:52:26 UTC
Created attachment 167852 [details] "perl -V" output Hi, Same failures on both perl-5.10.1 and perl-5.12.1: ########################################## C:\_32\comp\Glib-1.223>perl t/64bit.t 1..12 ok 1 - The object isa Glib::Param::Int64 not ok 2 # Failed test at t/64bit.t line 25. # got: '1' # expected: '-9223372036854775807' not ok 3 # Failed test at t/64bit.t line 26. # got: '-1' # expected: '9223372036854775807' ok 4 ok 5 - The object isa Glib::Param::UInt64 ok 6 not ok 7 # Failed test at t/64bit.t line 35. # got: '4294967295' # expected: '18446744073709551615' ok 8 not ok 9 # Failed test at t/64bit.t line 46. # got: '1' # expected: '-9223372036854775807' not ok 10 # Failed test at t/64bit.t line 48. # got: '-1' # expected: '9223372036854775807' ok 11 not ok 12 # Failed test at t/64bit.t line 53. # got: '4294967295' # expected: '18446744073709551615' # Looks like you failed 6 tests of 12. ####################################### My "perl -V" (5.12.1) output is (hopefully)attached. Note that ivsize=4 and nvsize=8. My Glib-1.223 has been built against libglib-2.0-0.dll Cheers, Rob
Created attachment 173579 [details] [review] Try to fix the 64bit converters for mingw32 If we're not being compiled with the Microsoft compiler, just use strtoll and strtoull everywhere.
Can you try this patch? If you have the tools, test results with MS's compiler and Cygwin would also be interesting.
The patch works fine for me. I'm not set up to test Cygwin, but I've tested with: 1) gcc-3.4.5 (x86), perl 5.8.9 2) gcc-4.6.0 (x64), perl 5.12.2 3) MSVC++ 7.0 (x86), perl 5.10.0 My x64 Microsoft compiler (Microsoft Platform SDK for Windows Server 2003 R2) won't build glib because of some issue with the glib headers: C:/Gtk+_64\include\glib-2.0\glib\gmessages.h(140) : error C2010: '.' : unexpected in macro formal parameter list C:/Gtk+_64\include\glib-2.0\glib\gmessages.h(140) : error C2010: '.' : unexpected in macro formal parameter list C:/Gtk+_64\include\glib-2.0\glib\gmessages.h(140) : error C2010: '.' : unexpected in macro formal parameter list C:/Gtk+_64\include\glib-2.0\glib\gmessages.h(147) : error C2010: '.' : unexpected in macro formal parameter list C:/Gtk+_64\include\glib-2.0\glib\gmessages.h(147) : error C2010: '.' : unexpected in macro formal parameter list C:/Gtk+_64\include\glib-2.0\glib\gmessages.h(147) : error C2010: '.' : unexpected in macro formal parameter list [snip - more similar] The offending section of the header is: 140: #define g_error(...) G_STMT_START { \ 141: g_log (G_LOG_DOMAIN, \ 142: G_LOG_LEVEL_ERROR, \ 143: __VA_ARGS__); \ 144: for (;;) ; \ 145: } G_STMT_END 146: 147: #define g_message(...) g_log (G_LOG_DOMAIN, \ 148: G_LOG_LEVEL_MESSAGE, \ MSVC++ 7.0 has no problem with the same syntax, so I don't know why Microsoft have decided that my x64 compiler should find it unacceptable. Thanks for the patch. Cheers, Rob
I eventually added the pre-requisite libraries to my Cygwin installation so that I could build, test and install Glib-1.223 (including the GType.xs patch). All went fine - all tests passed !! (That was perl 5.10.1 and gcc-4.3.4, btw.) Cheers, Rob
Good. I committed the patch to Glib's git repository then. Thanks for the testing. The libglib guys might be interested to hear about the gmessage.h compile error.