protobuf arm linux,caffe移植ARM爬坑日志-protobuf交叉編譯

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 .

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值