-
Notifications
You must be signed in to change notification settings - Fork 39
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
Enable file binary creation #44
Enable file binary creation #44
Conversation
Hi @DesobedienteTecnologico thanks for your contribution, and I'm sorry I haven't done this yet, you are right that we can generate a binary that way, but I think you need different binaries from differents architectures since your project is a portable set of tools, isn't it? |
Hi, well. The tool I'm developing mainly focus on x86_64 (But others can be added at some point undoubtedly). The plan is to be able to add into the Tails image without using persistence (Modifying the SquahsFS) using DTails. But regardless of that, would be nice to have it build in different arch like ARM64, so people can mine their keys directly on Android using Termux + Rana! :) As far as I know, we need to compile individually every each arch you would like to have a binary. The command should contain --target flag, which should be used like that: Example:List of compatibles architectures: ▪️ Architectures
As an example. after some test, if we need cross-compile to other architectures, we need to follow this steps:
But so far, only with X86_64 will be great. Thanks |
The unique problem we could face is the need of a updated concrete glibc version. The glibc versions needed to get it running apparently are:
|
I think we can avoid this problem using docker, take a look on this https://www.docker.com/blog/cross-compiling-rust-code-for-multiple-architectures/ |
Build static version for Linux arch x86_64:
And apparently seems to be reproducible... (Need your confirmation) I think with that we could have already a binaries to be released. Thanks! |
Build static version for Linux arch aarch64/amd64 (Smartphones):Very easy and straightforward: https://github.com/rust-cross/rust-musl-cross#prebuilt-images |
Hi @DesobedienteTecnologico take a look on this https://github.com/grunch/rana/releases/tag/v0.5.4 and let me know if it works for you. thank you for your work, your pointed me in the right direction |
I just tried it. So far works well the android version I tried. The x86_64_unknown_linux_gnu that I tried works BUT if possible I highly recommend you to point musl instead gnu. If you choose GNU that is going to use GNU glibc libraries that are not in Ubuntu Focal (Glibc 2.31) and Debian 10 (Glibc 2.28), so no one can use it out of the box. If you build it against musl it will not depend on glibc libraries and will work without any problem in those Operating systems. Please consider have a look here: |
did you compiled main branch here? I got |
🥳 Binary creation is possible using only this command and the commit I made:
cargo build --release --target-dir .
The binary is going to be created under release directory.
The arch will be the same as the host machine. In my case:
rana: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=65b4d3fad4caae109ebab35238a0731124f9b80e, for GNU/Linux 3.2.0, with debug_info, not stripped