3

我正在尝试在 Raspberry Pi 2 上构建 IoTivity 框架,该框架具有 arm 架构并在 Ubuntu Mate 15.04 上运行。我继续在 linux 上构建 IoTivity 的官方指南(Linux:入门)。主要问题是当我想使用 scons 命令构建 IoTivity 时:

scons TARGET_OS=linux TARGET_ARCH=arm

终端输出:

filip@fiip:~/iotivity$ scons TARGET_OS=linux TARGET_ARCH=arm
scons: Reading SConscript files ...
Reading linux configuration script
Checking for POSIX Thread Support...no
Given Transport is ALL
Given OS is linux
BUILD_SAMPLE is ON
CA Transport is ALL
Reading ca script ALL
Reading common folder script
Reading util folder script
Reading IP adapter script
Reading BT EDR adapter script
Reading BLE adapter script for linux
Include path is ['./../api', '../api', '/home/filip/iotivity/deps/linux/include', '/home/filip/iotivity/extlibs/tinycbor/tinycbor/src', '/home/filip/iotivity/out/linux/arm/release/resource/csdk/logger/./include', '/home/filip/iotivity/out/linux/arm/release/resource/c_common', '/home/filip/iotivity/out/linux/arm/release/resource/c_common/oic_malloc/include', '/home/filip/iotivity/out/linux/arm/release/resource/c_common/oic_string/include', '/home/filip/iotivity/out/linux/arm/release/resource/c_common/oic_time/include', '/home/filip/iotivity/out/linux/arm/release/resource/c_common/ocrandom/include', '/usr/include/uuid', '../inc', '../lib/libcoap-4.1.1', '/resource/csdk/logger/include/', '../common/inc', '../util/inc', 'common/inc/', '/home/filip/iotivity/resource/csdk/logger/include/', './../inc', './../lib/libcoap-4.1.1', './../common/inc', './../util/inc', '/usr/include/gio-unix-2.0/', '/usr/include/glib-2.0', '/usr/lib/arm-linux-gnueabihf/glib-2.0/include']
Files path is ['./../common/src/uarraylist.c', './../common/src/ulinklist.c', './../common/src/uqueue.c', './../common/src/caremotehandler.c', './../common/src/camutex_noop.c', './../util/src/cautilinterface.c', './../util/src/camanager/linux/caleconnectionmanager.c', './adapter_util/caadapterutils.c', './adapter_util/cafragmentation.c', './cablockwisetransfer.c', './caconnectivitymanager.c', './cainterfacecontroller.c', './camessagehandler.c', './canetworkconfigurator.c', './caprotocolmessage.c', './caqueueingthread.c', './caretransmission.c', './ip_adapter/caipadapter.c', './ip_adapter/caipserver.c', './ip_adapter/linux/caipnwmonitor.c', './bt_edr_adapter/caedradapter.c', './bt_edr_adapter/linux/caedradapter.c', './bt_le_adapter/caleadapter.c', './bt_le_adapter/linux/characteristic.c', './bt_le_adapter/linux/descriptor.c', './bt_le_adapter/linux/service.c', './bt_le_adapter/linux/advertisement.c', './bt_le_adapter/linux/utils.c', './bt_le_adapter/linux/central.c', './bt_le_adapter/linux/peripheral.c', './bt_le_adapter/linux/client.c', './bt_le_adapter/linux/server.c', './bt_le_adapter/linux/recv.c', './bt_le_adapter/linux/caleinterface.c', './bt_le_adapter/linux/object_manager-glue.c', './bt_le_adapter/linux/bluez-glue.c']
Reading ca script ALL
Reading sample application build script
Sample secured flag is 0
 sample src ['./sample_main.c']

*********************************** Warning ***********************************
* You are trying cross build, please make sure (arm) version libraries are     *
* installed!                                                                  *
*******************************************************************************


*********************************** Warning ***********************************
* You are trying cross build, please make sure (arm) version libraries are     *
* installed!                                                                  *
*******************************************************************************


*********************************** Warning ***********************************
* You are trying cross build, please make sure (arm) version libraries are     *
* installed!                                                                  *
*******************************************************************************


*********************************** Warning ***********************************
* You are trying cross build, please make sure (arm) version libraries are     *
* installed!                                                                  *
*******************************************************************************


*********************************** Warning ***********************************
* You are trying cross build, please make sure (arm) version libraries are     *
* installed!                                                                  *
*******************************************************************************


*********************************** Warning ***********************************
* You are trying cross build, please make sure (arm) version libraries are     *
* installed!                                                                  *
*******************************************************************************

*** Checking for installation of google unit test 1.7.0 ***
*** Checking for installation of hippomocks ***

*********************************** Warning ***********************************
* You are trying cross build, please make sure (arm) version libraries are     *
* installed!                                                                  *
*******************************************************************************


*********************************** Warning ***********************************
* You are trying cross build, please make sure (arm) version libraries are
* installed!                                                              *
*******************************************************************************

Checking for C++ library boost_thread... no
Did not find boost_thread, exiting!

我知道我需要安装 arm gcc 和 g++ 编译器,所以我安装了arm-linux-gnueabihf-gcc-4.8arm-linux-gnueabihf-g++-4.8并根据 这个建议更新了 project-config.jam

我尝试了本教程 ,但没有成功。我做错了什么 ?我很乐意提供任何建议,指导如何在 armv7 架构上构建 IoTivity 框架。谢谢。

4

3 回答 3

4

您缺少 boost-thread 和其他 Boost 包的标头。将它们安装在您的开发系统上:

sudo apt-get install libboost-dev libboost-program-options-dev libexpat1-dev libboost-thread-dev uuid-dev libssl-dev scons libglib2.0-dev

或查看https://wiki.iotivity.org/doku.php?id=build_iotivity_for_raspberry_pi

于 2016-03-04T00:46:15.730 回答
1

经过大量的努力(尝试了其他两个答案)。我终于弄清楚了这个错误出现在我身上的原因是。我已经为 x86 构建了 iotivity 项目。它为 x86 编译了一些库。为了解决这个问题,需要一个新的 iotivity 副本,然后为 arm 构建 iotivity。

于 2017-07-11T12:40:33.110 回答
-1

您似乎缺少包含 Boost 头文件的包。纠正这一点很容易:

sudo apt-get install libboost-dev

libboost-all-dev如果您的源代码依赖于许多 Boost 包,您可能会更喜欢。

于 2016-04-01T09:46:38.490 回答