Hi list,
Please forgive me if this is not the right place to ask help for building emacs
on Win32.
Since Emacs 24.4 has a builtin web browser (eww), I couldn't wait any longer so
I'm trying to build it from the latest git (git commit head 165e52e, Author:
Paul Eggert <
address@hidden> Date: Sun Dec 29 10:18:45 2013 -0800 Plain
copy-file no longer chmods an existing destination.) on Windows 7. I was
following the instructions in /path/to/emacs/sources/nt/INSTALL. I got
successful build as long as I don't build emacs with libxml2 (with "configure
--without-xml2"), despite having a lot of warning messages. However, as soon as
I removed the "--without-xml2" I was stuck. Since the builtin web browser
requires that emacs been built with libxml2, there is no point to build emacs
without libxml2. Here is my building process:
cd /d/emacs.source
./autogen.sh
cd /d
mkdir emacs
cd emacs
/d/emacs.source/configure --prefix=/d/usr
make
My MinGW is installed in /d/usr, and MSYS in /d/usr/msys. I downloaded GTK
bundle from
http://www.gtk.org/download/win32.php, unzipped and copied to
/d/usr/gtk, and added "/d/usr/gtk/bin" to PATH. Libxml2 include dir is in GTK
bundle.
I also tried cloning libxml2 repository, checked out v2.9.1, compiled
successfully and installed to /d/usr/libxml2 but didn't help. I tried
downloading libxml2 v2.7.8 win32 from
http://sourceforge.net/projects/ezwinports/files/, unzipped and copied to
/d/usr/libxml2, then copied the directory "include/libxml2" into
"gtk/include/libxml2" (overwritting the later) but didn't help either.
Here's the errors I got from "make":
In file included from d:/emacs.source/src/xml.c:19:0:
./config.h:1761:19: error: two or more data types in declaration specifiers
#define mbstate_t int
^
In file included from d:/usr/gtk/include/iconv.h:106:0,
from d:/usr/gtk/include/libxml2/libxml/encoding.h:28,
from d:/usr/gtk/include/libxml2/libxml/parser.h:807,
from d:/usr/gtk/include/libxml2/libxml/globals.h:18,
from d:/usr/gtk/include/libxml2/libxml/threads.h:35,
from d:/usr/gtk/include/libxml2/libxml/xmlmemory.h:218,
from d:/usr/gtk/include/libxml2/libxml/tree.h:1248,
from d:/emacs.source/src/xml.c:23:
d:\usr\include\wchar.h:816:32: error: conflicting types for '_wstat64i32'
__CRT_MAYBE_INLINE int __cdecl _wstat64i32(const wchar_t *fname, struct _stat64i32 *_stat)
^
d:\usr\include\wchar.h:814:29: note: previous declaration of '_wstat64i32' was here
int __cdecl __MINGW_NOTHROW _wstat64i32 (const wchar_t*, struct _stat64i32*);
^
d:\usr\include\wchar.h: In function '_wstat64i32':
d:\usr\include\wchar.h:818:20: error: storage size of 'st' isn't known
struct _stat64 st;
^
d:\usr\include\wchar.h:821:31: error: invalid application of 'sizeof' to incomplete type 'struct _stat64i32'
memset(_stat, 0, sizeof(struct _stat64i32));
^
d:\usr\include\wchar.h:824:10: error: dereferencing pointer to incomplete type
_stat->st_dev = st.st_dev;
^
d:\usr\include\wchar.h:825:10: error: dereferencing pointer to incomplete type
_stat->st_ino = st.st_ino;
^
d:\usr\include\wchar.h:826:10: error: dereferencing pointer to incomplete type
_stat->st_mode = st.st_mode;
^
d:\usr\include\wchar.h:827:10: error: dereferencing pointer to incomplete type
_stat->st_nlink = st.st_nlink;
^
d:\usr\include\wchar.h:828:10: error: dereferencing pointer to incomplete type
_stat->st_uid = st.st_uid;
^
d:\usr\include\wchar.h:829:10: error: dereferencing pointer to incomplete type
_stat->st_gid = st.st_gid;
^
d:\usr\include\wchar.h:830:10: error: dereferencing pointer to incomplete type
_stat->st_rdev = st.st_rdev;
^
d:\usr\include\wchar.h:831:10: error: dereferencing pointer to incomplete type
_stat->st_size = (_off_t) st.st_size;
^
d:\usr\include\wchar.h:832:10: error: dereferencing pointer to incomplete type
_stat->st_atime = st.st_atime;
^
d:\usr\include\wchar.h:833:10: error: dereferencing pointer to incomplete type
_stat->st_mtime = st.st_mtime;
^
d:\usr\include\wchar.h:834:10: error: dereferencing pointer to incomplete type
_stat->st_ctime = st.st_ctime;
^
d:\usr\include\wchar.h: At top level:
d:\usr\include\wchar.h:837:32: error: conflicting types for '_wstat32i64'
__CRT_MAYBE_INLINE int __cdecl _wstat32i64(const wchar_t *fname, struct _stat32i64 *_stat) {
^
d:\usr\include\wchar.h:813:37: note: previous declaration of '_wstat32i64' was here
_CRTIMP int __cdecl __MINGW_NOTHROW _wstat32i64 (const wchar_t*, struct _stat32i64*);
^
d:\usr\include\wchar.h: In function '_wstat32i64':
d:\usr\include\wchar.h:838:18: error: storage size of 'st' isn't known
struct _stat32 st;
^
d:\usr\include\wchar.h:841:29: error: invalid application of 'sizeof' to incomplete type 'struct _stat32i64'
memset(_stat, 0, sizeof(struct _stat32i64));
^
d:\usr\include\wchar.h:844:8: error: dereferencing pointer to incomplete type
_stat->st_dev = st.st_dev;
^
d:\usr\include\wchar.h:845:8: error: dereferencing pointer to incomplete type
_stat->st_ino = st.st_ino;
^
d:\usr\include\wchar.h:846:8: error: dereferencing pointer to incomplete type
_stat->st_mode = st.st_mode;
^
d:\usr\include\wchar.h:847:8: error: dereferencing pointer to incomplete type
_stat->st_nlink = st.st_nlink;
^
d:\usr\include\wchar.h:848:8: error: dereferencing pointer to incomplete type
_stat->st_uid = st.st_uid;
^
d:\usr\include\wchar.h:849:8: error: dereferencing pointer to incomplete type
_stat->st_gid = st.st_gid;
^
d:\usr\include\wchar.h:850:8: error: dereferencing pointer to incomplete type
_stat->st_rdev = st.st_rdev;
^
d:\usr\include\wchar.h:851:8: error: dereferencing pointer to incomplete type
_stat->st_size = (_off_t) st.st_size;
^
d:\usr\include\wchar.h:852:8: error: dereferencing pointer to incomplete type
_stat->st_atime = st.st_atime;
^
d:\usr\include\wchar.h:853:8: error: dereferencing pointer to incomplete type
_stat->st_mtime = st.st_mtime;
^
d:\usr\include\wchar.h:854:8: error: dereferencing pointer to incomplete type
_stat->st_ctime = st.st_ctime;
^
make[1]: *** [xml.o] Error 1
make[1]: Leaving directory `/d/emacs/src'
make: *** [src] Error 2
Please also find attached the entire output from "make". Any help will
be
greatly appropriated.
Thanks in advance,
York