您的位置:首页 > Web前端

caffe移植ARM爬坑日志-protobuf交叉编译

2018-01-06 10:19 369 查看


2、protobuf编译
>1  ./autogen.sh
出现错误:+ sed -i -e s/RuntimeLibrary="5"/RuntimeLibrary="3"/g;
           s/RuntimeLibrary="4"/RuntimeLibrary="2"/g; gtest/msvc/gtest-md.vcproj gtest/msvc/gtest.vcproj gtest/msvc/gtest_main-md.vcproj gtest/msvc/gtest_main.vcproj gtest/msvc/gtest_prod_test-md.vcproj gtest/msvc/gtest_prod_test.vcproj
gtest/msvc/gtest_unittest-md.vcproj gtest/msvc/gtest_unittest.vcproj
+ autoreconf -f -i -Wall,no-obsolete
./autogen.sh: 38: ./autogen.sh: autoreconf: not found
解决方法:$sudo apt-get install autoconf

                $sudo apt-get install automake

                $sudo apt-get install libtool

>2
./configure

>3 make

>4 make check

 
>5 make clean  
>6 ./configure --host=arm-linux CC=$toolchainPath/arm-linux-gnueabihf-gcc CXX=$toolchainPath/arm-linux-gnueabihf-g++ --with-protoc=protoc prefix=$installPath  
出现错误:checking for arm-linux-gcc... $/home/wolf/ti-processor-sdk-linux-am57xx-evm-03.03.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc
checking whether the C compiler works... no
configure: error: in `/home/wolf/Downloads/protobuf-2.6.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
解决方法:
./configure --host=arm-linux CC=/home/wolf/ti-processor-sdk-linux-am57xx-evm-03.03.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc CXX=/home/wolf/ti-processor-sdk-linux-am57xx-evm-03.03.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-g++
--with-protoc=protoc prefix=/home/wolf/Downloads/test
 
CC:表示GCC安装目录
CXX :表示G++安装目录
prefix:表示安装目录
>7 make
>8 make check (亲测加这条指令会出现错误,而且影响后面的make install,但是不需要这条指令后面都会通过,且不影响使用)
>9 make install
>10 检查protobuf版本:切换到安装protobuf的lib目录下运行
$readelf -h libprotobuf-lite.a,machine下是ARM
.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  caffe-arm移植