Trying to cross compile for raspberry pi on ubuntu, and it is throwing an error

Compiling for the raspberry pi has proven to be a problem. It keeps throwing this error

    ./ line 30: /home/rahul/Documents/3dGraph/ No such file or directory
CMake Error at CMake/Toolchains/RaspberryPi.cmake:81 (message):
  Could not find Raspberry Pi cross compilation tool.  Use RPI_PREFIX
  environment variable or build option to specify the location of the

for reference, my environment variables are as follows:


I tried using this:

But the prefix path specified above does not exist; it doesn’t point to a folder, but the bin folder does point to a folder with a bunch of files starting with arm-linux-gnueabihf.
I’m guessing the SYSROOT works because it threw that error first but after setting the variable it stopped.

I did download rpi-sysroot and I compiled crosstool-ng for ARM processors, though I did not use that compiled folder because I had no idea where to point the variable from that folder (named x-tools)

The RPI CI on Travis is setup as per document in the link above. The CI works as expected. You can use the .travis.yml at the root of Urho source tree as a guide to quickly get your development environment setup. HTH.

I’m sorry. I don’t know what you mean by that. I tried looking for .travis.yml everywhere and couldn’t find it (looked in repos and in my Linux VM). Am I missing a file? Is this file Urho source the RPI_PREFIX environment variable? Also is the link above the one I posted, because I don’t know what you mean by that. Sorry if this is annoying.

Travis config file is located here:

So, do I add that to where my project is and then build using the script? Or do I somehow run the .yml file? No idea how to use the travis.config file either. Is there anywhere I can find how to run or use the file?

EDIT: Figured out how to use Travis, but now it wants a Rakefile and I don’t know what that is nor can I get any info on it

No, you can’t run the file directly (as far as I know) but you can find a lot of useful stuff there - basically a bunch of commands that you can run to get your build up and running

From .travis.yml:

git clone --depth 1 rpi-tools
export RPI_PREFIX=$(pwd)/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf
git clone --depth 1
export RPI_SYSROOT=$(pwd)/rpi-sysroot 

That got rid of that error, and brought a new one

CMake Error at CMake/Modules/FindUrho3D.cmake:346 (message):
  Could NOT find compatible Urho3D library in Urho3D SDK installation or
  build tree.  Use URHO3D_HOME environment variable or build option to
  specify the location of the non-default SDK installation or build tree.
  Change Dir: /home/rahul/Documents/3dGraph/work/CMakeFiles/CMakeTmp


  Run Build Command:"/usr/bin/make" "cmTC_3da6f/fast"

  /usr/bin/make -f CMakeFiles/cmTC_3da6f.dir/build.make

  make[1]: Entering directory

  Building CXX object CMakeFiles/cmTC_3da6f.dir/CheckUrhoLibrary.cpp.o

  --sysroot=/home/rahul/Documents/3dGraph/rpi-sysroot -DURHO3D_STATIC_DEFINE
  -o CMakeFiles/cmTC_3da6f.dir/CheckUrhoLibrary.cpp.o -c

  Linking CXX executable cmTC_3da6f

  /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3da6f.dir/link.txt

  CMakeFiles/cmTC_3da6f.dir/CheckUrhoLibrary.cpp.o -o cmTC_3da6f -rdynamic

  /home/rahul/Urho3D/lib/libUrho3D.a: error adding symbols: File format not

  collect2: error: ld returned 1 exit status

  CMakeFiles/cmTC_3da6f.dir/build.make:98: recipe for target 'cmTC_3da6f'

  make[1]: *** [cmTC_3da6f] Error 1

  make[1]: Leaving directory

  Makefile:126: recipe for target 'cmTC_3da6f/fast' failed

  make: *** [cmTC_3da6f/fast] Error 2

Call Stack (most recent call first):
  CMake/Modules/UrhoCommon.cmake:238 (find_package)
  CMakeLists.txt:21 (include)

-- Configuring incomplete, errors occurred!
See also "/home/rahul/Documents/3dGraph/work/CMakeFiles/CMakeOutput.log".
See also "/home/rahul/Documents/3dGraph/work/CMakeFiles/CMakeError.log".

Relevant environment variables: URHO3D_HOME=/home/rahul/Urho3D

I thought it may have been that my Urho3D hadnt been compiled for the raspi, but when I tried doing that, this happened

    CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find Broadcom VideoCore firmware (missing: VIDEOCORE_LIBRARIES
    Call Stack (most recent call first):
      /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
      CMake/Modules/FindVideoCore.cmake:39 (find_package_handle_standard_args)
      CMake/Modules/UrhoCommon.cmake:158 (find_package)
      CMakeLists.txt:45 (include)

    -- Configuring incomplete, errors occurred!
    See also "/home/rahul/Urho3D/CMakeFiles/CMakeOutput.log".
    See also "/home/rahul/Urho3D/CMakeFiles/CMakeError.log".