Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes in vcpkg/build_iroha_deps.sh file and documentation to inform users that Iroha 1 is working in Raspberry Pi 4 (from HL main repo) #2948

Merged
merged 3 commits into from
Nov 16, 2022

Conversation

baziorek
Copy link
Contributor

Full description from #2944. Because of security reason those changes must be done from main hyperledger repository, not forks.


Description of the Change

History

Lets start with what is not really important - history:
Few years ago I managed to build Iroha 1.1.3 on RPI3 and RPI4, I created special tutorial:
https://wiki.hyperledger.org/pages/viewpage.action?pageId=41584046
After that I was suggested to create PR (#728) and @lebdron created his PR (#864) to make building on RPI as automatic as possible.
During those few years I was thinking that I should create similar PR for develop version, but it was really hard (as You see PR from @lebdron). Recently somebody from community posted message that he is using Iroha 1.5 on RPI: https://t.me/hyperledgeriroha/25004 - it added me motivation to try again...

Important description of change

  1. vcpkg/build_iroha_deps.sh - to use vcpkg on RPI ( aarch64 architecture ) we need export VCPKG_FORCE_SYSTEM_BINARIES=1 before calling vcpkg.
  2. Added information to documentation to expose that Iroha 1 can be build on RPI and build process is easy.
  3. I noticed problem with building documentation (instruction: https://github.com/hyperledger/iroha/tree/main/docs):
make html
...
Could not import extension m2r2 (exception: No module named 'm2r2')

that is why I added entry to docs/source/requirements.txt file

Issue

Benefits

If somebody wants to build Iroha for RPI4 - it would be easier for users. Also if somebody (who does not know Iroha) would like to find blockchain who is working on RPI - it will be easier.

Possible Drawbacks

Review process:D.

Usage Examples or Tests [optional]

Testing on RPI4 according to https://iroha.readthedocs.io/en/develop/build/index.html#linux-pre:

apt-get update; \
apt-get -y --no-install-recommends install \
   build-essential ninja-build \
   git ca-certificates tar curl unzip cmake \
   pkg-config zip

git clone -b rpi_fix https://github.com/baziorek/iroha.git
cd iroha
./vcpkg/build_iroha_deps.sh $PWD/vcpkg-build

cmake -B build -DCMAKE_TOOLCHAIN_FILE=$PWD/vcpkg-build/scripts/buildsystems/vcpkg.cmake . -DCMAKE_BUILD_TYPE=RELEASE -DUSE_BURROW=OFF -DUSE_URSA=OFF -DTESTING=OFF -DPACKAGE_DEB=OFF

cmake --build ./build --target all

./build/bin/irohad
# log from irohad with missing arguments was printed

Alternate Designs [optional]

Different description

Added description for rpi

Signed-off-by: Grzegorz Bazior <[email protected]>
baziorek and others added 2 commits November 16, 2022 11:42
Apply suggestion

Co-authored-by: Aleksandr Petrosyan <[email protected]>
Signed-off-by: G. Bazior <[email protected]>
Corrected typo

Signed-off-by: G. Bazior <[email protected]>
@appetrosyan appetrosyan merged commit 3affec2 into develop Nov 16, 2022
@appetrosyan appetrosyan deleted the develop-vcpkg-rpi branch November 16, 2022 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants