交叉编译dbus文章汇总

2023-11-21 18:58
文章标签 编译 文章 汇总 交叉 dbus

本文主要是介绍交叉编译dbus文章汇总,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

预安装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 dbus-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://jz345.net/?action-viewnews-itemid-51660

这篇关于交叉编译dbus文章汇总的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/404391

相关文章

maven 编译构建可以执行的jar包

💝💝💝欢迎莅临我的博客,很高兴能够在这里和您见面!希望您在这里可以感受到一份轻松愉快的氛围,不仅可以获得有趣的内容和知识,也可以畅所欲言、分享您的想法和见解。 推荐:「stormsha的主页」👈,「stormsha的知识库」👈持续学习,不断总结,共同进步,为了踏实,做好当下事儿~ 专栏导航 Python系列: Python面试题合集,剑指大厂Git系列: Git操作技巧GO

Windows环境利用VS2022编译 libvpx 源码教程

libvpx libvpx 是一个开源的视频编码库,由 WebM 项目开发和维护,专门用于 VP8 和 VP9 视频编码格式的编解码处理。它支持高质量的视频压缩,广泛应用于视频会议、在线教育、视频直播服务等多种场景中。libvpx 的特点包括跨平台兼容性、硬件加速支持以及灵活的接口设计,使其可以轻松集成到各种应用程序中。 libvpx 的安装和配置过程相对简单,用户可以从官方网站下载源代码

【Kubernetes】常见面试题汇总(三)

目录 9.简述 Kubernetes 的缺点或当前的不足之处? 10.简述 Kubernetes 相关基础概念? 9.简述 Kubernetes 的缺点或当前的不足之处? Kubernetes 当前存在的缺点(不足)如下: ① 安装过程和配置相对困难复杂; ② 管理服务相对繁琐; ③ 运行和编译需要很多时间; ④ 它比其他替代品更昂贵; ⑤ 对于简单的应用程序来说,可能不

java计算机毕设课设—停车管理信息系统(附源码、文章、相关截图、部署视频)

这是什么系统? 资源获取方式在最下方 java计算机毕设课设—停车管理信息系统(附源码、文章、相关截图、部署视频) 停车管理信息系统是为了提升停车场的运营效率和管理水平而设计的综合性平台。系统涵盖用户信息管理、车位管理、收费管理、违规车辆处理等多个功能模块,旨在实现对停车场资源的高效配置和实时监控。此外,系统还提供了资讯管理和统计查询功能,帮助管理者及时发布信息并进行数据分析,为停车场的科学

Golang test编译使用

创建文件my_test.go package testsimport "testing"func TestMy(t *testing.T) {t.Log("TestMy")} 通常用法: $ go test -v -run TestMy my_test.go=== RUN TestMyTestMy: my_test.go:6: TestMy--- PASS: TestMy (0.

文章解读与仿真程序复现思路——电力自动化设备EI\CSCD\北大核心《考虑燃料电池和电解槽虚拟惯量支撑的电力系统优化调度方法》

本专栏栏目提供文章与程序复现思路,具体已有的论文与论文源程序可翻阅本博主免费的专栏栏目《论文与完整程序》 论文与完整源程序_电网论文源程序的博客-CSDN博客https://blog.csdn.net/liang674027206/category_12531414.html 电网论文源程序-CSDN博客电网论文源程序擅长文章解读,论文与完整源程序,等方面的知识,电网论文源程序关注python

【Kubernetes】常见面试题汇总(一)

目录 1.简述 etcd 及其特点? 2.简述 etcd 适应的场景? 3.简述什么是Kubernetes? 4.简述 Kubernetes和 Docker的关系? 1.简述 etcd 及其特点? (1)etcd 是Core0s 团队发起的开源项目,是一个管理配置信息和服务发现(service discovery)的项目,它的目标是构建一个高可用的分布式键值(keyvalue)数据

C++/《C/C++程序编译流程》

程序的基本流程如图:   1.预处理        预处理相当于根据预处理指令组装新的C/C++程序。经过预处理,会产生一个没有宏定义,没有条件编译指令,没有特殊符号的输出文件,这个文件的含义同原本的文件无异,只是内容上有所不同。 读取C/C++源程序,对其中的伪指令(以#开头的指令)进行处理将所有的“#define”删除,并且展开所有的宏定义处理所有的条件编译指令,如:“#if”、“

编译linux内核出现 arm-eabi-gcc: error: : No such file or directory

external/e2fsprogs/lib/ext2fs/tdb.c:673:29: warning: comparison between : In function 'max2165_set_params': -。。。。。。。。。。。。。。。。。。 。。。。。。。。。。。。。 。。。。。。。。 host asm: libdvm <= dalvik/vm/mterp/out/Inte

QT 编译报错:C3861: ‘tr‘ identifier not found

问题: QT 编译报错:C3861: ‘tr’ identifier not found 原因 使用tr的地方所在的类没有继承自 QObject 类 或者在不在某一类中, 解决方案 就直接用类名引用 :QObject::tr( )