小编SBF*_*SBF的帖子

摆脱"警告:命令替换:忽略输入中的空字节"

我收到-bash: warning: command substitution: ignored null byte in input的时候我跑model=$(cat /proc/device-tree/model)

bash --version
GNU bash, version 4.4.12(1)-release (arm-unknown-linux-gnueabihf)
Run Code Online (Sandbox Code Playgroud)

使用bash版本4.3.30就可以了

我理解问题是\0文件中的终止字符,但是如何抑制这个愚蠢的消息呢?因为我正在使用bash 4.4,所以我的整个剧本都搞砸了

bash

10
推荐指数
2
解决办法
2万
查看次数

ARM的交叉编译:对'__fdelt_chk@GLIBC_2.15'的未定义引用

按照这个方法,我正在为Raspberry Pi(ARM)交叉编译蓝牙应用程序.当我尝试与libbluetooth链接时,我收到以下错误.即使是最简单的helloworld应用程序(没有蓝牙代码)也不会链接.

arm-linux-gnueabihf-g++ -c hello.cpp -o hello.o
arm-linux-gnueabihf-g++ hello.o -o hello -lbluetooth -L/home/sbf/raspberrypi/rootfs/usr/lib/arm-linux-gnueabihf
/home/sbf/raspberrypi/rootfs/usr/lib/arm-linux-gnueabihf/libbluetooth.so: undefined reference to `__fdelt_chk@GLIBC_2.15'


sbf@sbf-VirtualBox ~/raspberrypi/projects/test $ ls -al /home/sbf/raspberrypi/rootfs/usr/lib/arm-linux-gnueabihf/libbluetooth*
-rw-r--r-- 1 sbf sbf 132886 May 27  2016 /home/sbf/raspberrypi/rootfs/usr/lib/arm-linux-gnueabihf/libbluetooth.a
lrwxrwxrwx 1 sbf sbf     23 Nov 24 21:20 /home/sbf/raspberrypi/rootfs/usr/lib/arm-linux-gnueabihf/libbluetooth.so -> libbluetooth.so.3.17.11
lrwxrwxrwx 1 sbf sbf     23 Nov 24 21:20 /home/sbf/raspberrypi/rootfs/usr/lib/arm-linux-gnueabihf/libbluetooth.so.3 -> libbluetooth.so.3.17.11
-rw-r--r-- 1 sbf sbf 103376 May 27  2016 /home/sbf/raspberrypi/rootfs/usr/lib/arm-linux-gnueabihf/libbluetooth.so.3.17.11
Run Code Online (Sandbox Code Playgroud)

编辑(已添加):GLIBC版本2.19

pi@raspberrypi:~ $ ldd --version
ldd (Debian GLIBC 2.19-18+deb8u6) 2.19
Run Code Online (Sandbox Code Playgroud)

出了什么问题?

c++ arm cross-compiling raspberry-pi

2
推荐指数
1
解决办法
1852
查看次数

标签 统计

arm ×1

bash ×1

c++ ×1

cross-compiling ×1

raspberry-pi ×1