Closed timbertson closed 11 months ago
Related issues:
One promising suggestion from @LnL7 is to add a stripExcludes
list, which would be used to exclude specific files via find
arguments. The most correct fix seems to be "don't ever strip .rlib files", so it's a natural use case for this feature.
For those who want a fix while we wait for the PR to land, you can add the following overlay:
(self: super: self.lib.optionalAttrs self.stdenv.hostPlatform.isDarwin {
buildRustCrate = arg: super.buildRustCrate ({ dontStrip = true; } // arg);
})
This breaks using buildRustCrateForPkgs
from crate2nix but I'm sure someone else can figure out how to fix that...
Or even better, you can apply this patch to your nixpkgs (couldn't figure out a way to make this an override): https://github.com/bouk/nixpkgs/commit/bf5e208bf9f7c1631e08eb967263a622025226e4
Created a PR to (finally) fix this https://github.com/NixOS/nixpkgs/pull/255900
> Task :full-megazord:cargoBuildLinux-x86-64
Compiling log v0.4.17
Compiling memchr v2.5.0
Compiling anyhow v1.0.58
Compiling plain v0.2.3
Compiling fs-err v2.7.0
Compiling scopeguard v1.1.0
Compiling siphasher v0.3.10
Compiling heck v0.4.1
Compiling glob v0.3.1
Compiling fallible-streaming-iterator v0.1.9
Compiling bitflags v2.3.1
Compiling byteorder v1.4.3
Compiling getrandom v0.2.7
Compiling lock_api v0.4.7
Compiling libsqlite3-sys v0.26.0
Compiling tinyvec v1.6.0
Compiling parking_lot_core v0.9.3
Compiling form_urlencoded v1.0.1
Compiling ahash v0.7.6
Compiling fallible-iterator v0.2.0
Compiling base64 v0.13.0
Compiling hex v0.4.3
Compiling serde v1.0.164
Compiling thiserror v1.0.31
Compiling scroll v0.11.0
Compiling prost v0.11.9
Compiling askama v0.12.0
Compiling hawk v3.2.1
Compiling io-lifetimes v1.0.10
Compiling error-support v0.1.0 (/home/qgb/gitlab/fdroiddata/build/srclib/MozAppServices/components/support/error)
Compiling nss_sys v0.1.0 (/home/qgb/gitlab/fdroiddata/build/srclib/MozAppServices/components/support/rc_crypto/nss/nss_sys)
Compiling base64 v0.12.3
Compiling rustix v0.36.7
error[E0786]: found invalid metadata files for crate `cfg_if`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.7/src/lib.rs:159:1
|
159 | extern crate cfg_if;
| ^^^^^^^^^^^^^^^^^^^^
|
= note: invalid metadata version found: /home/qgb/gitlab/fdroiddata/build/srclib/MozAppServices/target/release/deps/libcfg_if-ecb4d74fcb06e227.rmeta
Compiling ppv-lite86 v0.2.16
error[E0786]: found invalid metadata files for crate `cfg_if`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.17/src/lib.rs:331:1
|
331 | extern crate cfg_if;
| ^^^^^^^^^^^^^^^^^^^^
|
= note: invalid metadata version found: /home/qgb/gitlab/fdroiddata/build/srclib/MozAppServices/target/release/deps/libcfg_if-ecb4d74fcb06e227.rmeta
error: cannot find macro `cfg_if` in this scope
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.7/src/error.rs:99:1
|
99 | cfg_if! {
| ^^^^^^
|
note: `cfg_if` is imported here, but it is an unresolved item, not a macro
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.7/src/lib.rs:159:1
|
159 | extern crate cfg_if;
| ^^^^^^^^^^^^^^^^^^^^
error: cannot find macro `cfg_if` in this scope
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.7/src/lib.rs:175:1
|
175 | cfg_if! {
| ^^^^^^
|
note: `cfg_if` is imported here, but it is an unresolved item, not a macro
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.7/src/lib.rs:159:1
|
159 | extern crate cfg_if;
| ^^^^^^^^^^^^^^^^^^^^
error[E0786]: found invalid metadata files for crate `matches`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/form_urlencoded-1.0.1/src/lib.rs:17:1
|
17 | extern crate matches;
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: invalid metadata version found: /home/qgb/gitlab/fdroiddata/build/srclib/MozAppServices/target/release/deps/libmatches-ee99be359aa79c38.rmeta
error[E0786]: found invalid metadata files for crate `percent_encoding`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/form_urlencoded-1.0.1/src/lib.rs:19:5
|
19 | use percent_encoding::{percent_decode, percent_encode_byte};
| ^^^^^^^^^^^^^^^^
|
= note: invalid metadata version found: /home/qgb/gitlab/fdroiddata/build/srclib/MozAppServices/target/release/deps/libpercent_encoding-09f50ce261816d90.rmeta
error: cannot find macro `cfg_if` in this scope
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.17/src/lib.rs:1654:1
|
1654 | cfg_if! {
| ^^^^^^
|
note: `cfg_if` is imported here, but it is an unresolved item, not a macro
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.17/src/lib.rs:331:1
|
331 | extern crate cfg_if;
| ^^^^^^^^^^^^^^^^^^^^
error[E0786]: found invalid metadata files for crate `smallvec`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot_core-0.9.3/src/parking_lot.rs:15:5
|
15 | use smallvec::SmallVec;
| ^^^^^^^^
|
= note: invalid metadata version found: /home/qgb/gitlab/fdroiddata/build/srclib/MozAppServices/target/release/deps/libsmallvec-5a56acaddc9c2e91.rmeta
error[E0786]: found invalid metadata files for crate `cfg_if`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot_core-0.9.3/src/thread_parker/mod.rs:1:5
|
1 | use cfg_if::cfg_if;
| ^^^^^^
|
= note: invalid metadata version found: /home/qgb/gitlab/fdroiddata/build/srclib/MozAppServices/target/release/deps/libcfg_if-ecb4d74fcb06e227.rmeta
error[E0432]: unresolved imports `self::imp`, `crate::thread_parker::ThreadParker`, `crate::thread_parker::ThreadParker`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot_core-0.9.3/src/parking_lot.rs:7:28
|
7 | use crate::thread_parker::{ThreadParker, ThreadParkerT, UnparkHandleT};
| ^^^^^^^^^^^^
|
::: /root/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot_core-0.9.3/src/thread_parker/mod.rs:85:15
|
85 | pub use self::imp::{thread_yield, ThreadParker, UnparkHandle};
| ^^^ could not find `imp` in `self`
|
::: /root/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot_core-0.9.3/src/word_lock.rs:9:28
|
9 | use crate::thread_parker::{ThreadParker, ThreadParkerT, UnparkHandleT};
| ^^^^^^^^^^^^
error[E0786]: found invalid metadata files for crate `cfg_if`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot_core-0.9.3/src/parking_lot.rs:19:1
|
19 | cfg_if::cfg_if! {
| ^^^^^^
|
= note: invalid metadata version found: /home/qgb/gitlab/fdroiddata/build/srclib/MozAppServices/target/release/deps/libcfg_if-ecb4d74fcb06e227.rmeta
error: cannot determine resolution for the macro `cfg_if::cfg_if`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot_core-0.9.3/src/parking_lot.rs:19:1
|
19 | cfg_if::cfg_if! {
| ^^^^^^^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot determine resolution for the macro `cfg_if`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot_core-0.9.3/src/thread_parker/mod.rs:53:1
|
53 | cfg_if! {
| ^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error[E0425]: cannot find value `MAX_LEVEL_INNER` in this scope
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.17/src/lib.rs:1652:43
|
1652 | pub const STATIC_MAX_LEVEL: LevelFilter = MAX_LEVEL_INNER;
| ^^^^^^^^^^^^^^^ not found in this scope
Compiling linux-raw-sys v0.1.4
Compiling fastrand v1.7.0
error[E0412]: cannot find type `TimeoutInstant` in this scope
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot_core-0.9.3/src/parking_lot.rs:104:25
|
104 | pub fn new(timeout: TimeoutInstant, seed: u32) -> Self {
| ^^^^^^^^^^^^^^ not found in this scope
Compiling sql-support v0.1.0 (/home/qgb/gitlab/fdroiddata/build/srclib/MozAppServices/components/support/sql)
error[E0425]: cannot find function `os_err` in this scope
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.7/src/error.rs:125:32
|
125 | if let Some(err) = os_err(errno, &mut buf) {
| ^^^^^^ not found in this scope
For more information about this error, try `rustc --explain E0786`.
error[E0412]: cannot find type `TimeoutInstant` in this scope
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot_core-0.9.3/src/parking_lot.rs:116:14
|
116 | timeout: TimeoutInstant,
| ^^^^^^^^^^^^^^ not found in this scope
error[E0412]: cannot find type `TimeoutInstant` in this scope
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot_core-0.9.3/src/parking_lot.rs:124:21
|
124 | fn new(timeout: TimeoutInstant, seed: u32) -> FairTimeout {
| ^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `os_err` in this scope
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.7/src/error.rs:142:19
|
142 | match os_err(errno, &mut buf) {
| ^^^^^^ not found in this scope
error[E0786]: found invalid metadata files for crate `bytes`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-0.11.9/src/message.rs:7:5
|
7 | use bytes::{Buf, BufMut};
| ^^^^^
|
= note: invalid metadata version found: /home/qgb/gitlab/fdroiddata/build/srclib/MozAppServices/target/release/deps/libbytes-a3c02d6227b2d394.rmeta
error[E0786]: found invalid metadata files for crate `bytes`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-0.11.9/src/types.rs:11:7
|
11 | use ::bytes::{Buf, BufMut, Bytes};
| ^^^^^
|
= note: invalid metadata version found: /home/qgb/gitlab/fdroiddata/build/srclib/MozAppServices/target/release/deps/libbytes-a3c02d6227b2d394.rmeta
error[E0786]: found invalid metadata files for crate `bytes`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-0.11.9/src/encoding.rs:18:7
|
18 | use ::bytes::{Buf, BufMut, Bytes};
| ^^^^^
|
= note: invalid metadata version found: /home/qgb/gitlab/fdroiddata/build/srclib/MozAppServices/target/release/deps/libbytes-a3c02d6227b2d394.rmeta
error[E0786]: found invalid metadata files for crate `bytes`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-0.11.9/src/lib.rs:10:9
|
10 | pub use bytes;
| ^^^^^
|
= note: invalid metadata version found: /home/qgb/gitlab/fdroiddata/build/srclib/MozAppServices/target/release/deps/libbytes-a3c02d6227b2d394.rmeta
error[E0786]: found invalid metadata files for crate `bytes`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-0.11.9/src/lib.rs:22:5
|
22 | use bytes::{Buf, BufMut};
| ^^^^^
|
= note: invalid metadata version found: /home/qgb/gitlab/fdroiddata/build/srclib/MozAppServices/target/release/deps/libbytes-a3c02d6227b2d394.rmeta
error[E0432]: unresolved imports `super::Buf`, `super::BufMut`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-0.11.9/src/encoding.rs:879:17
|
879 | use super::{Buf, BufMut};
| ^^^ ^^^^^^
error: could not compile `form_urlencoded` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error[E0433]: failed to resolve: use of undeclared crate or module `imp`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.7/src/lib.rs:262:5
|
262 | imp::getrandom_inner(dest)
| ^^^ use of undeclared crate or module `imp`
error[E0786]: found invalid metadata files for crate `askama_escape`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/askama-0.12.0/src/filters/mod.rs:22:5
|
22 | use askama_escape::{Escaper, MarkupDisplay};
| ^^^^^^^^^^^^^
|
= note: invalid metadata version found: /home/qgb/gitlab/fdroiddata/build/srclib/MozAppServices/target/release/deps/libaskama_escape-a51165b731ec66bb.rmeta
error[E0786]: found invalid metadata files for crate `tinyvec_macros`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:7:5
|
7 | use tinyvec_macros::impl_mirrored;
| ^^^^^^^^^^^^^^
|
= note: invalid metadata version found: /home/qgb/gitlab/fdroiddata/build/srclib/MozAppServices/target/release/deps/libtinyvec_macros-5f15700c69f2b1b8.rmeta
error: cannot determine resolution for the macro `impl_mirrored`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:144:3
|
144 | impl_mirrored! {
| ^^^^^^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot determine resolution for the macro `impl_mirrored`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:153:3
|
153 | impl_mirrored! {
| ^^^^^^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot determine resolution for the macro `impl_mirrored`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:556:3
|
556 | impl_mirrored! {
| ^^^^^^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot determine resolution for the macro `impl_mirrored`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:1073:3
|
1073 | impl_mirrored! {
| ^^^^^^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot determine resolution for the macro `impl_mirrored`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:1098:3
|
1098 | impl_mirrored! {
| ^^^^^^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot determine resolution for the macro `impl_mirrored`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:1341:3
|
1341 | impl_mirrored! {
| ^^^^^^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot determine resolution for the macro `impl_mirrored`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:1355:3
|
1355 | impl_mirrored! {
| ^^^^^^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot determine resolution for the macro `impl_mirrored`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:1377:3
|
1377 | impl_mirrored! {
| ^^^^^^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
Some errors have detailed explanations: E0425, E0433, E0786.
For more information about an error, try `rustc --explain E0425`.
error[E0786]: found invalid metadata files for crate `askama_escape`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/askama-0.12.0/src/lib.rs:73:9
|
73 | pub use askama_escape::{Html, MarkupDisplay, Text};
| ^^^^^^^^^^^^^
|
= note: invalid metadata version found: /home/qgb/gitlab/fdroiddata/build/srclib/MozAppServices/target/release/deps/libaskama_escape-a51165b731ec66bb.rmeta
error: could not compile `getrandom` due to 6 previous errors
Some errors have detailed explanations: E0425, E0786.
error[E0433]: failed to resolve: use of undeclared type `TimeoutInstant`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot_core-0.9.3/src/parking_lot.rs:74:19
|
74 | let now = TimeoutInstant::now();
| ^^^^^^^^^^^^^^ use of undeclared type `TimeoutInstant`
error: could not compile `askama` due to 2 previous errors
error: could not compile `log` due to 3 previous errors
error[E0433]: failed to resolve: use of undeclared type `TimeoutInstant`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot_core-0.9.3/src/parking_lot.rs:131:19
|
131 | let now = TimeoutInstant::now();
| ^^^^^^^^^^^^^^ use of undeclared type `TimeoutInstant`
Some errors have detailed explanations: E0432, E0786.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `prost` due to 6 previous errors
Some errors have detailed explanations: E0412, E0432, E0433, E0786.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `parking_lot_core` due to 11 previous errors
error[E0046]: not all trait items implemented, missing: `deref`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:141:1
|
141 | impl<A: Array> Deref for TinyVec<A> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `deref` in implementation
|
= help: implement the missing item: `fn deref(&self) -> &<Self as core::ops::Deref>::Target { todo!() }`
error[E0046]: not all trait items implemented, missing: `deref_mut`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:152:1
|
152 | impl<A: Array> DerefMut for TinyVec<A> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `deref_mut` in implementation
|
= help: implement the missing item: `fn deref_mut(&mut self) -> &mut <Self as core::ops::Deref>::Target { todo!() }`
error[E0046]: not all trait items implemented, missing: `next`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:1070:1
|
1070 | impl<'p, A: Array> Iterator for TinyVecDrain<'p, A> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `next` in implementation
|
= help: implement the missing item: `fn next(&mut self) -> Option<<Self as core::iter::Iterator>::Item> { todo!() }`
error[E0046]: not all trait items implemented, missing: `next_back`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:1097:1
|
1097 | impl<'p, A: Array> DoubleEndedIterator for TinyVecDrain<'p, A> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `next_back` in implementation
|
= help: implement the missing item: `fn next_back(&mut self) -> Option<<Self as core::iter::Iterator>::Item> { todo!() }`
error[E0046]: not all trait items implemented, missing: `next`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:1352:1
|
1352 | impl<A: Array> Iterator for TinyVecIterator<A> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `next` in implementation
|
= help: implement the missing item: `fn next(&mut self) -> Option<<Self as core::iter::Iterator>::Item> { todo!() }`
error[E0046]: not all trait items implemented, missing: `next_back`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:1376:1
|
1376 | impl<A: Array> DoubleEndedIterator for TinyVecIterator<A> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `next_back` in implementation
|
= help: implement the missing item: `fn next_back(&mut self) -> Option<<Self as core::iter::Iterator>::Item> { todo!() }`
error[E0599]: no method named `truncate` found for mutable reference `&mut TinyVec<A>` in the current scope
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:123:12
|
123 | self.truncate(o.len());
| ^^^^^^^^ method not found in `&mut TinyVec<A>`
error[E0599]: no method named `truncate` found for mutable reference `&mut TinyVec<A>` in the current scope
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:678:10
|
678 | self.truncate(0)
| ^^^^^^^^ method not found in `&mut TinyVec<A>`
error[E0599]: no method named `truncate` found for mutable reference `&mut TinyVec<A>` in the current scope
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:945:27
|
945 | None => return self.truncate(new_len),
| ^^^^^^^^ method not found in `&mut TinyVec<A>`
error[E0599]: no method named `remove` found for mutable reference `&'p mut TinyVec<A>` in the current scope
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:1140:37
|
1140 | let removed = self.parent.remove(self.removal_start);
| ^^^^^^ method not found in `&'p mut TinyVec<A>`
error[E0599]: no method named `remove` found for mutable reference `&'p mut TinyVec<A>` in the current scope
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:1193:37
|
1193 | let removed = self.parent.remove(self.removal_end - 1);
| ^^^^^^ method not found in `&'p mut TinyVec<A>`
error[E0599]: no method named `as_slice` found for reference `&TinyVecIterator<A>` in the current scope
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/tinyvec.rs:1395:50
|
1395 | f.debug_tuple("TinyVecIterator").field(&self.as_slice()).finish()
| ^^^^^^^^ method not found in `&TinyVecIterator<A>`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `array::Array` defines an item `as_slice`, perhaps you need to implement it
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.6.0/src/array.rs:19:1
|
19 | pub trait Array {
| ^^^^^^^^^^^^^^^
Some errors have detailed explanations: E0046, E0599, E0786.
For more information about an error, try `rustc --explain E0046`.
error: could not compile `tinyvec` due to 21 previous errors
> Task :full-megazord:cargoBuildLinux-x86-64 FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':full-megazord:cargoBuildLinux-x86-64'.
> Process 'command 'cargo'' finished with non-zero exit value 101
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 28s
118 actionable tasks: 11 executed, 107 up-to-date
root@ce489658339c:/home/qgb/gitlab/fdroiddata/build/org.mozilla.fennec_fdroid#
tl;dr
Darwin's
strip
v973 appears to break rust.rlib
files. The previous shipped version (v949) didn't break anything, but that may have been accidental.Reproduction:
If you set
dontStrip = true;
in the cfg-if derivation, the build succeeds. The resultingencoding
rlib file is likely invalid too, this is just a minimal reproduction.On linux:
The same derivation builds fine:
/nix/store/x5lz2zrq2xkj02xn7mkxm19nknik202k-rust_encoding_rs-0.8.32
So presumably there's some difference in how
strip
works.Narrowing down
nixpkgs
versionsgit bisect
ofnixpkgs
got me close, but many commits needed skipping due to unrelated issues. The best I could get is:The most relevant looking commit in that range is:
The
darwin.cctools
derivation from the above nixpkgs commits are:The cause
Assuming that's the culprit, I copied the non-stripped
rlib
and manually ranstrip -S
using both these implementations. This confirms that v973 appears to be the culprit - the v949 version results in a.rmeta
section while v973 removes it.I note that the strip command prints
warning: input object file already stripped
. Based on this change in cctools-port, it looks like the earlier version bails and essentially does nothing, while the later version proceeds to do more stripping on an already-stripped file, resulting in the .rmeta section being removed.Fix options:
rlib
files? It says they're already stripped, maybe stripping isn't relevant to this kind of file?strip
removes the.rmeta
section, and this should be perfectly fine?Inspection details
Note there's no `.rmeta` section. With `dontStrip = true` to the cfg-if derivation, I get: