Cross Compiling for raspberry pi 3 on Linux error with boost

Viewed 113

I have a raspberry pi 3 model b and I want to cross compile my application for it so I wont have to leave my PC on all the time. Any way I'm getting an error when I run cmake .. -DCMAKE_TOOLCHAIN_FILE=/home/sean/Code/toolchains/cmake-files/raspberry-pi/Toolchain-Raspberry-pi.cmake:

Make Error at /usr/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package):
  Found package configuration file:

    /usr/lib/cmake/boost_system-1.71.0/boost_system-config.cmake

  but it set boost_system_FOUND to FALSE so package "boost_system" is
  considered to be NOT FOUND.  Reason given by package:

  No suitable build variant has been found.

  The following variants have been tried and rejected:

  * libboost_system.so.1.71.0 (64 bit, need 32)

  * libboost_system.a (64 bit, need 32)

Call Stack (most recent call first):
  /usr/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
  /usr/share/cmake-3.15/Modules/FindBoost.cmake:443 (find_package)
  CMakeLists.txt:17 (find_package)


-- Configuring incomplete, errors occurred!

My cross compiler cmake file (Toolchain-Raspberry-pi.cmake):

set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)

set(CMAKE_C_COMPILER $ENV{HOME}/Code/toolchains/crosscompile-raspberrypi/bin/arm-unknown-linux-androideabi-gcc)
set(CMAKE_CXX_COMPILER $ENV{HOME}/Code/toolchains/crosscompile-raspberrypi/bin/arm-unknown-linux-androideabi-g++)

set(CMAKE_FIND_ROOT_PATH $ENV{HOME}/Code/toolchains/crosscompile-raspberrypi/)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

I did install lib32-boost-libs from AUR and its in /usr/lib32 but it doesn't seem to care about those.

0 Answers
Related