all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#24613: Windows build with rsvg fails on newest MinGW
@ 2016-10-04 12:12 Nikolay Kudryavtsev
  2016-10-04 14:10 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Nikolay Kudryavtsev @ 2016-10-04 12:12 UTC (permalink / raw)
  To: 24613

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






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-10-07 12:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-04 12:12 bug#24613: Windows build with rsvg fails on newest MinGW Nikolay Kudryavtsev
2016-10-04 14:10 ` 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

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.