Cross-Compiling D-BUS

Jared Hanson jaredhanson at
Mon Sep 27 18:56:57 UTC 2004

On Mon, 27 Sep 2004 09:32:58 +0100, Rob Taylor <robtaylor at> wrote:
> On Sat, 25 Sep 2004 09:49:52 -0400, "Havoc Pennington" <hp at>
> said:
> > On Fri, 2004-09-24 at 14:44 -0500, Jared Hanson wrote:
> > >   Is there anyway I can prevent these checks
> > > from running?
> >
> > I believe to allow cross-compiling has to have defaults for
> > all these checks, or maybe there's some way to specify them. Anyway
> > there's some standard answer no doubt specified in the autoconf manual.
> >
> > You will have to figure out that standard answer and modify
> > to reflect it. If you do, please send us the patch. ;-)
> Take a config.cache from a configure on a box you can configure on,
> remove any tests that aren't AC_TRY_RUN (or other tests that are
> impossible in your cross compile environment), modify their values to
> those required by your target architecture and pass it into configure
> using the --cache-file option.

Ok, I'm going to run down what I discovered in case it is of any use to anybody.

First, I made a config.cache file and put the following in it:

That managed to fixed my problem for that check, as the configure
script just used my chached variable.

However, the same error occurred when configure was checking abstract
socket namespace.  I tried setting have_abstract_sockets=no in
config.cache, but that did not work.

Note here, that I think the cause of this problem is that for
getpwname_r, configure is using the AC_CACHE_CHECK macro in  However, for the abstract sockets namespace check, it
does its own custom jive and doesn't check the cache file.  (This
stuff begins on line 25051 of configure from the dbus-0.22 source tar
file).  From my reading of this stuff, it falls into a test for cross
compilation and bails no matter what (even if you pass
--disable-abstract-sockets to configure.)  My solution was, of course,
to put a test case around this statement if abstract sockets have been
disabled.  After I did that, everything configured correctly.

I've attached a diff of the original configure file against my changes
and attached it to this message.  I'm not sure this is the correct way
to go about this.  However, maybe my discoveries will be useful.  If
anyone has any questions about what I did feel free to ask.  Comments
are appreciated as well if I could be doing something more correctly.

Jared Hanson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-configure-absockxcomp
Type: application/octet-stream
Size: 224 bytes
Desc: not available
Url :

More information about the dbus mailing list