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

本文介绍了Protobuf的编译步骤及解决过程中遇到的问题,包括安装必要的依赖包、配置跨平台编译参数等,并提供了具体的解决方法。

2protobuf编译

>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版本:切换到安装protobuflib目录下运行 $readelf -h libprotobuf-lite.amachine下是ARM .


评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值