gpt4 book ai didi

aws-lambda - 为什么当 openssl 不在依赖关系图中时,openssl 上的交叉编译构建会失败?

转载 作者:行者123 更新时间:2023-12-03 11:23:43 24 4
gpt4 key购买 nike

使用 cross 构建我的 Rust lambda 时,我收到此错误:

error: failed to run custom build command for `openssl-sys v0.9.58`
当我查看我的依赖关系图时,openssl 甚至没有列出!这是怎么回事?
这是我的 Cargo.toml 文件:
[package]
name = "my_lambda"
version = "0.1.0"
authors = ["Thomas <>"]
edition = "2018"
autobins = false

[[bin]]
name = "bootstrap"
path = "src/main.rs"

[dependencies]
lambda_runtime = "0.2.1"
mysql = { version = "20.1.0" }
reqwest = { version = "0.9.24" }
serde = { version = "^1.0", features = ["derive"] }
交叉文件
[target.x86_64-unknown-linux-gnu]
image = "lambci/lambda:build-provided"

[target.x86_64-unknown-linux-musl]
image = "lambci/lambda:build-provided"
cargo tree 的输出
my_lambda v0.1.0 (/Users/thomas/my_lambda)
├── lambda_runtime v0.2.1
│ ├── failure v0.1.8
│ │ ├── backtrace v0.3.55
│ │ │ ├── addr2line v0.14.0
│ │ │ │ └── gimli v0.23.0
│ │ │ ├── cfg-if v1.0.0
│ │ │ ├── libc v0.2.80
│ │ │ ├── miniz_oxide v0.4.3
│ │ │ │ └── adler v0.2.3
│ │ │ │ [build-dependencies]
│ │ │ │ └── autocfg v1.0.1
│ │ │ ├── object v0.22.0
│ │ │ └── rustc-demangle v0.1.18
│ │ └── failure_derive v0.1.8 (proc-macro)
│ │ ├── proc-macro2 v1.0.24
│ │ │ └── unicode-xid v0.2.1
│ │ ├── quote v1.0.7
│ │ │ └── proc-macro2 v1.0.24 (*)
│ │ ├── syn v1.0.48
│ │ │ ├── proc-macro2 v1.0.24 (*)
│ │ │ ├── quote v1.0.7 (*)
│ │ │ └── unicode-xid v0.2.1
│ │ └── synstructure v0.12.4
│ │ ├── proc-macro2 v1.0.24 (*)
│ │ ├── quote v1.0.7 (*)
│ │ ├── syn v1.0.48 (*)
│ │ └── unicode-xid v0.2.1
│ ├── lambda_runtime_core v0.1.2
│ │ ├── backtrace v0.3.55 (*)
│ │ ├── chrono v0.4.19
│ │ │ ├── libc v0.2.80
│ │ │ ├── num-integer v0.1.44
│ │ │ │ └── num-traits v0.2.14
│ │ │ │ [build-dependencies]
│ │ │ │ └── autocfg v1.0.1
│ │ │ │ [build-dependencies]
│ │ │ │ └── autocfg v1.0.1
│ │ │ ├── num-traits v0.2.14 (*)
│ │ │ ├── serde v1.0.117
│ │ │ │ └── serde_derive v1.0.117 (proc-macro)
│ │ │ │ ├── proc-macro2 v1.0.24 (*)
│ │ │ │ ├── quote v1.0.7 (*)
│ │ │ │ └── syn v1.0.48 (*)
│ │ │ └── time v0.1.44
│ │ │ └── libc v0.2.80
│ │ ├── failure v0.1.8 (*)
│ │ ├── hyper v0.12.35
│ │ │ ├── bytes v0.4.12
│ │ │ │ ├── byteorder v1.3.4
│ │ │ │ ├── either v1.6.1
│ │ │ │ └── iovec v0.1.4
│ │ │ │ └── libc v0.2.80
│ │ │ ├── futures v0.1.30
│ │ │ ├── futures-cpupool v0.1.8
│ │ │ │ ├── futures v0.1.30
│ │ │ │ └── num_cpus v1.13.0
│ │ │ │ └── libc v0.2.80
│ │ │ ├── h2 v0.1.26
│ │ │ │ ├── byteorder v1.3.4
│ │ │ │ ├── bytes v0.4.12 (*)
│ │ │ │ ├── fnv v1.0.7
│ │ │ │ ├── futures v0.1.30
│ │ │ │ ├── http v0.1.21
│ │ │ │ │ ├── bytes v0.4.12 (*)
│ │ │ │ │ ├── fnv v1.0.7
│ │ │ │ │ └── itoa v0.4.6
│ │ │ │ ├── indexmap v1.6.0
│ │ │ │ │ └── hashbrown v0.9.1
│ │ │ │ │ └── ahash v0.4.6
│ │ │ │ │ [build-dependencies]
│ │ │ │ │ └── autocfg v1.0.1
│ │ │ │ ├── log v0.4.11
│ │ │ │ │ └── cfg-if v0.1.10
│ │ │ │ ├── slab v0.4.2
│ │ │ │ ├── string v0.2.1
│ │ │ │ │ └── bytes v0.4.12 (*)
│ │ │ │ └── tokio-io v0.1.13
│ │ │ │ ├── bytes v0.4.12 (*)
│ │ │ │ ├── futures v0.1.30
│ │ │ │ └── log v0.4.11 (*)
│ │ │ ├── http v0.1.21 (*)
│ │ │ ├── http-body v0.1.0
│ │ │ │ ├── bytes v0.4.12 (*)
│ │ │ │ ├── futures v0.1.30
│ │ │ │ ├── http v0.1.21 (*)
│ │ │ │ └── tokio-buf v0.1.1
│ │ │ │ ├── bytes v0.4.12 (*)
│ │ │ │ ├── either v1.6.1
│ │ │ │ └── futures v0.1.30
│ │ │ ├── httparse v1.3.4
│ │ │ ├── iovec v0.1.4 (*)
│ │ │ ├── itoa v0.4.6
│ │ │ ├── log v0.4.11 (*)
│ │ │ ├── net2 v0.2.35
│ │ │ │ ├── cfg-if v0.1.10
│ │ │ │ └── libc v0.2.80
│ │ │ ├── time v0.1.44 (*)
│ │ │ ├── tokio v0.1.22
│ │ │ │ ├── bytes v0.4.12 (*)
│ │ │ │ ├── futures v0.1.30
│ │ │ │ ├── mio v0.6.22
│ │ │ │ │ ├── cfg-if v0.1.10
│ │ │ │ │ ├── iovec v0.1.4 (*)
│ │ │ │ │ ├── libc v0.2.80
│ │ │ │ │ ├── log v0.4.11 (*)
│ │ │ │ │ ├── net2 v0.2.35 (*)
│ │ │ │ │ └── slab v0.4.2
│ │ │ │ ├── num_cpus v1.13.0 (*)
│ │ │ │ ├── tokio-codec v0.1.2
│ │ │ │ │ ├── bytes v0.4.12 (*)
│ │ │ │ │ ├── futures v0.1.30
│ │ │ │ │ └── tokio-io v0.1.13 (*)
│ │ │ │ ├── tokio-current-thread v0.1.7
│ │ │ │ │ ├── futures v0.1.30
│ │ │ │ │ └── tokio-executor v0.1.10
│ │ │ │ │ ├── crossbeam-utils v0.7.2
│ │ │ │ │ │ ├── cfg-if v0.1.10
│ │ │ │ │ │ └── lazy_static v1.4.0
│ │ │ │ │ │ [build-dependencies]
│ │ │ │ │ │ └── autocfg v1.0.1
│ │ │ │ │ └── futures v0.1.30
│ │ │ │ ├── tokio-executor v0.1.10 (*)
│ │ │ │ ├── tokio-fs v0.1.7
│ │ │ │ │ ├── futures v0.1.30
│ │ │ │ │ ├── tokio-io v0.1.13 (*)
│ │ │ │ │ └── tokio-threadpool v0.1.18
│ │ │ │ │ ├── crossbeam-deque v0.7.3
│ │ │ │ │ │ ├── crossbeam-epoch v0.8.2
│ │ │ │ │ │ │ ├── cfg-if v0.1.10
│ │ │ │ │ │ │ ├── crossbeam-utils v0.7.2 (*)
│ │ │ │ │ │ │ ├── lazy_static v1.4.0
│ │ │ │ │ │ │ ├── maybe-uninit v2.0.0
│ │ │ │ │ │ │ ├── memoffset v0.5.6
│ │ │ │ │ │ │ │ [build-dependencies]
│ │ │ │ │ │ │ │ └── autocfg v1.0.1
│ │ │ │ │ │ │ └── scopeguard v1.1.0
│ │ │ │ │ │ │ [build-dependencies]
│ │ │ │ │ │ │ └── autocfg v1.0.1
│ │ │ │ │ │ ├── crossbeam-utils v0.7.2 (*)
│ │ │ │ │ │ └── maybe-uninit v2.0.0
│ │ │ │ │ ├── crossbeam-queue v0.2.3
│ │ │ │ │ │ ├── cfg-if v0.1.10
│ │ │ │ │ │ ├── crossbeam-utils v0.7.2 (*)
│ │ │ │ │ │ └── maybe-uninit v2.0.0
│ │ │ │ │ ├── crossbeam-utils v0.7.2 (*)
│ │ │ │ │ ├── futures v0.1.30
│ │ │ │ │ ├── lazy_static v1.4.0
│ │ │ │ │ ├── log v0.4.11 (*)
│ │ │ │ │ ├── num_cpus v1.13.0 (*)
│ │ │ │ │ ├── slab v0.4.2
│ │ │ │ │ └── tokio-executor v0.1.10 (*)
│ │ │ │ ├── tokio-io v0.1.13 (*)
│ │ │ │ ├── tokio-reactor v0.1.12
│ │ │ │ │ ├── crossbeam-utils v0.7.2 (*)
│ │ │ │ │ ├── futures v0.1.30
│ │ │ │ │ ├── lazy_static v1.4.0
│ │ │ │ │ ├── log v0.4.11 (*)
│ │ │ │ │ ├── mio v0.6.22 (*)
│ │ │ │ │ ├── num_cpus v1.13.0 (*)
│ │ │ │ │ ├── parking_lot v0.9.0
│ │ │ │ │ │ ├── lock_api v0.3.4
│ │ │ │ │ │ │ └── scopeguard v1.1.0
│ │ │ │ │ │ └── parking_lot_core v0.6.2
│ │ │ │ │ │ ├── cfg-if v0.1.10
│ │ │ │ │ │ ├── libc v0.2.80
│ │ │ │ │ │ └── smallvec v0.6.13
│ │ │ │ │ │ └── maybe-uninit v2.0.0
│ │ │ │ │ │ [build-dependencies]
│ │ │ │ │ │ └── rustc_version v0.2.3
│ │ │ │ │ │ └── semver v0.9.0
│ │ │ │ │ │ └── semver-parser v0.7.0
│ │ │ │ │ │ [build-dependencies]
│ │ │ │ │ │ └── rustc_version v0.2.3 (*)
│ │ │ │ │ ├── slab v0.4.2
│ │ │ │ │ ├── tokio-executor v0.1.10 (*)
│ │ │ │ │ ├── tokio-io v0.1.13 (*)
│ │ │ │ │ └── tokio-sync v0.1.8
│ │ │ │ │ ├── fnv v1.0.7
│ │ │ │ │ └── futures v0.1.30
│ │ │ │ ├── tokio-sync v0.1.8 (*)
│ │ │ │ ├── tokio-tcp v0.1.4
│ │ │ │ │ ├── bytes v0.4.12 (*)
│ │ │ │ │ ├── futures v0.1.30
│ │ │ │ │ ├── iovec v0.1.4 (*)
│ │ │ │ │ ├── mio v0.6.22 (*)
│ │ │ │ │ ├── tokio-io v0.1.13 (*)
│ │ │ │ │ └── tokio-reactor v0.1.12 (*)
│ │ │ │ ├── tokio-threadpool v0.1.18 (*)
│ │ │ │ ├── tokio-timer v0.2.13
│ │ │ │ │ ├── crossbeam-utils v0.7.2 (*)
│ │ │ │ │ ├── futures v0.1.30
│ │ │ │ │ ├── slab v0.4.2
│ │ │ │ │ └── tokio-executor v0.1.10 (*)
│ │ │ │ ├── tokio-udp v0.1.6
│ │ │ │ │ ├── bytes v0.4.12 (*)
│ │ │ │ │ ├── futures v0.1.30
│ │ │ │ │ ├── log v0.4.11 (*)
│ │ │ │ │ ├── mio v0.6.22 (*)
│ │ │ │ │ ├── tokio-codec v0.1.2 (*)
│ │ │ │ │ ├── tokio-io v0.1.13 (*)
│ │ │ │ │ └── tokio-reactor v0.1.12 (*)
│ │ │ │ └── tokio-uds v0.2.7
│ │ │ │ ├── bytes v0.4.12 (*)
│ │ │ │ ├── futures v0.1.30
│ │ │ │ ├── iovec v0.1.4 (*)
│ │ │ │ ├── libc v0.2.80
│ │ │ │ ├── log v0.4.11 (*)
│ │ │ │ ├── mio v0.6.22 (*)
│ │ │ │ ├── mio-uds v0.6.8
│ │ │ │ │ ├── iovec v0.1.4 (*)
│ │ │ │ │ ├── libc v0.2.80
│ │ │ │ │ └── mio v0.6.22 (*)
│ │ │ │ ├── tokio-codec v0.1.2 (*)
│ │ │ │ ├── tokio-io v0.1.13 (*)
│ │ │ │ └── tokio-reactor v0.1.12 (*)
│ │ │ ├── tokio-buf v0.1.1 (*)
│ │ │ ├── tokio-executor v0.1.10 (*)
│ │ │ ├── tokio-io v0.1.13 (*)
│ │ │ ├── tokio-reactor v0.1.12 (*)
│ │ │ ├── tokio-tcp v0.1.4 (*)
│ │ │ ├── tokio-threadpool v0.1.18 (*)
│ │ │ ├── tokio-timer v0.2.13 (*)
│ │ │ └── want v0.2.0
│ │ │ ├── futures v0.1.30
│ │ │ ├── log v0.4.11 (*)
│ │ │ └── try-lock v0.2.3
│ │ │ [build-dependencies]
│ │ │ └── rustc_version v0.2.3 (*)
│ │ ├── lambda_runtime_client v0.2.2
│ │ │ ├── failure v0.1.8 (*)
│ │ │ ├── http v0.1.21 (*)
│ │ │ ├── hyper v0.12.35 (*)
│ │ │ ├── lambda_runtime_errors v0.1.1
│ │ │ │ ├── failure v0.1.8 (*)
│ │ │ │ ├── lambda_runtime_errors_derive v0.1.1 (proc-macro)
│ │ │ │ │ ├── proc-macro2 v0.4.30
│ │ │ │ │ │ └── unicode-xid v0.1.0
│ │ │ │ │ ├── quote v0.6.13
│ │ │ │ │ │ └── proc-macro2 v0.4.30 (*)
│ │ │ │ │ ├── syn v0.15.44
│ │ │ │ │ │ ├── proc-macro2 v0.4.30 (*)
│ │ │ │ │ │ ├── quote v0.6.13 (*)
│ │ │ │ │ │ └── unicode-xid v0.1.0
│ │ │ │ │ └── synstructure v0.10.2
│ │ │ │ │ ├── proc-macro2 v0.4.30 (*)
│ │ │ │ │ ├── quote v0.6.13 (*)
│ │ │ │ │ ├── syn v0.15.44 (*)
│ │ │ │ │ └── unicode-xid v0.1.0
│ │ │ │ ├── log v0.4.11 (*)
│ │ │ │ └── serde_json v1.0.59
│ │ │ │ ├── itoa v0.4.6
│ │ │ │ ├── ryu v1.0.5
│ │ │ │ └── serde v1.0.117 (*)
│ │ │ ├── log v0.4.11 (*)
│ │ │ ├── serde v1.0.117 (*)
│ │ │ ├── serde_derive v1.0.117 (proc-macro) (*)
│ │ │ ├── serde_json v1.0.59 (*)
│ │ │ └── tokio v0.1.22 (*)
│ │ ├── lambda_runtime_errors v0.1.1 (*)
│ │ ├── log v0.4.11 (*)
│ │ └── tokio v0.1.22 (*)
│ │ [build-dependencies]
│ │ └── rustc_version v0.2.3 (*)
│ ├── log v0.4.11 (*)
│ ├── serde v1.0.117 (*)
│ ├── serde_derive v1.0.117 (proc-macro) (*)
│ ├── serde_json v1.0.59 (*)
│ └── tokio v0.1.22 (*)
├── mysql v20.1.0
│ ├── bufstream v0.1.4
│ ├── io-enum v0.2.4 (proc-macro)
│ │ ├── derive_utils v0.11.0
│ │ │ ├── proc-macro2 v1.0.24 (*)
│ │ │ ├── quote v1.0.7 (*)
│ │ │ └── syn v1.0.48 (*)
│ │ ├── quote v1.0.7 (*)
│ │ └── syn v1.0.48 (*)
│ │ [build-dependencies]
│ │ └── autocfg v1.0.1
│ ├── libc v0.2.80
│ ├── lru v0.6.1
│ │ └── hashbrown v0.9.1 (*)
│ ├── mysql_common v0.24.1
│ │ ├── base64 v0.12.3
│ │ ├── bigdecimal v0.1.2
│ │ │ ├── num-bigint v0.2.6
│ │ │ │ ├── num-integer v0.1.44 (*)
│ │ │ │ └── num-traits v0.2.14 (*)
│ │ │ │ [build-dependencies]
│ │ │ │ └── autocfg v1.0.1
│ │ │ ├── num-integer v0.1.44 (*)
│ │ │ ├── num-traits v0.2.14 (*)
│ │ │ └── serde v1.0.117 (*)
│ │ ├── bitflags v1.2.1
│ │ ├── byteorder v1.3.4
│ │ ├── bytes v0.5.6
│ │ ├── chrono v0.4.19 (*)
│ │ ├── flate2 v1.0.19
│ │ │ ├── cfg-if v1.0.0
│ │ │ ├── crc32fast v1.2.1
│ │ │ │ └── cfg-if v1.0.0
│ │ │ ├── libc v0.2.80
│ │ │ ├── libz-sys v1.1.2
│ │ │ │ [build-dependencies]
│ │ │ │ ├── cc v1.0.64
│ │ │ │ └── pkg-config v0.3.19
│ │ │ └── miniz_oxide v0.4.3 (*)
│ │ ├── lazy_static v1.4.0
│ │ ├── lexical v5.2.0
│ │ │ ├── cfg-if v0.1.10
│ │ │ └── lexical-core v0.7.4
│ │ │ ├── arrayvec v0.5.2
│ │ │ ├── bitflags v1.2.1
│ │ │ ├── cfg-if v0.1.10
│ │ │ ├── ryu v1.0.5
│ │ │ └── static_assertions v1.1.0
│ │ ├── num-bigint v0.2.6 (*)
│ │ ├── num-traits v0.2.14 (*)
│ │ ├── rand v0.7.3
│ │ │ ├── getrandom v0.1.15
│ │ │ │ ├── cfg-if v0.1.10
│ │ │ │ └── libc v0.2.80
│ │ │ ├── libc v0.2.80
│ │ │ ├── rand_chacha v0.2.2
│ │ │ │ ├── ppv-lite86 v0.2.10
│ │ │ │ └── rand_core v0.5.1
│ │ │ │ └── getrandom v0.1.15 (*)
│ │ │ └── rand_core v0.5.1 (*)
│ │ ├── regex v1.4.2
│ │ │ ├── aho-corasick v0.7.15
│ │ │ │ └── memchr v2.3.4
│ │ │ ├── memchr v2.3.4
│ │ │ ├── regex-syntax v0.6.21
│ │ │ └── thread_local v1.0.1
│ │ │ └── lazy_static v1.4.0
│ │ ├── rust_decimal v1.8.1
│ │ │ ├── num-traits v0.2.14 (*)
│ │ │ └── serde v1.0.117 (*)
│ │ ├── serde v1.0.117 (*)
│ │ ├── serde_json v1.0.59 (*)
│ │ ├── sha1 v0.6.0
│ │ ├── sha2 v0.8.2
│ │ │ ├── block-buffer v0.7.3
│ │ │ │ ├── block-padding v0.1.5
│ │ │ │ │ └── byte-tools v0.3.1
│ │ │ │ ├── byte-tools v0.3.1
│ │ │ │ ├── byteorder v1.3.4
│ │ │ │ └── generic-array v0.12.3
│ │ │ │ └── typenum v1.12.0
│ │ │ ├── digest v0.8.1
│ │ │ │ └── generic-array v0.12.3 (*)
│ │ │ ├── fake-simd v0.1.2
│ │ │ └── opaque-debug v0.2.3
│ │ ├── time v0.2.23
│ │ │ ├── const_fn v0.4.3 (proc-macro)
│ │ │ ├── libc v0.2.80
│ │ │ ├── standback v0.2.13
│ │ │ │ [build-dependencies]
│ │ │ │ └── version_check v0.9.2
│ │ │ └── time-macros v0.1.1
│ │ │ ├── proc-macro-hack v0.5.19 (proc-macro)
│ │ │ └── time-macros-impl v0.1.1 (proc-macro)
│ │ │ ├── proc-macro-hack v0.5.19 (proc-macro)
│ │ │ ├── proc-macro2 v1.0.24 (*)
│ │ │ ├── quote v1.0.7 (*)
│ │ │ ├── standback v0.2.13 (*)
│ │ │ └── syn v1.0.48 (*)
│ │ │ [build-dependencies]
│ │ │ └── version_check v0.9.2
│ │ ├── twox-hash v1.6.0
│ │ │ ├── cfg-if v0.1.10
│ │ │ ├── rand v0.7.3 (*)
│ │ │ └── static_assertions v1.1.0
│ │ └── uuid v0.8.1
│ ├── native-tls v0.2.6
│ │ ├── lazy_static v1.4.0
│ │ ├── libc v0.2.80
│ │ ├── security-framework v2.0.0
│ │ │ ├── bitflags v1.2.1
│ │ │ ├── core-foundation v0.9.1
│ │ │ │ ├── core-foundation-sys v0.8.2
│ │ │ │ └── libc v0.2.80
│ │ │ ├── core-foundation-sys v0.8.2
│ │ │ ├── libc v0.2.80
│ │ │ └── security-framework-sys v2.0.0
│ │ │ ├── core-foundation-sys v0.8.2
│ │ │ └── libc v0.2.80
│ │ ├── security-framework-sys v2.0.0 (*)
│ │ └── tempfile v3.1.0
│ │ ├── cfg-if v0.1.10
│ │ ├── libc v0.2.80
│ │ ├── rand v0.7.3 (*)
│ │ └── remove_dir_all v0.5.3
│ ├── nix v0.19.0
│ │ ├── bitflags v1.2.1
│ │ ├── cfg-if v0.1.10
│ │ └── libc v0.2.80
│ ├── pem v0.8.2
│ │ ├── base64 v0.13.0
│ │ ├── once_cell v1.5.2
│ │ └── regex v1.4.2 (*)
│ ├── percent-encoding v2.1.0
│ ├── serde v1.0.117 (*)
│ ├── serde_json v1.0.59 (*)
│ ├── socket2 v0.3.16
│ │ ├── cfg-if v0.1.10
│ │ └── libc v0.2.80
│ ├── twox-hash v1.6.0 (*)
│ └── url v2.2.0
│ ├── form_urlencoded v1.0.0
│ │ ├── matches v0.1.8
│ │ └── percent-encoding v2.1.0
│ ├── idna v0.2.0
│ │ ├── matches v0.1.8
│ │ ├── unicode-bidi v0.3.4
│ │ │ └── matches v0.1.8
│ │ └── unicode-normalization v0.1.16
│ │ └── tinyvec v1.1.0
│ │ └── tinyvec_macros v0.1.0
│ ├── matches v0.1.8
│ └── percent-encoding v2.1.0
├── reqwest v0.9.24
│ ├── base64 v0.10.1
│ │ └── byteorder v1.3.4
│ ├── bytes v0.4.12 (*)
│ ├── cookie v0.12.0
│ │ ├── time v0.1.44 (*)
│ │ └── url v1.7.2
│ │ ├── idna v0.1.5
│ │ │ ├── matches v0.1.8
│ │ │ ├── unicode-bidi v0.3.4 (*)
│ │ │ └── unicode-normalization v0.1.16 (*)
│ │ ├── matches v0.1.8
│ │ └── percent-encoding v1.0.1
│ ├── cookie_store v0.7.0
│ │ ├── cookie v0.12.0 (*)
│ │ ├── failure v0.1.8 (*)
│ │ ├── idna v0.1.5 (*)
│ │ ├── log v0.4.11 (*)
│ │ ├── publicsuffix v1.5.4
│ │ │ ├── error-chain v0.12.4
│ │ │ │ [build-dependencies]
│ │ │ │ └── version_check v0.9.2
│ │ │ ├── idna v0.2.0 (*)
│ │ │ ├── lazy_static v1.4.0
│ │ │ ├── regex v1.4.2 (*)
│ │ │ └── url v2.2.0 (*)
│ │ ├── serde v1.0.117 (*)
│ │ ├── serde_json v1.0.59 (*)
│ │ ├── time v0.1.44 (*)
│ │ ├── try_from v0.3.2
│ │ │ └── cfg-if v0.1.10
│ │ └── url v1.7.2 (*)
│ ├── encoding_rs v0.8.26
│ │ └── cfg-if v1.0.0
│ ├── flate2 v1.0.19 (*)
│ ├── futures v0.1.30
│ ├── http v0.1.21 (*)
│ ├── hyper v0.12.35 (*)
│ ├── hyper-tls v0.3.2
│ │ ├── bytes v0.4.12 (*)
│ │ ├── futures v0.1.30
│ │ ├── hyper v0.12.35 (*)
│ │ ├── native-tls v0.2.6 (*)
│ │ └── tokio-io v0.1.13 (*)
│ ├── log v0.4.11 (*)
│ ├── mime v0.3.16
│ ├── mime_guess v2.0.3
│ │ ├── mime v0.3.16
│ │ └── unicase v2.6.0
│ │ [build-dependencies]
│ │ └── version_check v0.9.2
│ │ [build-dependencies]
│ │ └── unicase v2.6.0 (*)
│ ├── native-tls v0.2.6 (*)
│ ├── serde v1.0.117 (*)
│ ├── serde_json v1.0.59 (*)
│ ├── serde_urlencoded v0.5.5
│ │ ├── dtoa v0.4.6
│ │ ├── itoa v0.4.6
│ │ ├── serde v1.0.117 (*)
│ │ └── url v1.7.2 (*)
│ ├── time v0.1.44 (*)
│ ├── tokio v0.1.22 (*)
│ ├── tokio-executor v0.1.10 (*)
│ ├── tokio-io v0.1.13 (*)
│ ├── tokio-threadpool v0.1.18 (*)
│ ├── tokio-timer v0.2.13 (*)
│ ├── url v1.7.2 (*)
│ └── uuid v0.7.4
│ └── rand v0.6.5
│ ├── libc v0.2.80
│ ├── rand_chacha v0.1.1
│ │ └── rand_core v0.3.1
│ │ └── rand_core v0.4.2
│ │ [build-dependencies]
│ │ └── autocfg v0.1.7
│ ├── rand_core v0.4.2
│ ├── rand_hc v0.1.0
│ │ └── rand_core v0.3.1 (*)
│ ├── rand_isaac v0.1.1
│ │ └── rand_core v0.3.1 (*)
│ ├── rand_jitter v0.1.4
│ │ ├── libc v0.2.80
│ │ └── rand_core v0.4.2
│ ├── rand_os v0.1.3
│ │ ├── libc v0.2.80
│ │ └── rand_core v0.4.2
│ ├── rand_pcg v0.1.2
│ │ └── rand_core v0.4.2
│ │ [build-dependencies]
│ │ └── autocfg v0.1.7
│ └── rand_xorshift v0.1.1
│ └── rand_core v0.3.1 (*)
│ [build-dependencies]
│ └── autocfg v0.1.7
└── serde v1.0.117 (*)
这是我正在使用的构建命令:
CC_x86_64_unknown_linux_musl="x86_64-linux-musl-gcc" cross build --target x86_64-unknown-linux-musl --release
为什么构建失败 opensslopenssl甚至不在项目中?

最佳答案

它位于您正在构建的目标的依赖关系图中。
使用时 cargo tree ,您需要包含您正在构建的目标以使用 --target命令行选项。此外,您可以使用 -i和一个搜索字符串来准确知道哪些 crate 带来了依赖:

% cargo tree --target x86_64-unknown-linux-musl -i openssl-sys
openssl-sys v0.9.58
├── native-tls v0.2.6
│ ├── hyper-tls v0.3.2
│ │ └── reqwest v0.9.24
│ │ └── depz v0.1.0 (/private/tmp/depz)
│ ├── mysql v20.1.0
│ │ └── depz v0.1.0 (/private/tmp/depz)
│ └── reqwest v0.9.24 (*)
└── openssl v0.10.30
└── native-tls v0.2.6 (*)

关于aws-lambda - 为什么当 openssl 不在依赖关系图中时,openssl 上的交叉编译构建会失败?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65079343/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com