harmony-one / harmony

The core protocol of harmony
https://harmony.one
GNU Lesser General Public License v3.0
1.46k stars 287 forks source link

Support for s390x/systemz arch #3833

Open udai05 opened 2 years ago

udai05 commented 2 years ago

We're looking to port harmony to s390x architecture so opening this issue to track the work. Currently I am using herumi's repo to pull mcl and bls to build harmony binaries. Any plans to sync it to master repo?

udai05 commented 2 years ago

Any update on this?

LeoHChen commented 2 years ago

Please update both mcl/bls, and build a test version of the node to test it on testnet/mainnet. Thanks.

udai05 commented 2 years ago

Thanks @LeoHChen.

Now I am trying to create a Docker Image. But while building I seem to encountering an error:

docker build -t harmony .

.... protoc v3.12.3 has been installed in /usr/local. Removing intermediate container df90047aa405 ---> ad03110cc4df Step 39/59 : RUN go mod tidy ---> Running in e4e8e2ddf737 /bin/bash: go: command not found The command '/bin/bash -c go mod tidy' returned a non-zero code: 127

Any suggestions?

LeoHChen commented 2 years ago

you need to install golang package.

udai05 commented 2 years ago

you need to install golang package.

Adding golang to "apt-get install" goes ahead with v1.10 installation as it is ubuntu 18.04 based. Then I get an error "go: unknown subcommand "mod""

sophoah commented 2 years ago

hey @US-05 can you share your Dockerfile and have you look at ours : https://github.com/harmony-one/harmony/blob/main/Dockerfile ?

udai05 commented 2 years ago

Thanks @sophoah for the reply. Sharing the changes.

_git diff Dockerfile diff --git a/Dockerfile b/Dockerfile index f944a75c..a9b2c552 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ ENV PATH="/root/bin:${PATH}" RUN apt-get update -y RUN apt install libgmp-dev libssl-dev curl git \ psmisc dnsutils jq make gcc g++ bash tig tree sudo vim \ -silversearcher-ag unzip emacs-nox nano bash-completion -y +silversearcher-ag unzip emacs-nox nano bash-completion opt llvm golang -y

RUN mkdir ~/bin && \ curl -sL -o ~/bin/gimme \ @@ -33,12 +33,14 @@ RUN mkdir /root/workspace

RUN git clone https://github.com/harmony-one/harmony.git ${HMY_PATH}/harmony

-RUN git clone https://github.com/harmony-one/bls.git ${HMY_PATH}/bls +RUN git clone https://github.com/herumi/bls.git --recursive ${HMY_PATH}/bls

-RUN git clone https://github.com/harmony-one/mcl.git ${HMY_PATH}/mcl +RUN git clone https://github.com/herumi/mcl.git ${HMY_PATH}/mcl

RUN git clone https://github.com/harmony-one/go-sdk.git ${HMY_PATH}/go-sdk

+RUN cd ${HMY_PATH}/mcl && make -j8 UPDATE_ASM=1 + RUN cd ${HMY_PATH}/bls && make -j8 BLS_SWAP_G=1

RUN touch /root/.bashprofile

sophoah commented 2 years ago

can you send me your dockerfile so i can give it a shot thanks

udai05 commented 2 years ago

can you send me your dockerfile so i can give it a shot thanks

Dockerfile.txt

Please remove .txt extn.

udai05 commented 2 years ago

Added below line to make it work. Seems to create image now. + FROM golang:1.17-bullseye

Thanks for all the help.

sophoah commented 2 years ago

hey glad it had fixed, by the way i tried the dockerfile you attached with no changes to it and i was able build the image not sure why you couldn't. I'll close the issue for now. Thanks

sophoah commented 2 years ago

sorry reopening we still need to complete the upgrade our library