Как построить фреймворк IoTctivity на Raspberry Pi 2 с помощью команды scons

Я пытаюсь построить фреймворк IoTctivity на Raspberry Pi 2, который имеет архитектуру arm и работает на Ubuntu Mate 15.04. Я продолжаю официальное руководство по сборке IoTctivity на Linux ( Linux: Начало работы). Основная проблема заключается в том, когда я хочу создать IoTctivity с помощью команды scons:

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.8 и arm-linux-gnueabihf-g++-4.8 и обновил project-config.jam согласно этому совету.

Я пробовал этот урок, но безуспешно. Что я сделал не так? Буду рад любым советам, расскажу, как построить фреймворк IoTctivity на архитектуре armv7. Благодарю.

3 ответа

Вам не хватает заголовков для 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

После долгой борьбы (пробуя оба других ответа) . Я наконец-то понял, что причина этой ошибки для меня заключается именно в этом. Я уже собрал проект iotivity для x86 . он скомпилировал некоторые библиотеки для x86 . Чтобы решить эту проблему, возьмите новую копию iotivity и затем создайте iotivity для arm.

Похоже, что вам не хватает пакетов, содержащих файлы заголовков Boost. Это довольно легко исправить, что:

sudo apt-get install libboost-dev

Вы можете предпочесть libboost-all-dev если ваш источник зависит от множества пакетов Boost.

Другие вопросы по тегам