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 749161 - undefined reference to `__imp__stat32i64'
undefined reference to `__imp__stat32i64'
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.45.x
Other Windows
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-05-09 16:21 UTC by Partha
Modified: 2015-09-27 20:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix (1.17 KB, patch)
2015-09-26 22:23 UTC, Benjamin Gilbert
accepted-commit_now Details | Review

Description Partha 2015-05-09 16:21:40 UTC
Compiling glib 2.45.1 with gcc 4.9.2 64bit on windows 8.1 with Msys

glocalfile.c: In function 'g_local_file_measure_size_of_file':
glocalfile.c:2685:38: warning: passing argument 2 of '_wstat32i64' from incompatible pointer type
     retval = _wstat32i64 (wfilename, &buf);
                                      ^
In file included from glocalfile.c:24:0:
z:/foss/gcc/64bit/gcc-4.9.2/x86_64-w64-mingw32/include/sys/stat.h:127:23: note: expected 'struct _stat32i64 *' but argument is of type 'struct _stat64 *'
   _CRTIMP int __cdecl _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat);
                       ^
  CCLD     libgio-2.0.la
libtool: link: warning: `z:/opts/opt64/lib/../lib/libffi.la' seems to be moved
libtool: link: warning: `z:/opts/opt64/lib/../lib/libintl.la' seems to be moved
.libs/libgio_2_0_la-glocalfile.o: In function `g_local_file_measure_size_of_file':
Z:\src\gnome\glib-2.45.1\gio/glocalfile.c:2685: undefined reference to `__imp__wstat32i64'
collect2.exe: error: ld returned 1 exit status
Makefile:1919: recipe for target `libgio-2.0.la' failed
make[4]: *** [libgio-2.0.la] Error 1
make[4]: Leaving directory `/usr/src/gnome/glib-2.45.1/gio'
Makefile:3996: recipe for target `all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/src/gnome/glib-2.45.1/gio'
Makefile:1787: recipe for target `all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/gnome/glib-2.45.1/gio'
Makefile:1215: recipe for target `all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/gnome/glib-2.45.1'
Makefile:857: recipe for target `all' failed
make: *** [all] Error 2

Changing _wstat32i64 to _wstat64 seems to fix the issue.
Comment 1 Benjamin Gilbert 2015-09-26 22:23:21 UTC
Created attachment 312219 [details] [review]
Fix
Comment 2 Colin Walters 2015-09-27 20:08:38 UTC
Review of attachment 312219 [details] [review]:

I didn't verify the details here, but sounds good to me =)
Comment 3 Colin Walters 2015-09-27 20:09:08 UTC
Committed, thanks for the patch!

https://git.gnome.org/browse/glib/commit/?id=4745c08220b90eac741ae3ca1913cbe90c9831ef