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
I build prisma-engines for armv7 but failed #3881
Comments
This is not a problem with Prisma itself, but one of the dependencies can not be built during this step:
Seems to me this is more a case for https://github.com/actions-rs/cargo/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc |
That uses this under the hood: https://github.com/cross-rs/cross And there you can find these issues for this error message: https://github.com/cross-rs/cross/issues?q=is%3Aissue+sort%3Aupdated-desc+error%3A+could+not+find+system+library+%27openssl%27+required+by+the+%27openssl-sys%27+crate+is%3Aclosed |
Thanks @janpio |
Did you have success @ImBIOS? |
Hi, I am trying to get a build too for I tried by hardcoding So that I managed to continue (see build), but it fails at compilation of
maybe @janpio you could throw some light on what could be the issue? Right now I am out of ideas as the error is not so much descriptive to me. |
As a product manager I am probably the wrong person for that question. |
It's okay, I will try to |
@janpio still failing, using a workaround rn. I'm using vanilla code and writing only ORM that I'll need in my project. Basically, I'm writing my own ORM rn, it's painful but worth the time, because eI need it fast. |
I have been trying to make it work but no success. There are some code evidences somewhere on Github that indicates that they are facing the same issue and they disabled My question is: knowing that |
I've been struggling with this today and finally got it working after four hours. Sources for this solution are here, here and here. I tried building this on my Pi 4 but it didn't have enough ram (4GB); so here's how I got it cross-compiling from debian x64 (I spun up a clean VPS for this test, to replicate a CI build and also to not pollute my existing servers. this is not tested as a single script, it's mostly adapted from .bash_history, please run it line by line) # install dependencies
sudo apt update
sudo apt install -y wget git vim curl build-essential libssl-dev docker.io unzip
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh
bash rustup.sh -y
source "$HOME/.cargo/env"
cargo install cross
# get source
wget https://github.com/prisma/prisma-engines/archive/refs/heads/main.zip
unzip main.zip
cd prisma-engines-main
# set up configuration files
mkdir .cargo
cat <<EOF > .cargo/config.toml
[build]
target = "armv7-unknown-linux-gnueabihf"
EOF
cat <<EOF > Dockerfile
FROM rustembedded/cross:armv7-unknown-linux-gnueabihf-0.2.1
RUN echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal main universe" > /etc/apt/sources.list && \
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal main universe" >> /etc/apt/sources.list
RUN dpkg --add-architecture armhf && apt-get update
RUN apt-get install --assume-yes libssl-dev:armhf
ENV PKG_CONFIG_LIBDIR_armv7_unknown_linux_gnueabihf=/usr/lib/arm-linux-gnueabihf/pkgconfig
EOF
cat <<EOF > Cross.toml
[target.armv7-unknown-linux-gnueabihf]
image = "crossbuild:local"
EOF
# create new build container, referenced by Cross.toml, then build for target arch
docker build -t crossbuild:local .
cross build --target armv7-unknown-linux-gnueabihf --release
ls target/armv7-unknown-linux-gnueabihf/release/libquery_engine.so # PRISMA_QUERY_ENGINE_LIBRARY
ls target/armv7-unknown-linux-gnueabihf/release/query-engine # PRISMA_QUERY_ENGINE_BINARY
ls target/armv7-unknown-linux-gnueabihf/release/schema-engine # PRISMA_SCHEMA_ENGINE_BINARY edit: updated dockerfile to use focal repo's libssl, as cross armv7 image is based on xenial and that version of openssl is 1.0 |
@alyssadev any progress on getting this running in CI? Also, since it is successfully building for armv7, would binaries for Android & iOS be possible? Currently there is work being done to implement Prisma in Dart, and it would be amazing if this could be expanded to provide client-side DB management on Flutter. |
https://github.com/ImBIOS/prisma-armv7-builds
I made the build here but failed with no clue. Can anyone help me?
The text was updated successfully, but these errors were encountered: