After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 626902 - t/64bit.t fails on Win32.
t/64bit.t fails on Win32.
Status: RESOLVED FIXED
Product: gnome-perl
Classification: Bindings
Component: Glib
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gtk2-perl-bugs
gtk2-perl-bugs
Depends on:
Blocks:
 
 
Reported: 2010-08-14 01:41 UTC by sisyphus1
Modified: 2010-11-08 22:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
"perl -V" output (2.39 KB, text/plain)
2010-08-14 01:41 UTC, sisyphus1
  Details
Try to fix the 64bit converters for mingw32 (2.71 KB, patch)
2010-10-30 23:47 UTC, Torsten Schoenfeld
committed Details | Review

Description sisyphus1 2010-08-14 01:41:57 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
Comment 1 Torsten Schoenfeld 2010-10-30 23:47:58 UTC
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.
Comment 2 Torsten Schoenfeld 2010-10-30 23:49:13 UTC
Can you try this patch?  If you have the tools, test results with MS's compiler and Cygwin would also be interesting.
Comment 3 sisyphus1 2010-10-31 02:51:36 UTC
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
Comment 4 sisyphus1 2010-10-31 05:33:50 UTC
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
Comment 5 Torsten Schoenfeld 2010-11-08 22:52:22 UTC
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.