我在x86_64(Ubuntu 18.04)主机系统上为我的ARM Cortex-A9(Debian 9)设备交叉编译了ARMNN。
我已经成功构建了ARMNN及其所有依赖关系,没有任何错误,但是当我尝试在Cortex-A9上运行示例mnist时,它出现以下错误:
duu@34d456-45433g:~/ML-examples/armnn-mnist$ make test
arm-linux-gnueabihf-g++ -O3 -std=c++14 -I/home/duu/armnn/armnn/include mnist_caffe.cpp -o mnist_caffe -L/home/duu/build -larmnn -larmnnCaffeParser
/home/admin/build/libarmnn.so: undefined reference to `exp2f@GLIBC_2.27'
/home/admin/build/libarmnn.so: undefined reference to `logf@GLIBC_2.27'
/home/admin/build/libarmnn.so: undefined reference to `log2f@GLIBC_2.27'
/home/admin/build/libarmnn.so: undefined reference to `powf@GLIBC_2.27'
/home/admin/build/libarmnn.so: undefined reference to `expf@GLIBC_2.27'
collect2: error: ld returned 1 exit status
Makefile:12: recipe for target 'mnist_caffe' failed
make: *** [mnist_caffe] Error 1
我后来发现,该设备应具有相同的编译器和相同的GLIBC软件包,两者的版本应与在其上编译该库的主机相同。
[我在主机上使用gcc-6.4.0和glibc-2.27编译了ARMNN,在Cortex-A9设备上使用了gcc-6.3.0和glibc-2.24。
我设法匹配了GCC版本并解决了编译器错误,但在Ubuntu 18.04和debian 9上找不到匹配的GLIBC版本。
是否有任何方法可以在这两个系统中的任何一个上安装GLIBC版本?
P.S。 :高度赞赏解决此问题的任何其他方法。
这里是我现在可以想到的可能选项的列表:
LD_LIBRARY_PATH
指向包含从x86_64系统复制的arm glibc动态库(v2.27)的目录时运行应用程序-请参阅this post。>-static -static-libgcc -static-libstdc++
将其链接-请参见this post。>>