Chinaunix首页 | 论坛 | 博客
  • 博客访问: 228007
  • 博文数量: 71
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 1025
  • 用 户 组: 普通用户
  • 注册时间: 2007-12-25 19:00
文章分类

全部博文(71)

文章存档

2009年(2)

2008年(69)

我的朋友

分类:

2008-03-24 15:53:19

先装xml,版本libxml2-2.6.8,这个库一定要安装到/usr/local/arm/3.3.2/arm-linux而不是安装到/usr/local/arm/3.3.2下,否则会出现如下错误:
make[2]: Entering directory `/root/download/dbus-1.0.2/bus'
/bin/sh ../libtool --tag=CC --mode=link arm-linux-gcc  -g -O2 -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wfloat-equal -Wsign-compare -fno-common -fPIC   -o dbus-daemon  activation.o bus.o config-parser.o connection.o desktop-file.o dir-watch-dnotify.o dispatch.o driver.o expirelist.o policy.o selinux.o services.o signals.o test.o utils.o config-loader-libxml.o main.o  -lxml2 -lpthread -lz -lm     -lpthread ../dbus/libdbus-convenience.la
arm-linux-gcc -g -O2 -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wfloat-equal -Wsign-compare -fno-common -fPIC -o dbus-daemon activation.o bus.o config-parser.o connection.o desktop-file.o dir-watch-dnotify.o dispatch.o driver.o expirelist.o policy.o selinux.o services.o signals.o test.o utils.o config-loader-libxml.o main.o  -lxml2 -lz -lm -lpthread ../dbus/.libs/libdbus-convenience.a
/usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/../../../../arm-linux/bin/ld: cannot find -lxml2
collect2: ld returned 1 exit status
make[2]: *** [dbus-daemon] Error 1
make[2]: Leaving directory `/root/download/dbus-1.0.2/bus'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/download/dbus-1.0.2'
make: *** [all] Error 2


dbus-1.0.2
echo ac_cv_have_abstract_sockets=yes>arm-linux.cache

然后

CC=arm-linux-gcc ./configure --host=arm-linux --cache-file=arm-linux.cache

make && make install



错误

ysdeps-unix.Tpo -c dbus-sysdeps-unix.c  -fPIC -DPIC -o .libs/dbus-sysdeps-unix.odbus-sysdeps-unix.c: In function `_dbus_connect_tcp_socket':
dbus-sysdeps-unix.c:785: error: `AI_ADDRCONFIG' undeclared (first use in this function)
dbus-sysdeps-unix.c:785: error: (Each undeclared identifier is reported only once
dbus-sysdeps-unix.c:785: error: for each function it appears in.)
dbus-sysdeps-unix.c: In function `_dbus_listen_tcp_socket':
dbus-sysdeps-unix.c:888: error: `AI_ADDRCONFIG' undeclared (first use in this function)
make[3]: *** [dbus-sysdeps-unix.lo] Error 1
make[3]: Leaving directory `/root/download/dbus-1.0.2/dbus'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/download/dbus-1.0.2/dbus'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/download/dbus-1.0.2'

解决:

注:上面的错误信息是在dbus-1.1.20中的,可能与本版本有些不同,但大体上是差不多的,解决方法如下:

在arm-linux-gcc 3.3.2的交叉编译器的include目录netdb.h中加入AI_ADDRCONFIG的宏定义就可以了

#define AI_ADDRCONFIG    0x0020  /* Use configuration of this host to choose
                                  returned address type.  */



阅读(2863) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~