3

I am trying to build IoTivity framework on Raspberry Pi 2, which has arm architecture and running on Ubuntu Mate 15.04. I proceed official guide to build IoTivity on linux (Linux: Getting started). The main issue is when i want to build IoTivity using scons command:

scons TARGET_OS=linux TARGET_ARCH=arm

Output from terminal:

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!

I know I need to have installed arm gcc and g++ compiler, so I installed arm-linux-gnueabihf-gcc-4.8 and arm-linux-gnueabihf-g++-4.8 and I updated project-config.jam according this advice.

I tried this tutorial but unsuccessful. What did I do wrong ? I would be happy for any advices, guide how to build IoTivity framework on armv7 architecture. Thanks.

Community
  • 1
  • 1
Fillip
  • 41
  • 6
  • Given that it's repeated a warning about having the right versions of libraries eight times, then failed with an error about not being able to find the right version of a library, I'd say it probably can't find the right version of the Boost libraries. You start off implying you're building natively on the Pi, but then have a load of stuff about cross-building - which is it? – Notlikethat Mar 03 '16 at 20:03
  • I think it is cross-building problem because on my desktop PC with Ubuntu 14.04 **x86_64** building is without errors. This is output to compare from terminal from desktop pc (x86_64): http://pastebin.com/MveU0g0s First difference is **Checking for POSIX Thread Support...no**. I don't know what change in compiling settings....I tried many guide for arm compilling but unsuccessful :(. – Fillip Mar 03 '16 at 21:15
  • @Fillip did you find any solution for this I am trying many days . The webpage(https://wiki.iotivity.org/doku.php?id=build_iotivity_for_raspberry_pi) says that we need use Wheezy do i really need to try with Wheezy ? . currently using Jessie . – WorkaroundNewbie Jun 14 '17 at 11:21

3 Answers3

4

You are missing the headers for boost-thread and other Boost packages. Install them on your development system:

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

Or check https://wiki.iotivity.org/doku.php?id=build_iotivity_for_raspberry_pi

Toby Speight
  • 27,591
  • 48
  • 66
  • 103
1

After lot of struggle (trying out both the other answers) .I finally figured out that reason why this error is coming for me is that . I have already build iotivity project for x86 . it has compiled some of the libraries for x86 . To solve this take a fresh copy of iotivity and then build iotivity for arm.

WorkaroundNewbie
  • 1,063
  • 9
  • 16
-1

It appears that you are missing the packages containing the Boost header files. It's pretty easy to rectify that:

sudo apt-get install libboost-dev

You may prefer libboost-all-dev if your source depends on lots of Boost packages.

Toby Speight
  • 27,591
  • 48
  • 66
  • 103