Open e-desouza opened 3 years ago
Hi @e-desouza,
We currently don't bundle the libs for s390x, and we haven't tried cross compiling to it. I'll give it a shot while working on re-structuring the repo to allow bundling more libs.
Thanks @kobigurk . Let me know if access to a Linux (ubuntu/rhel/sles) on s390x will help this effort and I can provide a VM.
Sounds good. If you want to test meanwhile, I can provide instructions on how to work around, if you want to compile rust. Let me know!
Absolutely ! We have Rust support on the platform so please let me know the work around..
Nice! So what you can do is:
Add the platform to https://github.com/celo-org/celo-bls-go/blob/master/scripts/release.sh. Specifically, the rustup target add and the cargo build and strip parts. The lib should then be copied automatically to the the right directory.
Add a file similar to https://github.com/celo-org/celo-bls-go/blob/master/bls/bls_linux64.go, but with the correct CPU in the build directive and the right directory in LDFLAGS.
Let me know if that makes sense :)
On Mon, Jul 19, 2021 at 7:31 PM Elton de Souza @.***> wrote:
Absolutely ! We have Rust support on the platform so please let me know the work around..
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/celo-org/celo-bls-go/issues/24#issuecomment-882689334, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA23MGCXTXGR24TI2MZAVDTTYRHPRANCNFSM5ATYPJUA .
Thanks @kobigurk.
Did the below changes and generated the libs.
user@test:/opensrc/user/celo/celo-bls-go/libs$ rustc --print target-list | grep s390 s390x-unknown-linux-gnu s390x-unknown-linux-musl
@@ -25,6 +25,7 @@ rustup target add i686-linux-android rustup target add x86_64-linux-android rustup target add x86_64-unknown-linux-musl rustup target add aarch64-apple-ios x86_64-apple-ios +rustup target add s390x-unknown-linux-gnu
cargo build --release --target=aarch64-linux-android --lib -p bls-snark-sys cargo strip --target aarch64-linux-android @@ -46,6 +47,8 @@ cargo build --target=x86_64-pc-windows-gnu --release -p bls-snark-sys cargo strip --target x86_64-pc-windows-gnu cargo build --target=x86_64-unknown-linux-musl --release -p bls-snark-sys cargo strip --target x86_64-unknown-linux-musl +cargo build --target=s390x-unknown-linux-gnu --release -p bls-snark-sys +cargo strip --target s390x-unknown-linux-gnu cargo lipo --release --targets=aarch64-apple-ios,x86_64-apple-ios -p bls-snark-sys
popd @@ -69,4 +72,4 @@ do
user@test:/opensrc/user/celo/celo-bls-go/bls$ cat bls_s390x.go // +build s390x
package bls
/*
*/ import "C" user@test:/opensrc/user/celo/celo-bls-go/bls$ cd ../libs/ user@test:/opensrc/user/celo/celo-bls-go/libs$ ls s390x-unknown-linux-gnu/ libbls_crypto.a libbls_snark_sys.a libepoch_snark.a user@test:/opensrc/user/celo/celo-bls-go/libs$
"Point go.mod in celo-blockchain to the local celo-bls-go directory with a replace statement" go mod edit -replace github.com/celo-org/celo-bls-go=/opensrc/user/celo/celo-bls-go
I still see the original errors that were reported. Am I missing something?
"go mod tidy" helped me. I am now able to generate geth now.
.... github.com/celo-org/celo-blockchain/cmd/geth Done building. Run "./build/bin/geth" to launch geth.
Thanks.
Amazing, glad the workaround works for you meanwhile. We're working on a new version and will include this platform there as well.
If you want to test it out, we have a PR that does the restructuring: https://github.com/celo-org/celo-bls-go/pull/25
You can test it out (which would help us!) using version v0.3.0-alpha3
Hi @kobigurk,
I work with @US-05 and was recently trying out his workaround for getting this to work on s390x as I was hitting the same error as him on the make geth
stage of installation.
I notice that you changed the structure of the project, so this workaround doesn't work anymore. Would you potentially be able to let me know the method that should be used now?
Tried making my own bls_s390x.go
file but noticed that the libs
directory is now gone so I think I'll struggle adding them there! I'm sure there's something I'm missing so any help you can give would be much appreciated. Thanks!
We're looking to port celo-bls to s390x architecture so opening this issue to track the work.
Currently the build fails with:
Environment: