I am trying to install Iroha on Raspberry pi 3 and 4. I am manually building it as following:
1) git clone -b master https://github.com/hyperledger/iroha
cd iroha
mkdir build; cd build; cmake ..; make -j$(nproc)
and then i get the following error
CMake Error at cmake/dependencies.cmake:24 (find_package): Could not find a package configuration file provided by "spdlog" (requested version 1.3.1) with any of the following names:
spdlogConfig.cmake spdlog-config.cmake
Add the installation prefix of "spdlog" to CMAKE_PREFIX_PATH or set "spdlog_DIR" to a directory containing one of the above files. If "spdlog" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): CMakeLists.txt:179 (include)
– Configuring incomplete, errors occurred! See also "/home/pi/Desktop/iroha/build/CMakeFiles/CMakeOutput.log". See also "/home/pi/Desktop/iroha/build/CMakeFiles/CMakeError.log"
Any idea how to solve this?
I've managed to build iroha (version 1.1.3) on RPI 4 on Ubuntu Server 20.04.1 LTS (GNU/Linux 5.4.0-1015-raspi aarch64)
First of all we need to update our system:
Then we should install dependencies according to instruction:
Now I suggest to reboot system:
Next step was to download iroha source, I've tested this on Iroha 1.1.3, so my source was:
Next step according to instruction is to call:
But when I was building with the script on October 2020 some extra steps was necessarily, it was because of facts that:
When You build this after some time possibly you will not face any of those problems, but it is also possible that You are going to face different problems.
So first step of building on RPI is to just run command:
and wait. If you don't see any problems you don't need the instruction.
If You see problem with
cmake
connected withvcpkg
it means that vcpkg still doesn't support aarch64, but there is a hack to use system's cmake, instead of downloaded by vcpkg. To do this we need to add-useSystemBinaries
to the fileiroha/vcpkg/build_iroha_deps.sh
after commandbootstrap-vcpkg.sh
. It can be done fast with command:Then you can resume building:
If you face problem with building
boost-container
, connected with flag-m64
, which does not exist on gcc at RPI, you need to create wrapper to remove the flag. I've created the wrapper in c++ (fileg++wrapper.cc
):just compile that:
g++ g++wrapper.cc -o g++wrapper
We just need to replace system's/usr/bin/c++
with our wrapper, we can do that with commands:Now we can resume building now as above.
When we face problem with building GRPC:
And check in the log file:
Then I've fixed with commenting
gettid
function redefinition:Then I've faced similar problem with another definition of function
gettid
, so I did similar:After correcting we can resume building.
If everything is all right and we wrapped c++ command with our binary we should restore original command:
Then we should be able to compile dependencies to iroha. Now according to instruction2 we should find out what cmake's flag we need, we can do this with command:
in my situation it was printed:
Now we can use this in cmake's command.
Then lets call makefile (I suggest single thread on RPI):
If succesfull great! But is you see problem:
You need to comment that line from the file:
Then we can rerun:
Thats all about building Iroha on Raspberry Pi 4, now You can install (or use docker image) database and enjoy.