From: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
To: 24613@debbugs.gnu.org
Subject: bug#24613: Windows build with rsvg fails on newest MinGW
Date: Tue, 4 Oct 2016 15:12:07 +0300 [thread overview]
Message-ID: <60bdc990-2296-0c76-ec5b-ca2707f544db@gmail.com> (raw)
I've been trying to get rsvg working and here's what I found:
First, building xml.o fails:
> CC xml.o
> In file included from d:/Emacs/source/emacs-25.1/src/conf_post.h:32:0,
> from ./config.h:1916,
> from d:/Emacs/source/emacs-25.1/src/xml.c:19:
> d:/Emacs/source/emacs-25.1/nt/inc/ms-w32.h:149:0: warning:
> "_WIN32_WINNT" redefined
> # define _WIN32_WINNT 0x0400
> ^
> In file included from c:\mingw\include\w32api.h:59:0,
> from c:\mingw\include\_mingw.h:73,
> from d:/Emacs/source/emacs-25.1/nt/inc/mingw_time.h:13,
> from d:/Emacs/source/emacs-25.1/nt/inc/ms-w32.h:27,
> from d:/Emacs/source/emacs-25.1/src/conf_post.h:32,
> from ./config.h:1916,
> from d:/Emacs/source/emacs-25.1/src/xml.c:19:
> c:\mingw\include\sdkddkver.h:184:0: note: this is the location of the
> previous definition
> # define _WIN32_WINNT _WIN32_WINNT_WIN2K
> ^
> In file included from c:\mingw\include\wchar.h:212:0,
> from c:\mingw\include\iconv.h:106,
> from C:/MinGW/include/libxml2/libxml/encoding.h:28,
> from C:/MinGW/include/libxml2/libxml/parser.h:807,
> from C:/MinGW/include/libxml2/libxml/globals.h:18,
> from C:/MinGW/include/libxml2/libxml/threads.h:35,
> from C:/MinGW/include/libxml2/libxml/xmlmemory.h:218,
> from C:/MinGW/include/libxml2/libxml/tree.h:1248,
> from d:/Emacs/source/emacs-25.1/src/xml.c:23:
> c:\mingw\include\sys/stat.h:173:8: error: redefinition of 'struct _stat'
> struct _stat __struct_stat_defined( _off_t, time_t );
> ^
> In file included from d:/Emacs/source/emacs-25.1/nt/inc/ms-w32.h:440:0,
> from d:/Emacs/source/emacs-25.1/src/conf_post.h:32,
> from ./config.h:1916,
> from d:/Emacs/source/emacs-25.1/src/xml.c:19:
> d:/Emacs/source/emacs-25.1/nt/inc/sys/stat.h:106:8: note: originally
> defined here
> struct _stat
> ^
> In file included from c:\mingw\include\wchar.h:212:0,
> from c:\mingw\include\iconv.h:106,
> from C:/MinGW/include/libxml2/libxml/encoding.h:28,
> from C:/MinGW/include/libxml2/libxml/parser.h:807,
> from C:/MinGW/include/libxml2/libxml/globals.h:18,
> from C:/MinGW/include/libxml2/libxml/threads.h:35,
> from C:/MinGW/include/libxml2/libxml/xmlmemory.h:218,
> from C:/MinGW/include/libxml2/libxml/tree.h:1248,
> from d:/Emacs/source/emacs-25.1/src/xml.c:23:
> c:\mingw\include\sys/stat.h:180:8: error: redefinition of 'struct stat'
> struct stat __struct_stat_defined( _off_t, time_t );
> ^
> In file included from d:/Emacs/source/emacs-25.1/nt/inc/ms-w32.h:440:0,
> from d:/Emacs/source/emacs-25.1/src/conf_post.h:32,
> from ./config.h:1916,
> from d:/Emacs/source/emacs-25.1/src/xml.c:19:
> d:/Emacs/source/emacs-25.1/nt/inc/sys/stat.h:89:8: note: originally
> defined here
> struct stat {
> ^
> In file included from c:\mingw\include\wchar.h:212:0,
> from c:\mingw\include\iconv.h:106,
> from C:/MinGW/include/libxml2/libxml/encoding.h:28,
> from C:/MinGW/include/libxml2/libxml/parser.h:807,
> from C:/MinGW/include/libxml2/libxml/globals.h:18,
> from C:/MinGW/include/libxml2/libxml/threads.h:35,
> from C:/MinGW/include/libxml2/libxml/xmlmemory.h:218,
> from C:/MinGW/include/libxml2/libxml/tree.h:1248,
> from d:/Emacs/source/emacs-25.1/src/xml.c:23:
> c:\mingw\include\sys/stat.h:188:8: error: redefinition of 'struct
> _stati64'
> struct _stati64 __struct_stat_defined( __off64_t, time_t );
> ^
> In file included from d:/Emacs/source/emacs-25.1/nt/inc/ms-w32.h:440:0,
> from d:/Emacs/source/emacs-25.1/src/conf_post.h:32,
> from ./config.h:1916,
> from d:/Emacs/source/emacs-25.1/src/xml.c:19:
> d:/Emacs/source/emacs-25.1/nt/inc/sys/stat.h:123:8: note: originally
> defined here
> struct _stati64 {
> ^
> In file included from d:/Emacs/source/emacs-25.1/src/xml.c:19:0:
> ./config.h:1836:19: error: two or more data types in declaration
> specifiers
> #define mbstate_t int
> ^
> make[1]: *** [xml.o] Error 1
> make[1]: Leaving directory `/d/Emacs/configs/25.1-MinGW-broken2/src'
> make: *** [src] Error 2
This code only runs when mbstate_t check fails. Let's look at why it fails:
> configure:18162: checking for mbstate_t
> configure:18179: gcc -I /d/Emacs/source/emacs-25.1/nt/inc -c -O0 -g3
> -mtune=pentium4 conftest.c >&5
> In file included from c:\mingw\include\wchar.h:212:0,
> from conftest.c:133:
> c:\mingw\include\sys/stat.h:173:8: error: redefinition of 'struct _stat'
> struct _stat __struct_stat_defined( _off_t, time_t );
> ^
> In file included from conftest.c:105:0:
> d:/Emacs/source/emacs-25.1/nt/inc/sys/stat.h:106:8: note: originally
> defined here
> struct _stat
> ^
> In file included from c:\mingw\include\wchar.h:212:0,
> from conftest.c:133:
> c:\mingw\include\sys/stat.h:180:8: error: redefinition of 'struct stat'
> struct stat __struct_stat_defined( _off_t, time_t );
> ^
> In file included from conftest.c:105:0:
> d:/Emacs/source/emacs-25.1/nt/inc/sys/stat.h:89:8: note: originally
> defined here
> struct stat {
> ^
> In file included from c:\mingw\include\wchar.h:212:0,
> from conftest.c:133:
> c:\mingw\include\sys/stat.h:188:8: error: redefinition of 'struct
> _stati64'
> struct _stati64 __struct_stat_defined( __off64_t, time_t );
> ^
> In file included from conftest.c:105:0:
> d:/Emacs/source/emacs-25.1/nt/inc/sys/stat.h:123:8: note: originally
> defined here
> struct _stati64 {
> ^
> configure:18179: $? = 1
Since stat.h is in mingwrt, I decided to check whether older versions
work. And sure, mingwrt-3.21.1 works fine.
Then, there's a similar situation with glib:
> make: *** [install-strip] Error 2
> from
> d:/Emacs/MinGW/include/librsvg-2.0/librsvg/rsvg.h:31,
> from d:/Emacs/source/emacs-25.1/src/image.c:8997:
> d:/Emacs/MinGW/include/glib-2.0/glib/gatomic.h:234:20: error:
> redefinition of 'MemoryBarrier'
> static inline void MemoryBarrier (void)
> ^
> In file included from d:\emacs\mingw\include\windef.h:269:0,
> from d:\emacs\mingw\include\windows.h:42,
> from d:/Emacs/source/emacs-25.1/src/w32gui.h:21,
> from d:/Emacs/source/emacs-25.1/src/dispextern.h:69,
> from d:/Emacs/source/emacs-25.1/src/window.h:23,
> from d:/Emacs/source/emacs-25.1/src/frame.h:23,
> from d:/Emacs/source/emacs-25.1/src/image.c:36:
> d:\emacs\mingw\include\winnt.h:4311:25: note: previous definition of
> 'MemoryBarrier' was here
> static FORCEINLINE void MemoryBarrier (void)
Installing w32api-3.17-2-mingw32-dev.tar.lzma helped.
--
Best Regards,
Nikolay Kudryavtsev
next reply other threads:[~2016-10-04 12:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-04 12:12 Nikolay Kudryavtsev [this message]
2016-10-04 14:10 ` bug#24613: Windows build with rsvg fails on newest MinGW Eli Zaretskii
2016-10-04 14:58 ` Nikolay Kudryavtsev
2016-10-04 15:33 ` Eli Zaretskii
2016-10-06 15:13 ` Eli Zaretskii
[not found] ` <c7ee0766-22b4-a448-496d-4f0a9feba819@gmail.com>
2016-10-07 12:39 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=60bdc990-2296-0c76-ec5b-ca2707f544db@gmail.com \
--to=nikolay.kudryavtsev@gmail.com \
--cc=24613@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.