Skip to content
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

No build instructions. #3

Open
JNissi opened this issue Mar 5, 2021 · 0 comments
Open

No build instructions. #3

JNissi opened this issue Mar 5, 2021 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@JNissi
Copy link
Owner

JNissi commented Mar 5, 2021

This needs a little bit of thought.

For cross compilation, install cargo cross, build a docker image for the cross compilation with instructions from cross-rs/cross#517 and richardanaya/pinephone-gtk-rs-starter#4

I needed these on top of Ubuntu 20.04 cargo cross image:

RUN dpkg --add-architecture arm64 && \
    apt-get update && \
    apt-get install --assume-yes libgtk-3-dev:arm64 x11proto-dev:arm64 libssl-dev:arm64 libasound2-dev:arm64 libpulse-dev:arm64 -o APT::Immediate-Configure=0 && \
    apt-get install -y clang libclang-3.9-dev libc6-dev-i386 gcc-aarch64-linux-gnu && \
    apt-get clean -y

ENV PKG_CONFIG_LIBDIR=/usr/local/lib/aarch64-linux-gnu/pkgconfig:/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig/
ENV PKG_CONFIG_ALLOW_CROSS=1

When the docker image is built change the image name in Cross.toml and do
cross build --target aarch64-unknown-linux-gnu --release and copy target/aarch64-unknown-linux-gnu/release/camcam to the phone.

@JNissi JNissi self-assigned this Mar 5, 2021
@JNissi JNissi added the documentation Improvements or additions to documentation label Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant