PATCH: configure error when cross compiling dbus core 0.94

Marco Pracucci development at
Wed Oct 18 09:33:41 PDT 2006


I had a problem when I tried to cross compile (arm) dbus core sources. Configure script exits with error:
checking abstract socket namespace... configure: error: cannot run test program while cross compiling

I've written a simple patch that adds an "abstract socket namespace" entry to config.cache, so you can set this option editing config.cache file, when cross compiling. The patch is attached below.

NOTE: a similar patch should be applied to dbus-glib binding sources.

Marco Pracucci

--- dbus-0.94-original/     2006-10-18 16:04:05.000000000 +0000
+++ dbus-0.94/      2006-10-18 16:12:21.000000000 +0000
@@ -650,9 +650,10 @@

 #### Abstract sockets

-AC_MSG_CHECKING(abstract socket namespace)
+AC_CACHE_CHECK([abstract socket namespace],
+               ac_cv_have_abstract_sockets,
+               [AC_RUN_IFELSE([AC_LANG_PROGRAM(
 #include <sys/types.h>
 #include <stdlib.h>
@@ -688,22 +689,22 @@
     exit (0);
-              [have_abstract_sockets=yes],
-              [have_abstract_sockets=no])
+              [ac_cv_have_abstract_sockets=yes],
+              [ac_cv_have_abstract_sockets=no])])

 if test x$enable_abstract_sockets = xyes; then
-    if test x$have_abstract_sockets = xno; then
+    if test x$ac_cv_have_abstract_sockets = xno; then
        AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.])

 if test x$enable_abstract_sockets = xno; then
-   have_abstract_sockets=no;
+   ac_cv_have_abstract_sockets=no;

-if test x$have_abstract_sockets = xyes ; then
+if test x$ac_cv_have_abstract_sockets = xyes ; then
    AC_DEFINE(HAVE_ABSTRACT_SOCKETS,1,[Have abstract socket namespace])
@@ -1214,7 +1215,7 @@
         Gettext libs (empty OK):  ${INTLLIBS}
         Using XML parser:         ${with_xml}
         Init scripts style:       ${with_init_scripts}
-        Abstract socket names:    ${have_abstract_sockets}
+        Abstract socket names:    ${ac_cv_have_abstract_sockets}
         System bus socket:        ${DBUS_SYSTEM_SOCKET}
         System bus address:       ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS}
         System bus PID file:      ${DBUS_SYSTEM_PID_FILE}

More information about the dbus mailing list