Cross-Compile for arm-linux, build problems

Fritz Code codefritz at googlemail.com
Thu May 15 01:44:31 PDT 2008


Hi,

I try to cross compile dbus-1.2.1 for an embedded linux arm device.

At the first I had to disable some  tests with an entry in config.cache:
ac_cv_have_abstract_sockets=no

After that there was no problem in running configure.

The Variable $CC is exported and set to arm-linux-gcc
I'm starting configure with the following arguments:
./configure --config-cache --build=i686-linux --target=arm-linux
--prefix=/opt/devel/toolchains/arm9/arm-linux --host=arm-linux

I've attached my config.log if it helps

When I try to make the following error occurs:
-------------------------

dbus-sysdeps-unix.c: In function `_dbus_connect_tcp_socket':
dbus-sysdeps-unix.c:792: error: `AI_ADDRCONFIG' undeclared (first use in
this function)
dbus-sysdeps-unix.c:792: error: (Each undeclared identifier is reported only
once
dbus-sysdeps-unix.c:792: error: for each function it appears in.)
dbus-sysdeps-unix.c: In function `_dbus_listen_tcp_socket':
dbus-sysdeps-unix.c:895: error: `AI_ADDRCONFIG' undeclared (first use in
this function)

Doing some research I figured out that this Constant is not exported
anymore, but should be set to 4.
So I did the definition manually by adding #define AI_ADDRCONFIG 4 to
dbus/dbus-sysdeps-unix.c


After that I ran into following error:
-------------------------

arm-linux-gcc -DHAVE_CONFIG_H -I. -I.. -I..  -I/usr/include
-DDBUS_LOCALEDIR=\"/opt/devel/toolchains/arm9/arm-linux/share/locale\"
-DDBUS_COMPILATION
-DDBUS_DAEMONDIR=\"/opt/devel/toolchains/arm9/arm-linux/bin\"
-DDBUS_MACHINE_UUID_FILE=\""/opt/devel/toolchains/arm9/arm-linux/var/lib/dbus/machine-id"\"
-ffunction-sections -fdata-sections -g -O2 -Wall -Wchar-subscripts
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith
-Wcast-align -Wfloat-equal -Wsign-compare -fno-common -MT dbus-launch.o -MD
-MP -MF .deps/dbus-launch.Tpo -c -o dbus-launch.o dbus-launch.c
In Datei, eingefügt von /usr/include/bits/sigcontext.h:28,
                    von /usr/include/signal.h:333,
                    von dbus-launch.c:29:
/usr/include/asm/sigcontext.h:9:4: Warnung: #warning This machine appears to
be neither x86_64 nor i386.
In file included from dbus-launch.c:29:
/usr/include/signal.h:336: Warnung: `struct sigcontext' declared inside
parameter list
/usr/include/signal.h:336: Warnung: its scope is only this definition or
declaration, which is probably not what you want
In file included from /usr/include/linux/errno.h:4,
                    von /usr/include/bits/errno.h:25,
                    von /usr/include/errno.h:36,
                    von dbus-launch.c:31:
/usr/include/asm/errno.h:9:4: Warnung: #warning This machine appears to be
neither x86_64 nor i386.
dbus-launch.c: In Funktion »read_line«:
dbus-launch.c:210: error: `EINTR' undeclared (first use in this function)
dbus-launch.c:210: error: (Each undeclared identifier is reported only once


At this point I took a look at /usr/include/asm/errno.h and
/usr/include/asm/sigcontext.h (the origin of the errors)
and commented just quick and dirty the x86_64 version, so that it's forced
to use i386.



After that I ran into the following error:
-------------------------

arm-linux-gcc -ffunction-sections -fdata-sections -g -O2 -Wall
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs -Wpointer-arith -Wcast-align -Wfloat-equal -Wsign-compare
-fno-common -o .libs/dbus-monitor dbus-monitor.o dbus-print-message.o
../dbus/.libs/libdbus-1.so -lpthread  -Wl,--rpath
-Wl,/opt/devel/toolchains/arm9/arm-linux/lib
creating dbus-monitor
arm-linux-gcc -DHAVE_CONFIG_H -I. -I.. -I..  -I/usr/include
-DDBUS_LOCALEDIR=\"/opt/devel/toolchains/arm9/arm-linux/share/locale\"
-DDBUS_COMPILATION
-DDBUS_DAEMONDIR=\"/opt/devel/toolchains/arm9/arm-linux/bin\"
-DDBUS_MACHINE_UUID_FILE=\""/opt/devel/toolchains/arm9/arm-linux/var/lib/dbus/machine-id"\"
-ffunction-sections -fdata-sections -g -O2 -Wall -Wchar-subscripts
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith
-Wcast-align -Wfloat-equal -Wsign-compare -fno-common -MT dbus-launch.o -MD
-MP -MF .deps/dbus-launch.Tpo -c -o dbus-launch.o dbus-launch.c
dbus-launch.c: In Funktion »kill_bus_when_session_ends«:
dbus-launch.c:472: error: impossible constraint in `asm'
dbus-launch.c:473: error: impossible constraint in `asm'


And now I need some help please.

Thanks.
--fritz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20080515/26452ada/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log
Type: text/x-log
Size: 177378 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20080515/26452ada/attachment-0001.bin 


More information about the dbus mailing list