Created attachment 115425 [details] configuration error screen snapshot Build System : MSYS2 64 bits,added component "mingw-w64-cross-gcc 4.9.2" configure command line is : ./configure --enable-shared=yes --enable-static=yes --prefix=/mingw64 --host=x86_64-pc-msys error snapshot: ... checking ws2tcpip.h usability... no checking ws2tcpip.h presence... yes configure: WARNING: ws2tcpip.h: present but cannot be compiled configure: WARNING: ws2tcpip.h: check for missing prerequisite headers? configure: WARNING: ws2tcpip.h: see the Autoconf documentation configure: WARNING: ws2tcpip.h: section "Present But Cannot Be Compiled" configure: WARNING: ws2tcpip.h: proceeding with the compiler's result configure: WARNING: ## ---------------------------------------------------------------------- ## configure: WARNING: ## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=dbus ## configure: WARNING: ## ---------------------------------------------------------------------- ## checking for ws2tcpip.h... no ... configure: error: Explicitly requested expat but expat not found
No need for screenshots, text is enough. (In reply to zydadan from comment #0) > checking ws2tcpip.h usability... no > checking ws2tcpip.h presence... yes > configure: WARNING: ws2tcpip.h: present but cannot be compiled > configure: WARNING: ws2tcpip.h: check for missing prerequisite headers? > configure: WARNING: ws2tcpip.h: see the Autoconf documentation > configure: WARNING: ws2tcpip.h: section "Present But Cannot Be Compiled" If you look in config.log you should find detailed compiler errors from what happens when configure tries to #include <ws2tcpip.h>. Please provide those here. It looks as though it might be necessary to #include <winsock2.h> first: <https://msdn.microsoft.com/en-us/library/windows/desktop/ms738562%28v=vs.85%29.aspx> Alternatively, it seems that we already include that header unconditionally on Windows: (dbus/dbus-sysdeps.h) #ifdef DBUS_WIN #include <ws2tcpip.h> #endif so we can probably just drop this check from the Autoconf and CMake build systems, and change #ifdef HAVE_WS2TCPIP_H /* getaddrinfo for Windows CE (and Windows). */ #include <ws2tcpip.h> #endif to just #include <ws2tcpip.h> in dbus/dbus-sysdeps-win.c.
(In reply to zydadan from comment #0) > ... > configure: error: Explicitly requested expat but expat not found there are no expat development header available.
Created attachment 115439 [details] config.log which is generated in ./configure failure, as you wish.
(In reply to zydadan from comment #0) > checking for ws2tcpip.h... no > ... > configure: error: Explicitly requested expat but expat not found As Ralf spotted, these two issues are unrelated. There are two unrelated failures in this log: 1) ws2tcpip.h ============= The check for ws2tcpip.h detects it as present but unusable. Looking into the detailed log, we see: In file included from /usr/include/w32api/winsock2.h:56:0, from /usr/include/w32api/ws2tcpip.h:17, from conftest.c:110: /usr/include/w32api/psdk_inc/_fd_types.h:100:2: warning: #warning "fd_set and associated macros have been defined in sys/types. This can cause runtime problems with W32 sockets" [-Wcpp] #warning "fd_set and associated macros have been defined in sys/types. \ ^ In file included from /usr/include/w32api/ws2tcpip.h:17:0, from conftest.c:110: /usr/include/w32api/winsock2.h:1004:34: error: conflicting types for 'gethostname' WINSOCK_API_LINKAGE int WSAAPI gethostname(char *name,int namelen); ^ In file included from /usr/include/stdio.h:29:0, from conftest.c:77: /usr/include/sys/unistd.h:249:6: note: previous declaration of 'gethostname' was here int _EXFUN(gethostname, (char *__name, size_t __len)); ^ I think this means that your development environment is broken... you can only have one correct signature for gethostname(). You used: > --host=x86_64-pc-msys but on my Debian system, the mingw-w64 cross-build environment uses the GNU tuple x86_64-w64-mingw32, and this seems to be the canonical one as documented on http://sourceforge.net/p/mingw-w64/wiki2/TypeTriplets/. 2) Expat ======== > configure: error: Explicitly requested expat but expat not found You don't have Expat development files installed. Compiling D-Bus requires Expat. There is no workaround or way to avoid this, you must obtain a suitable Expat library before continuing. Neither of these two issues seems to be a bug in D-Bus.
Thanks for you all! I'm compiling dbus in windows7 64bit with msys2 64bit. Even when I installed all the expat component and pass '--host=x86_64-w64-mingw32' to ./configure, there are still many problems in compiling. 1. expat component installed, pass '--host=x86_64-w64-mingw32' to ./configure, but ./configure still reports error: configure: error: Explicitly requested expat but expat not found 2. expat component installed, do not pass '--host=x86_64-w64-mingw32' to ./configure. configuration succeeds, but error raised in compiling : activation-helper.c: 在函数‘switch_user’中: activation-helper.c:308:3: 警告:隐式声明函数‘initgroups’ [-Wimplicit-function-declaration] if (initgroups (user, pw->pw_gid)) ^ activation-helper.c:308:3: 警告:对‘initgroups’的嵌套的外部声明 [-Wnested-externs] I think this should still not be the bug of dbus -- just as Mr.Simon McVittie mentioned --. but, could you help me to solve it if possible? thanks!
Well, I've made the compilation passed in msys2 on windows 7 by doing as below: In MINGW32 shell, add "--host=i686-w64-mingw32 --build=i686-pc-msys" as extra options to ./configure In MINGW64 shell, add "--host=x86_64-w64-mingw32 --build=x86_64-pc-msys" as extra options to ./configure In MSYS2 shell, it seems that there is no way to make compilation passed.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.