博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
交叉编译dbus文章汇总
阅读量:4056 次
发布时间:2019-05-25

本文共 4016 字,大约阅读时间需要 13 分钟。

预安装vmware6.0, debian4.0 linux OS 配置IP, samba, telnet等网络服务
安装包命令:
./configure CC=arm-unknown-linux-gnu-gcc --prefix=/home/qudc/nfs --host=arm-linux --cache-file=arm-linux.cache
指定交叉编译工具                      指定安装路径          指定目标平台
make
make install
1. 把"export PATH=$PATH:/home/qudc/gcc-4.0.2-glibc-2.3.5/arm-unknown-linux-gnu/bin (不要加/)" 加入/home/qudc/.bashrc
export交叉编译工具链接路径. 
2. 用root apt-get install gcc
3. 解压交叉编译工具和linux kernel 使kernel 中make menuconfig 成功. 会遇到头文件报错问题: 安装libc6-dev 和 libncurses5-dev 这两个包. make menuconfig 成功.
4. 安装pkg-config (只能是0.9版, 系统debian4是0.21版, 不然dbus编译不过) 为glib做准备. apt-get install pkg-config
5. 解决安装glib的编译错误
stack pointer 问题:
echo ac_cv_type_long_long=yes>arm-linux.cache
echo glib_cv_stack_grows=no>>arm-linux.cache
echo glib_cv_uscore=no>>arm-linux.cache
echo ac_cv_func_posix_getpwuid_r=yes>>arm-linux.cache 
configure: error: Could not find a glib-genmarshal in your PATH
解压glib2-devel-2.4.7-1.tar.gz, 将文件复制到/usr/local下面
6. 安装expat-2.0.0.tar.gz
7. 安装libxml.tar.bz2
下载dbus源码,地址是http://www.freedesktop.org/wiki/Software/dbus
8. install
dbus-1.0.2.tar.gz
checking abstract socket namespace... configure: error: cannot run test program while cross compiling
#echo ac_cv_have_abstract_sockets=yes>arm-linux.cache
PKG_CONFIG_PATH 问题:
在.bashrc里 export PKG_CONFIG_PATH
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/home/qudc/nfs/lib/pkgconfig
configure成功
9. Install
-glib-0.74.tar.gz
checking for posix getpwnam_r... configure: error: cannot run test program while cross compiling
checking abstract socket namespace... configure: error: cannot run test program while cross compiling
在arm-linux.cache文件里加两行
ac_cv_func_posix_getpwnam_r=yes
ac_cv_have_abstract_sockets=yes
./configure: line 26052: ./po/POTFILES.in: No such file or directory (这行有人说可以忽略)
checking for XML_ParserCreate_MM in -lexpat... (cached) no
configure: error: expat library not found, check config.log for failed attempts
解决: #./configure CC=arm-unknown-linux-gnu-gcc CPPFLAGS=-I/home/qudc/nfs/include LDFLAGS=-L/home/qudc/nfs/lib --prefix=/home/qudc/nfs --host=arm-linux --cache-file=arm-linux.cache
make 出错信息:
Making all in examples
make[4]: Entering directory `/home/qudc/dbus-glib-0.74/dbus/examples'
/bin/sh ../../libtool --mode=execute ../../dbus/dbus-binding-tool --prefix=some_object --mode=glib-server --output=example-service-glue.h ./example-service.xml
/home/qudc/dbus-glib-0.74/dbus/examples/../../dbus/dbus-binding-tool: line 105: /home/qudc/dbus-glib-0.74/dbus/.libs/lt-dbus-binding-tool: cannot execute binary file
/home/qudc/dbus-glib-0.74/dbus/examples/../../dbus/dbus-binding-tool: line 105: /home/qudc/dbus-glib-0.74/dbus/.libs/lt-dbus-binding-tool: Success
make[4]: *** [example-service-glue.h] Error 1
make[4]: Leaving directory `/home/qudc/dbus-glib-0.74/dbus/examples'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/qudc/dbus-glib-0.74/dbus'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/qudc/dbus-glib-0.74/dbus'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/qudc/dbus-glib-0.74'
make: *** [all] Error 2
解决:修改./dbus/Makefile. 
   SUBDIRS = . examples => SUBDIRS = . #example
make再次出错信息:
Making all in tools
make[2]: Entering directory `/home/qudc/dbus-glib-0.74/tools'
DBUS_TOP_BUILDDIR=.. dbus-daemon --introspect > dbus-bus-introspect.xml.tmp && mv dbus-bus-introspect.xml.tmp dbus-bus-introspect.xml
../dbus/dbus-binding-tool --mode=glib-client --prefix=dbus_bus --output=dbus-glib-bindings.h dbus-bus-introspect.xml
../dbus/dbus-binding-tool: line 105: /home/qudc/dbus-glib-0.74/dbus/.libs/lt-dbus-binding-tool: cannot execute binary file
../dbus/dbus-binding-tool: line 105: /home/qudc/dbus-glib-0.74/dbus/.libs/lt-dbus-binding-tool: Success
make[2]: *** [dbus-glib-bindings.h] Error 1
make[2]: Leaving directory `/home/qudc/dbus-glib-0.74/tools'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/qudc/dbus-glib-0.74'
make: *** [all] Error 2
解决: 修改./dbus/Makefile. 
   SUBDIRS = . examples => SUBDIRS = . #example
D-BUS编译终于完成.

转载地址:http://bpoci.baihongyu.com/

你可能感兴趣的文章
Django框架全面讲解 -- Form
查看>>
今日互联网关注(写在清明节后):每天都有值得关注的大变化
查看>>
”舍得“大法:把自己的优点当缺点倒出去
查看>>
[今日关注]鼓吹“互联网泡沫,到底为了什么”
查看>>
[互联网学习]如何提高网站的GooglePR值
查看>>
[关注大学生]求职不可不知——怎样的大学生不受欢迎
查看>>
[关注大学生]读“贫困大学生的自白”
查看>>
[互联网关注]李开复教大学生回答如何学好编程
查看>>
[关注大学生]李开复给中国计算机系大学生的7点建议
查看>>
[茶余饭后]10大毕业生必听得歌曲
查看>>
VC++ MFC SQL ADO数据库访问技术使用的基本步骤及方法
查看>>
VUE-Vue.js之$refs,父组件访问、修改子组件中 的数据
查看>>
Python自动化之pytest常用插件
查看>>
Python自动化之pytest框架使用详解
查看>>
【正则表达式】以个人的理解帮助大家认识正则表达式
查看>>
性能调优之iostat命令详解
查看>>
性能调优之iftop命令详解
查看>>
非关系型数据库(nosql)介绍
查看>>
移动端自动化测试-Windows-Android-Appium环境搭建
查看>>
Xpath使用方法
查看>>