cross-compiling on top of mingw-w64 gcc, from ubuntu, with a modified version of mingw-cross-env, I run : automake && ./configure --host='x86_64-w64-mingw32' --prefix='/home/performance/prgm/mingw-cross-env-x86/usr/x86_64-w64-mingw32' --disable-shared --enable-static with this, I get errors, among which the first : CCLD dbus-launch.exe CC dbus-monitor.o CC dbus-print-message.o CCLD dbus-monitor.exe dbus-monitor.o: In function `profile_print_with_attrs': /home/performance/prgm/mingw-cross-env-x86/tmp-dbus/dbus-1.5.8/tools/dbus-monitor.c:154: undefined reference to `__imp_dbus_message_get_error_name' /home/performance/prgm/mingw-cross-env-x86/tmp-dbus/dbus-1.5.8/tools/dbus-monitor.c:151: undefined reference to `__imp_dbus_message_get_member' /home/performance/prgm/mingw-cross-env-x86/tmp-dbus/dbus-1.5.8/tools/dbus-monitor.c:148: undefined reference to `__imp_dbus_message_get_interface' /home/performance/prgm/mingw-cross-env-x86/tmp-dbus/dbus-1.5.8/tools/dbus-monitor.c:145: undefined reference to `__imp_dbus_message_get_path' /home/performance/prgm/mingw-cross-env-x86/tmp-dbus/dbus-1.5.8/tools/dbus-monitor.c:142: undefined reference to `__imp_dbus_message_get_destination' /home/performance/prgm/mingw-cross-env-x86/tmp-dbus/dbus-1.5.8/tools/dbus-monitor.c:139: undefined reference to `__imp_dbus_message_get_sender' /home/performance/prgm/mingw-cross-env-x86/tmp-dbus/dbus-1.5.8/tools/dbus-monitor.c:136: undefined reference to `__imp_dbus_message_get_reply_serial' /home/performance/prgm/mingw-cross-env-x86/tmp-dbus/dbus-1.5.8/tools/dbus-monitor.c:133: undefined reference to `__imp_dbus_message_get_serial' I am trying to compile "static", but it seems there is some confusion with dll?
*** This bug has been marked as a duplicate of bug 33973 ***
*** Bug 46366 has been marked as a duplicate of this bug. ***
Created attachment 57476 [details] compilation log, configure.ac, configure.log
the bug was not really the same as 33973, and the proposed action did not solved the problem...
oops sorry : the proposed patch on the configure.ac did not work : if test "x$enable_shared" = xno; then AC_DEFINE([DBUS_STATIC_BUILD], [1], [Define to 1 if you are only building static libraries]) fi but adding DDBUS_STATIC_BUILD worked : ./configure [...] --enable-static --disable-shared CFLAGS=-DDBUS_STATIC_BUILD I'll have a look to see a way to include this in configure.ac cheers
Created attachment 57488 [details] [review] adds "disable_shared" detection
Created attachment 57489 [details] [review] patch to dbus-1-5-8/tools/Makefile.am
Here are patches to dbus-1.5.8/configure.ac and dbus-1.5.8/tools/Makefile.am to fix the problem.
(In reply to comment #4) > the bug was not really the same as 33973 The cause and solution appear to be the same, even if your compilation environment is different. I'm going to (re-)close this as a duplicate and use Bug #33973 as the "main" bug, since that ensures that the reporter of 33973 gets cc'd. (In reply to comment #8) > Here are patches to dbus-1.5.8/configure.ac and dbus-1.5.8/tools/Makefile.am to > fix the problem. Thanks, these look good. I've adjusted them a bit to add some comments and propagate DBUS_BUILD_STATIC to the pkg-config files too, when in a static-only build (which I believe is necessary if you're using pkg-config). I'll attach the results to Bug #33973. *** This bug has been marked as a duplicate of bug 33973 ***
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.