How did you build the image for the Raspberry Pi? #3989

Closed
opened 2026-03-07 19:22:31 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @VirtualInterpreter on GitHub (Jul 28, 2019).

Hi everyone,

I notice you's have managed to produce docker images for lots of different architectures and was wondering how you did it. I've been trying to cargo build this repo on Ubuntu for my raspberry pi 3 and encountered an error for missing the mysqlclient library. The command I used was:
cargo build --features mysql --release --target armv7-unknown-linux-gnueabihf
(I assume that apt-get installing the library won't fix the issue as it would be for the wrong architecture?)

Consequently, I've been trying to cross compile mariadb server to acquire the libs, which hasn't been going well, as I've had to also work out how to cross compile openssl & ncurses. I tried going down the path of just copying the mysqlclient libs and the required libs from my pi to Ubuntu, which then results in an error
/usr/arm-linux-gnueabihf/lib/libp11-kit.so.0: undefined reference to fcntl@GLIBC_2.28'`

So long story short I was wondering how you's set up your environment when you build for different architectures, or do you just build them on the end device? I've been trying to cross compile for 4 days now, and I'm feeling like I must be missing some obvious, so any advice you can offer is much appreciated :)

My goal is to build the image (I thought doing it on Ubuntu would be faster) so I can be certain of the image code that would be running on the raspberry pi.

Many thanks

Originally created by @VirtualInterpreter on GitHub (Jul 28, 2019). Hi everyone, I notice you's have managed to produce docker images for lots of different architectures and was wondering how you did it. I've been trying to cargo build this repo on Ubuntu for my raspberry pi 3 and encountered an error for missing the mysqlclient library. The command I used was: `cargo build --features mysql --release --target armv7-unknown-linux-gnueabihf` (I assume that apt-get installing the library won't fix the issue as it would be for the wrong architecture?) Consequently, I've been trying to cross compile mariadb server to acquire the libs, which hasn't been going well, as I've had to also work out how to cross compile openssl & ncurses. I tried going down the path of just copying the mysqlclient libs and the required libs from my pi to Ubuntu, which then results in an error `/usr/arm-linux-gnueabihf/lib/libp11-kit.so.0: undefined reference to `fcntl@GLIBC_2.28'` So long story short I was wondering how you's set up your environment when you build for different architectures, or do you just build them on the end device? I've been trying to cross compile for 4 days now, and I'm feeling like I must be missing some obvious, so any advice you can offer is much appreciated :) My goal is to build the image (I thought doing it on Ubuntu would be faster) so I can be certain of the image code that would be running on the raspberry pi. Many thanks
Author
Owner

@mprasil commented on GitHub (Jul 28, 2019):

I think you might be encountering the same issue I did. We actually don't have MySQL builds for ARM devices. Unfortunately I haven't had much time to really troubleshoot it yet. If you manage to find a way to build the ARM image with MySQL support, or if you find anything helpful, let's discuss this under #530.

I'm going to close this one as I think it's duplicate. Let's continue the investigation under #530 unless you think this issue is different?

Thanks for reporting this! It's sort of good to see that I'm not the only one encountering the problem.

@mprasil commented on GitHub (Jul 28, 2019): I think you might be encountering the same issue [I did](https://github.com/dani-garcia/bitwarden_rs/issues/530#issuecomment-511360713). We actually don't have MySQL builds for ARM devices. Unfortunately I haven't had much time to really troubleshoot it yet. If you manage to find a way to build the ARM image with MySQL support, or if you find anything helpful, let's discuss this under #530. I'm going to close this one as I think it's duplicate. Let's continue the investigation under #530 unless you think this issue is different? Thanks for reporting this! It's sort of good to see that I'm not the only one encountering the problem.
Author
Owner

@VirtualInterpreter commented on GitHub (Jul 28, 2019):

Interesting... Okay thank you, I'll report back if I manage to get it working, seems like it's not going to be as straight forward as I thought

@VirtualInterpreter commented on GitHub (Jul 28, 2019): Interesting... Okay thank you, I'll report back if I manage to get it working, seems like it's not going to be as straight forward as I thought
Author
Owner

@Extarys commented on GitHub (Oct 6, 2019):

Cloned the repo, cannot build armv7 sqlite:

Step 22/39 : RUN rustup target add armv7-unknown-linux-gnueabihf
 ---> Running in 638f137ccbef
info: downloading component 'rust-std' for 'armv7-unknown-linux-gnueabihf'
info: installing component 'rust-std' for 'armv7-unknown-linux-gnueabihf'
Removing intermediate container 638f137ccbef
 ---> a221df76df5a
Step 23/39 : RUN cargo build --features ${DB} --release --target=armv7-unknown-linux-gnueabihf -v
 ---> Running in 716c0b87562f
error: could not find `Cargo.toml` in `/app` or any parent directory
@Extarys commented on GitHub (Oct 6, 2019): Cloned the repo, cannot build armv7 sqlite: ``` Step 22/39 : RUN rustup target add armv7-unknown-linux-gnueabihf ---> Running in 638f137ccbef info: downloading component 'rust-std' for 'armv7-unknown-linux-gnueabihf' info: installing component 'rust-std' for 'armv7-unknown-linux-gnueabihf' Removing intermediate container 638f137ccbef ---> a221df76df5a Step 23/39 : RUN cargo build --features ${DB} --release --target=armv7-unknown-linux-gnueabihf -v ---> Running in 716c0b87562f error: could not find `Cargo.toml` in `/app` or any parent directory ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#3989