编译bluez-5.25 遇到的错误及解决方法

在编译前我已经做好了D-bus1.8.10,glib2.28.6,bluez-libs-3.36,bluez-utils-3.36的编译,并且已经设置好了环境,如果遇到明明已经成功了编译,却找不到编译后的库文件,可以参考http://blog.csdn.net/wang_shuai_ww/article/details/41720841。

我这里在完成上面说的之后,编译bluez-5.25遇到的问题如下:

首先是找不到libudev。

这个错误使用命令sudo apt-get install libudev-dev。如果使用的是Ubuntu的官方源,可能会报错,具体的解决方法,参考http://blog.csdn.net/wang_shuai_ww/article/details/41720605。

安装完之后,再次配置出现error: libical is required的错误,找不到 libical 。

解决方法同上sudo apt-get install libical-dev,如果参考http://blog.csdn.net/wang_shuai_ww/article/details/41720605已经修改了源,那么这一步是没有问题的。

然后又报错error: readline header files are required,这个可以参考http://blog.chinaunix.net/uid-20196318-id-3930371.html或者http://ubuntuforums.org/showthread.php?t=1670531,实际上使用sudo apt-get install libreadline-dev命令即可。如果使用的arm编译器没有改头文件,即使安装了,可能仍然解决不了,这时只需要把宿主机的/usr/includereadline整个目录拷贝到自己的arm-linux的编译器的usr/include目录下即可。不同的arm编译器可能路径不同,我这里的路径是/usr/local/arm/arm-cortex_a9-eabi-4.7/arm-cortex_a9-linux-gnueabi/sysroot/usr/include/。

然后还有错误checking systemd system unit dir... configure: error: systemd system unit directory is required,错误真多,烦死人。

该错误可以参考http://askubuntu.com/questions/343663/ubuntu-13-04-and-bluez-5-8-configure-error-systemd-system-unit-directory-is-re,具体的就是加上编译选项--sysconfdir=/etc
--localstatedir=/var --enable-experimental --with-systemdsystemunitdir=/lib/systemd/system --with-systemduserunitdir=/usr/lib/systemd

重新配置,终于大功告成。

附上配置的整个流程:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking for style of include used by make... GNU
checking for arm-gcc... arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include accepts -g... yes
checking for arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include option to accept ISO C89... none needed
checking dependency style of arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include... gcc3
checking how to run the C preprocessor... arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether make supports nested variables... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for arm-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for C/C++ restrict keyword... __restrict
checking for arm-gcc... (cached) arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include
checking whether we are using the GNU C compiler... (cached) yes
checking whether arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include accepts -g... (cached) yes
checking for arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include option to accept ISO C89... (cached) none needed
checking dependency style of arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include... (cached) gcc3
checking whether arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include and cc understand -c and -o together... yes
checking whether arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include accepts -fPIE... yes
checking build system type... arm-cortex_a9-linux-gnueabi
checking host system type... arm-unknown-none
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include... /usr/local/arm/arm-cortex_a9-eabi-4.7/arm-cortex_a9-linux-gnueabi/bin/ld
checking if the linker (/usr/local/arm/arm-cortex_a9-eabi-4.7/arm-cortex_a9-linux-gnueabi/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... no
checking for arm-dumpbin... no
checking for arm-link... no
checking for dumpbin... no
checking for link... link -dump
checking the name lister (nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert arm-cortex_a9-linux-gnueabi file names to arm-unknown-none format... func_convert_file_noop
checking how to convert arm-cortex_a9-linux-gnueabi file names to toolchain format... func_convert_file_noop
checking for /usr/local/arm/arm-cortex_a9-eabi-4.7/arm-cortex_a9-linux-gnueabi/bin/ld option to reload object files... -r
checking for arm-objdump... no
checking for objdump... objdump
checking how to recognize dependent libraries... unknown
checking for arm-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for arm-ar... no
checking for ar... ar
checking for archiver @FILE support... @
checking for arm-strip... strip
checking for arm-ranlib... no
checking for ranlib... ranlib
checking command to parse nm output from arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include object... ok
checking for sysroot... no
checking for arm-mt... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include supports -fno-rtti -fno-exceptions... no
checking for arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include option to produce PIC... -fPIC -DPIC
checking if arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include PIC flag -fPIC -DPIC works... yes
checking if arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include static flag -static works... yes
checking if arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include supports -c -o file.o... yes
checking if arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include supports -c -o file.o... (cached) yes
checking whether the arm-cortex_a9-linux-gnueabi-gcc -L/wsh_space/my_install/usr/lib/lib -I/wsh_space/my_install/usr/lib/include linker (/usr/local/arm/arm-cortex_a9-eabi-4.7/arm-cortex_a9-linux-gnueabi/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for signalfd... yes
checking for clock_gettime in -lrt... yes
checking for pthread_create in -lpthread... yes
checking for dlopen in -ldl... yes
checking for GLIB... yes
checking for DBUS... yes
checking D-Bus configuration directory... /wsh_space/my_install/usr/lib/etc
checking D-Bus system bus services dir... /wsh_space/my_install/usr/lib/share/dbus-1/system-services
checking D-Bus session bus services dir... /wsh_space/my_install/usr/lib/share/dbus-1/services
checking for UDEV... yes
checking for udev_hwdb_new in -ludev... no
checking udev directory... /lib/udev
checking for ICAL... yes
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/bluetoothd.8
config.status: creating lib/bluez.pc
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands

这里做个记录,希望能够解决其他人碰到的此类问题。

时间: 2024-11-09 16:37:55

编译bluez-5.25 遇到的错误及解决方法的相关文章

vc++ 编译连接错误and解决方法

1. LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol [email protected] Debug/lizi.exe : [分析]: 项目创建错误,因该选择Win32 Console Project,而不是 Win32 Projectvc++ 编译连接错误and解决方法,布布扣,bubuko.com

编译android源码遇到错误及其解决方法

升级ubuntu的14.04后,android的源码又编译错误了,一下是错误说明赫解决方法: 1.make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp] 断开的管道 解决方法: sudo apt-get install bison sudo apt-get install flex 2. sh: 1: gperf: not foundcalling gperf failed: 32

Windows下wxWidgets编译错误的解决方法

Windows下wxWidgets编译错误的解决方法 转自 https://www.jianshu.com/p/b89d205f2cec 错误提示:d:\develop\audacity\wxwidgets-3.1.1\include\wx\platform.h(148): fatal error C1083: 无法打开包括文件: “wx/setup.h”: No such file or directory 解决方法:1.到D:\develop\audacity\wxWidgets-3.1.1

运维实战案例之“Argument list too long”错误与解决方法

作为一名运维人员来说,这个错误并不陌生,在执行rm.cp.mv等命令时,如果要操作的文件数很多,可能会使用通配符批量处理大量文件,这时就可能会出现"Argument list too long"这个问题了. 1.错误现象 这是一台Mysql数据库服务器,在系统中运行了很多定时任务,今天通过crontab命令又添加了一个计划任务,退出时发生了如下报错: #crontab -e 编辑完成后,保存退出,就出现下面如下图所示错误: 2.解决思路 根据上面报错的提示信息,基本判定是磁盘空间满了,

idea调试SpringMvc, 出现:”Can't find catalina.jar"错误的解决方法

用gradle构建的项目,点击运行出现以下错误提示: Error running PraticeWeb: Can't find catalina.jar 21:54 Error running PraticeWeb Invalid arguments : Already listening [timeout, port, localAddress] 检查tomcat配置发现: File -> Setting -> Build,Execution,Deployment -> Applica

关于javac编译时出现“非法字符:\65279”的解决方法

一般用UE或记事本编辑过的UTF-8的文件头会加入BOM标识,该标识由3个char组成.在UTF-8的标准里该BOM标识是可有可无的,Sun 的javac 在编译带有BOM的UTF-8的格式的文件时会出现"非法字符:\65279"的错误,但是用Eclipse进行编译却没有问题,原因在于Eclipse使用的是自己的JDT,而非javac,关于JDT的描述可以到eclipse的官网上去查看. 出现这种情况时,有两种解决方法: a) 利用UE.Editplus等文本编辑器重新保存文件为不带B

WCF项目中出现常见错误的解决方法:基础连接已经关闭: 连接被意外关闭

原文:WCF项目中出现常见错误的解决方法:基础连接已经关闭: 连接被意外关闭 在我们开发WCF项目的时候,常常会碰到一些莫名其妙的错误,有时候如果根据它的错误提示信息,一般很难定位到具体的问题所在,而由于WCF服务的特殊性,调试起来也不是那么方便,因此往往会花费不少时间来进行跟踪处理.本文介绍我在我在我的框架里面使用WCF服务的时候,出现的一个常见错误的处理方法,它的提示信息是:基础连接已经关闭: 连接被意外关闭.这种情况我碰到的有两种,一种是返回DataTable的时候出现的,一种是返回实体类

ORA-06502: PL/SQL: numeric or value error: character to number conversion error 错误的解决方法

故障描述:中间层调用存储过程报错,到PL/SQL中对存储过程进行调试报以下错误 ORA-06502: PL/SQL: numeric or value error: character to number conversion errorORA-06512: at "PROCESS_DRUG_SAME_AS_INFO", line 24ORA-06512: at line 1 错误原因: 找到存储过程PROCESS_DRUG_SAME_AS_INFO,并将代码定位在24行,发现代码中两

如何解决KEIL 5 编译KEIL4的带有RTX系统的工程解决方法

1.笔者个人对KEIL5与KEIL4的比较 相较于KEIL 5 的"华丽",笔者还是喜欢KEIL4的"内敛",主要也还是习惯了,懒得换了.因为工作的  原        因,最 新的芯片上KEIL4没有支持,有人可能提出可以去下载芯片支持包加载进去,我相信这个肯定可以,估计  已经有很多网友这么做了,但是我想,新的实物总要求接触,固步自封不是一种好的习惯. 下面简单介绍两者的差异: KEIL4你不用担心,芯片的问题,因为大部分的芯片,但你装载软件的时候,就好自动的加