Open trembel opened 5 years ago
It seems the webview
submodule is not checked out, what command did you use for cross-compilation, did you use something like cross
?
I'm having a similar issue trying to build for ARMv7 as well. I am simply trying to compile the minimal example as a standalone application. Is it not supported to build this from crates.io?
My build command was simply: cargo build --target=armv7-unknown-linux-gnueabihf
. For reference, the project I was trying to build with is here: https://github.com/RadicalZephyr/webkit-app
Let me know if you need any more help with figuring this out. I'm also going to try natively compiling on an arm system (beaglebone black).
So, there was more to my error than @cortesis reported above, including here for search indexing:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Failure { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"webkit2gtk-4.0 >= 2.8\"",
output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Package xproto was not found in the pkg-config search path.\nPerhaps you should a$
d the directory containing `xproto.pc\'\nto the PKG_CONFIG_PATH environment variable\nPackage \'xproto\', required by \'xau\', not found\n" } }', libcore/res$
lt.rs:1009:5
I'm building on a Debian system, and I believe the reason for this error message is that the x11proto-core-dev package is arch independent, and thus the file xproto.pc
ends up on the native pkgconfig path instead of the one for the cross-build architecture. My solution to this was just to include the default pkgconfig path by adding a PKG_CONFIG_PATH
env variable like so:
export PKG_CONFIG_PATH=/usr/share/pkgconfig
I've updated the Dockerfile in my webkit-app repo (linked above), so that repository is a good reference example of how to cross-build web-view.
If I try cross-compiling a test-application I get following error (cross compiling a simple println!("Hello World") works, saying the error comes by trying to compile a webview example):