小编taf*_*fia的帖子

为Raspberry Pi 2交叉编译rust-openssl

我在Debian机器上,我想为我的Raspberry Pi 2交叉编译一个项目.我已经设法用一个简单的hello世界使用rustup,但无法弄清楚如何交叉编译rust-openssl crate .

我用arm-linux-gnueabihf-gcc编译了openssl并将其安装在我的home/opensslArm目录中.

我跑的时候

OPENSSL_LIB_DIR=/home/johann/opensslArm/lib OPENSSL_INCLUDE_DIR=/home/johann/opensslArm/include cargo build --target=armv7-unknown-linux-gnueabihf
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

failed to run custom build command for `openssl-sys-extras v0.7.11`
Process didn't exit successfully: `/home/johann/projects/test/target/debug/build/openssl-sys-extras-e1c84960cd35bc93/build-script-build` (exit code: 101)
--- stdout
TARGET = Some("armv7-unknown-linux-gnueabihf")
OPT_LEVEL = Some("0")
PROFILE = Some("debug")
TARGET = Some("armv7-unknown-linux-gnueabihf")
debug=true opt-level=0
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("armv7-unknown-linux-gnueabihf")
TARGET = Some("armv7-unknown-linux-gnueabihf")
HOST = Some("x86_64-unknown-linux-gnu")
CC_armv7-unknown-linux-gnueabihf = None
CC_armv7_unknown_linux_gnueabihf = None
TARGET_CC = None
CC = None
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("armv7-unknown-linux-gnueabihf")
HOST = …
Run Code Online (Sandbox Code Playgroud)

openssl cross-compiling rust raspberry-pi

4
推荐指数
2
解决办法
1741
查看次数

标签 统计

cross-compiling ×1

openssl ×1

raspberry-pi ×1

rust ×1