abstract-sockets problem compiling dbus with arm-linux cross compiler

Avery Pennarun apenwarr at gmail.com
Thu May 15 06:50:36 PDT 2008


On 5/15/08, Havoc Pennington <hp at pobox.com> wrote:
>  On Thu, May 15, 2008 at 8:54 AM, Avery Pennarun <apenwarr at gmail.com> wrote:
>  > I think most "standard" autoconf tests have a way to degrade
>  > gracefully in the case of cross-compiling.  (In fact, most autoconf
>  > tests simply test *compiling* the program, not *running* the program,
>  > so it's not a problem.)  It sounds like the specific problem here is
>  > the test for abstract sockets, which is probably not a standard
>  > autoconf one, and thus might be missing the graceful degradation.  If
>  > there's a "--no-abstract-sockets" option or something to configure,
>  > passing that should cause configure to skip the test and work okay.
>
> Fair enough. We'll take patches of course to fix this, but they will
>  need to come from someone who does cross-compilation and knows the
>  right way to fix.

I just took a look at dbus 1.2.1 to see how easy this would be.
Basically, anything that says AC_RUN in configure.in will be
incompatible with cross compiling, because it attempts to run a
compiled program.  AC_TRY_COMPILE and friends work fine.

There are a few too many AC_RUN commands to make it easy to produce a
patch on short notice, and I don't have much time right now.
Basically, to make it work, each of these would have to be replaced
with AC_TRY_COMPILE (which is not always easy or possible), or else a
separate (optional) command-line option would have to be provided to
override each test.

Or you could do a trick that I've used in the past, which is to simply
run "./configure" on the host system exactly once, then modify and
store the generated Makefile and config.h files to work with the
target system.  It's a bit gross, but it gets the job done in the
short term.

Have fun,

Avery


More information about the dbus mailing list