<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15402</bug_id>
          
          <creation_ts>2024-02-15 20:16:35 +0000</creation_ts>
          <short_desc>rust fails to rebuild</short_desc>
          <delta_ts>2025-11-07 14:06:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>4.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>alex.kiernan</cc>
    
    <cc>ccasciato</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>sundeep.kokkonda</cc>
    
    <cc>Yash.Shinde</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>98217</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-02-15 20:16:35 +0000</bug_when>
    <thetext>If I cause rust to rebuild, it fails:

|        Dirty curl v0.4.44: the dependency build_script_build was rebuilt
| error[E0460]: found possibly newer version of crate `std` which `libnghttp2_sys` depends on
|  --&gt; /usr/src/debug/cargo-native/1.74.1/rustc-1.74.1-src/vendor/curl-sys/lib.rs:6:1
|   |
| 6 | extern crate libnghttp2_sys;
|   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|   |
|   = note: perhaps that crate needs to be recompiled?
|   = note: the following crate versions were found:
|           crate `std`: /yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-604a5a72a4c13fea.rlib
|           crate `std`: /yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-604a5a72a4c13fea.so
|           crate `libnghttp2_sys`: /yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/build/target/aarch64-unknown-linux-gnu/release/deps/liblibnghttp2_sys-c7c93007108ad27f.rmeta
|
| error[E0460]: found possibly newer version of crate `std` which `libz_sys` depends on
|  --&gt; /usr/src/debug/cargo-native/1.74.1/rustc-1.74.1-src/vendor/curl-sys/lib.rs:8:1
|   |
| 8 | extern crate libz_sys;
|   | ^^^^^^^^^^^^^^^^^^^^^^
|   |
|   = note: perhaps that crate needs to be recompiled?
|   = note: the following crate versions were found:
|           crate `std`: /yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-604a5a72a4c13fea.rlib
|           crate `std`: /yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-604a5a72a4c13fea.so
|           crate `libz_sys`: /yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/build/target/aarch64-unknown-linux-gnu/release/deps/liblibz_sys-db73db4f080305e9.rmeta
|
| error[E0460]: found possibly newer version of crate `std` which `openssl_sys` depends on
|   --&gt; /usr/src/debug/cargo-native/1.74.1/rustc-1.74.1-src/vendor/curl-sys/lib.rs:10:1
|    |
| 10 | extern crate openssl_sys;
|    | ^^^^^^^^^^^^^^^^^^^^^^^^^
|    |
|    = note: perhaps that crate needs to be recompiled?
|    = note: the following crate versions were found:
|            crate `std`: /yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-604a5a72a4c13fea.rlib
|            crate `std`: /yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-604a5a72a4c13fea.so
|            crate `openssl_sys`: /yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/build/target/aarch64-unknown-linux-gnu/release/deps/libopenssl_sys-b521a866d33460cb.rmeta
|
| error[E0463]: can&apos;t find crate for `libc`
|   --&gt; /usr/src/debug/cargo-native/1.74.1/rustc-1.74.1-src/vendor/curl-sys/lib.rs:14:5
|    |
| 14 | use libc::c_ulong;
|    |     ^^^^ can&apos;t find crate
|
| error[E0463]: can&apos;t find crate for `libc`
|   --&gt; /usr/src/debug/cargo-native/1.74.1/rustc-1.74.1-src/vendor/curl-sys/lib.rs:15:5
|    |
| 15 | use libc::{c_char, c_double, c_int, c_long, c_short, c_uint, c_void, size_t, time_t};
|    |     ^^^^ can&apos;t find crate
|
| error[E0463]: can&apos;t find crate for `libc`
|   --&gt; /usr/src/debug/cargo-native/1.74.1/rustc-1.74.1-src/vendor/curl-sys/lib.rs:18:9
|    |
| 18 | pub use libc::fd_set;
|    |         ^^^^ can&apos;t find crate
|
| error[E0463]: can&apos;t find crate for `libc`
|   --&gt; /usr/src/debug/cargo-native/1.74.1/rustc-1.74.1-src/vendor/curl-sys/lib.rs:29:22
|    |
| 29 | pub type __enum_ty = libc::c_uint;
|    |                      ^^^^ can&apos;t find crate
|
| error[E0463]: can&apos;t find crate for `libc`
|   --&gt; /usr/src/debug/cargo-native/1.74.1/rustc-1.74.1-src/vendor/curl-sys/lib.rs:40:26
|    |
| 40 | pub type curl_socket_t = libc::c_int;
|    |                          ^^^^ can&apos;t find crate
|
| error[E0463]: can&apos;t find crate for `libc`
|     --&gt; /usr/src/debug/cargo-native/1.74.1/rustc-1.74.1-src/vendor/curl-sys/lib.rs:1026:15
|      |
| 1026 |     pub addr: libc::sockaddr,
|      |               ^^^^ can&apos;t find crate
|
| Some errors have detailed explanations: E0460, E0463.
| For more information about an error, try `rustc --explain E0460`.
| The following warnings were emitted during compilation:
|
| warning: In file included from curl/lib/sendf.h:29,
| warning:                  from curl/lib/connect.c:57:
| warning: In function ‘is_connected’,
| warning:     inlined from ‘cf_he_connect’ at curl/lib/connect.c:906:16:
| warning: curl/lib/curl_trc.h:127:21: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
| warning:   127 | #define CURL_TRC_CF Curl_trc_cf_infof
| warning: curl/lib/connect.c:696:5: note: in expansion of macro ‘CURL_TRC_CF’
| warning:   696 |     CURL_TRC_CF(data, cf, &quot;%s assess started=%d, result=%d&quot;,
| warning:       |     ^~~~~~~~~~~
|
| error: could not compile `curl-sys` (lib) due to 9 previous errors
|
| Caused by:
|   process didn&apos;t exit successfully: `rustc --crate-name curl_sys --edition=2018 /yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/rustc-1.74.1-src/vendor/curl-sys/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg &apos;feature=&quot;default&quot;&apos; --cfg &apos;feature=&quot;http2&quot;&apos; --cfg &apos;feature=&quot;libnghttp2-sys&quot;&apos; --cfg &apos;feature=&quot;openssl-sys&quot;&apos; --cfg &apos;feature=&quot;ssl&quot;&apos; -C metadata=3cf77b884d07b860 -C extra-filename=-3cf77b884d07b860 --out-dir /yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/build/target/aarch64-unknown-linux-gnu/release/deps --target aarch64-unknown-linux-gnu -C linker=/yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/wrapper/target-rust-ccld -L dependency=/yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/build/target/aarch64-unknown-linux-gnu/release/deps -L dependency=/yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/build/target/release/deps --extern libc=/yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/build/target/aarch64-unknown-linux-gnu/release/deps/liblibc-03a63a9cae5c70dc.rmeta --extern libnghttp2_sys=/yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/build/target/aarch64-unknown-linux-gnu/release/deps/liblibnghttp2_sys-c7c93007108ad27f.rmeta --extern libz_sys=/yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/build/target/aarch64-unknown-linux-gnu/release/deps/liblibz_sys-db73db4f080305e9.rmeta --extern openssl_sys=/yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/build/target/aarch64-unknown-linux-gnu/release/deps/libopenssl_sys-b521a866d33460cb.rmeta --cap-lints allow -L /yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib --remap-path-prefix=/yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1=/usr/src/debug/cargo-native/1.74.1 -L native=/yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/build/target/aarch64-unknown-linux-gnu/release/build/curl-sys-2bace23943563f63/out/build -l static=curl -L native=/yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/build/target/aarch64-unknown-linux-gnu/release/build/libnghttp2-sys-eb4f55f26284a701/out/i/lib -L native=/yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib -L native=/yocto/ross/build/tmp/work/aarch64-linux/cargo-native/1.74.1/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib --cfg libcurl_vendored --cfg link_libnghttp2 --cfg link_libz --cfg link_openssl` (exit status: 1)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98257</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-02-22 15:35:09 +0000</bug_when>
    <thetext>Ross, what command did you use to force the rebuild?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98316</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-02-23 11:41:01 +0000</bug_when>
    <thetext>Normally, poking at other things which cause a rebuild. This should be reproducible with -Cconfigure, I&apos;ll try.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98317</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-02-23 12:57:02 +0000</bug_when>
    <thetext>Can&apos;t replicate with a simple -Cconfigure :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98334</commentid>
    <comment_count>4</comment_count>
    <who name="Sundeep Kokkonda">sundeep.kokkonda</who>
    <bug_when>2024-02-28 01:50:35 +0000</bug_when>
    <thetext>Not sure of exact reproducible steps, but I also observed errors like below when rebuilding rust.
error[E0460]: found possibly newer version of crate `std`...

And, when I give a new build in new workspace this error was not seen. May be a corrupted workspace due to multiple rebuilds or their might be an underling problem which is unable to parse crate dependencies and not rebuilding the required crates.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98480</commentid>
    <comment_count>5</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-03-14 15:43:35 +0000</bug_when>
    <thetext>And I can&apos;t replicate on demand again.  I&apos;ll leave it assigned to me and will debug when it happens again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98947</commentid>
    <comment_count>6</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-04-30 15:36:08 +0000</bug_when>
    <thetext>Can&apos;t replicate on demand.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102528</commentid>
    <comment_count>7</comment_count>
    <who name="Alex Kiernan">alex.kiernan</who>
    <bug_when>2025-07-30 12:30:39 +0000</bug_when>
    <thetext>Have just seen this with current master:

|      Running `rustc --crate-name libgit2_sys --edition=2018 /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/sources/rustc-1.87.0-src/vendor/libgit2-sys-0.18.0+1.9.0/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg &apos;feature=&quot;https&quot;&apos; --cfg &apos;feature=&quot;libssh2-sys&quot;&apos; --cfg &apos;feature=&quot;openssl-sys&quot;&apos; --cfg &apos;feature=&quot;ssh&quot;&apos; --check-cfg &apos;cfg(docsrs,test)&apos; --check-cfg &apos;cfg(feature, values(&quot;https&quot;, &quot;libssh2-sys&quot;, &quot;openssl-sys&quot;, &quot;ssh&quot;, &quot;vendored&quot;, &quot;vendored-openssl&quot;, &quot;zlib-ng-compat&quot;))&apos; -C metadata=b2fcd590f057f635 -C extra-filename=-44b30acefe893a38 --out-dir /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/deps --target aarch64-unknown-linux-gnu -C linker=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/wrapper/target-rust-ccld -C strip=debuginfo -L dependency=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/deps -L dependency=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/release/deps --extern libc=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/deps/liblibc-d309c31c226ed45e.rmeta --extern libssh2_sys=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/deps/liblibssh2_sys-dc7b2c45fa3d8903.rmeta --extern libz_sys=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/deps/liblibz_sys-92731ef7bf3d4351.rmeta --extern openssl_sys=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/deps/libopenssl_sys-db7afdb3dd268427.rmeta --cap-lints allow -L /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib --remap-path-prefix=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0=/usr/src/debug/cargo-native/1.87.0 -L native=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/build/libgit2-sys-f36084b26ae028a5/out/build -l static=git2 -L native=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib -L native=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib -L native=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib --cfg libgit2_vendored --check-cfg &apos;cfg(libgit2_vendored,)&apos;`
|      Running `/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/release/build/cargo-295a69b641bf14ab/build-script-build`
|     Building [=======================&gt; ] 369/380: curl-sys, libgit2-sys
| error[E0460]: found possibly newer version of crate `std` which `libz_sys` depends on
|  --&gt; /usr/src/debug/cargo-native/1.87.0/sources/rustc-1.87.0-src/vendor/libgit2-sys-0.18.0+1.9.0/lib.rs:5:1
|   |
| 5 | extern crate libz_sys as libz;
|   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|   |
|   = note: perhaps that crate needs to be recompiled?
|   = note: the following crate versions were found:
|           crate `std`: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-1ce955af6fc35d88.rlib
|           crate `std`: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-1ce955af6fc35d88.so
|           crate `libz_sys`: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/deps/liblibz_sys-92731ef7bf3d4351.rmeta
|
| error[E0460]: found possibly newer version of crate `std` which `libnghttp2_sys` depends on
|  --&gt; /usr/src/debug/cargo-native/1.87.0/sources/rustc-1.87.0-src/vendor/curl-sys-0.4.80+curl-8.12.1/lib.rs:6:1
|   |
| 6 | extern crate libnghttp2_sys;
|   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|   |
|   = note: perhaps that crate needs to be recompiled?
|   = note: the following crate versions were found:
|           crate `std`: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-1ce955af6fc35d88.rlib
|           crate `std`: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-1ce955af6fc35d88.so
|           crate `libnghttp2_sys`: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/deps/liblibnghttp2_sys-febaa90bcdee48d0.rmeta
|
| error[E0460]: found possibly newer version of crate `std` which `libz_sys` depends on
|  --&gt; /usr/src/debug/cargo-native/1.87.0/sources/rustc-1.87.0-src/vendor/curl-sys-0.4.80+curl-8.12.1/lib.rs:8:1
|   |
| 8 | extern crate libz_sys;
|   | ^^^^^^^^^^^^^^^^^^^^^^
|   |
|   = note: perhaps that crate needs to be recompiled?
|   = note: the following crate versions were found:
|           crate `std`: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-1ce955af6fc35d88.rlib
|           crate `std`: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-1ce955af6fc35d88.so
|           crate `libz_sys`: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/deps/liblibz_sys-92731ef7bf3d4351.rmeta
|
| error[E0460]: found possibly newer version of crate `std` which `openssl_sys` depends on
|   --&gt; /usr/src/debug/cargo-native/1.87.0/sources/rustc-1.87.0-src/vendor/curl-sys-0.4.80+curl-8.12.1/lib.rs:10:1
|    |
| 10 | extern crate openssl_sys;
|    | ^^^^^^^^^^^^^^^^^^^^^^^^^
|    |
|    = note: perhaps that crate needs to be recompiled?
|    = note: the following crate versions were found:
|            crate `std`: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-1ce955af6fc35d88.rlib
|            crate `std`: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-1ce955af6fc35d88.so
|            crate `openssl_sys`: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/deps/libopenssl_sys-db7afdb3dd268427.rmeta
|
| error[E0463]: can&apos;t find crate for `libssh2_sys`
|  --&gt; /usr/src/debug/cargo-native/1.87.0/sources/rustc-1.87.0-src/vendor/libgit2-sys-0.18.0+1.9.0/lib.rs:9:5
|   |
| 9 | use libssh2_sys as libssh2;
|   |     ^^^^^^^^^^^ can&apos;t find crate
|
| error[E0460]: found possibly newer version of crate `std` which `openssl_sys` depends on
|     --&gt; /usr/src/debug/cargo-native/1.87.0/sources/rustc-1.87.0-src/vendor/libgit2-sys-0.18.0+1.9.0/lib.rs:4349:5
|      |
| 4349 |     openssl_sys::init();
|      |     ^^^^^^^^^^^
|      |
|      = note: perhaps that crate needs to be recompiled?
|      = note: the following crate versions were found:
|              crate `std`: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-1ce955af6fc35d88.rlib
|              crate `std`: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-1ce955af6fc35d88.so
|              crate `openssl_sys`: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/deps/libopenssl_sys-db7afdb3dd268427.rmeta
|
| For more information about this error, try `rustc --explain E0460`.
| error: could not compile `curl-sys` (lib) due to 3 previous errors
|
| Caused by:
|   process didn&apos;t exit successfully: `rustc --crate-name curl_sys --edition=2018 /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/sources/rustc-1.87.0-src/vendor/curl-sys-0.4.80+curl-8.12.1/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg &apos;feature=&quot;default&quot;&apos; --cfg &apos;feature=&quot;http2&quot;&apos; --cfg &apos;feature=&quot;libnghttp2-sys&quot;&apos; --cfg &apos;feature=&quot;openssl-sys&quot;&apos; --cfg &apos;feature=&quot;ssl&quot;&apos; --check-cfg &apos;cfg(docsrs,test)&apos; --check-cfg &apos;cfg(feature, values(&quot;default&quot;, &quot;force-system-lib-on-osx&quot;, &quot;http2&quot;, &quot;libnghttp2-sys&quot;, &quot;mesalink&quot;, &quot;ntlm&quot;, &quot;openssl-sys&quot;, &quot;poll_7_68_0&quot;, &quot;protocol-ftp&quot;, &quot;rustls&quot;, &quot;rustls-ffi&quot;, &quot;spnego&quot;, &quot;ssl&quot;, &quot;static-curl&quot;, &quot;static-ssl&quot;, &quot;upkeep_7_62_0&quot;, &quot;windows-static-ssl&quot;, &quot;zlib-ng-compat&quot;))&apos; -C metadata=11276d6d333fb63c -C extra-filename=-0042a7666c2d4fd6 --out-dir /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/deps --target aarch64-unknown-linux-gnu -C linker=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/wrapper/target-rust-ccld -C strip=debuginfo -L dependency=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/deps -L dependency=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/release/deps --extern libc=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/deps/liblibc-d309c31c226ed45e.rmeta --extern libnghttp2_sys=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/deps/liblibnghttp2_sys-febaa90bcdee48d0.rmeta --extern libz_sys=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/deps/liblibz_sys-92731ef7bf3d4351.rmeta --extern openssl_sys=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/deps/libopenssl_sys-db7afdb3dd268427.rmeta --cap-lints allow -L /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/lib/rustlib/aarch64-unknown-linux-gnu/lib --remap-path-prefix=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0=/usr/src/debug/cargo-native/1.87.0 -L native=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/build/curl-sys-ab857ff88f6500bf/out/build -l static=curl -L native=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/build/target/aarch64-unknown-linux-gnu/release/build/libnghttp2-sys-15ec8a96731ab08a/out/i/lib -L native=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib -L native=/home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib --cfg libcurl_vendored --cfg link_libnghttp2 --cfg link_libz --cfg link_openssl --check-cfg &apos;cfg(libcurl_vendored,link_libnghttp2,link_libz,link_openssl,)&apos;` (exit status: 1)
| warning: build failed, waiting for other jobs to finish...
|     Building [=======================&gt; ] 370/380: libgit2-sys
| Some errors have detailed explanations: E0460, E0463.
| For more information about an error, try `rustc --explain E0460`.
| warning: libgit2-sys@0.18.0+1.9.0: failed to probe system libgit2:
| warning: libgit2-sys@0.18.0+1.9.0: libgit2/src/util/hash/openssl.c: In function &apos;git_hash_sha256_init&apos;:
| warning: libgit2-sys@0.18.0+1.9.0: libgit2/src/util/hash/openssl.c:239:9: warning: &apos;SHA256_Init&apos; is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
| warning: libgit2-sys@0.18.0+1.9.0:   239 |         if (SHA256_Init(&amp;ctx-&gt;c) != 1) {
| warning: libgit2-sys@0.18.0+1.9.0:       |         ^~
| warning: libgit2-sys@0.18.0+1.9.0: In file included from libgit2/src/util/hash/openssl.h:17,
| warning: libgit2-sys@0.18.0+1.9.0:                  from libgit2/src/util/hash/openssl.c:8:
| warning: libgit2-sys@0.18.0+1.9.0: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/include/openssl/sha.h:73:27: note: declared here
| warning: libgit2-sys@0.18.0+1.9.0:    73 | OSSL_DEPRECATEDIN_3_0 int SHA256_Init(SHA256_CTX *c);
| warning: libgit2-sys@0.18.0+1.9.0:       |                           ^~~~~~~~~~~
| warning: libgit2-sys@0.18.0+1.9.0: libgit2/src/util/hash/openssl.c: In function &apos;git_hash_sha256_update&apos;:
| warning: libgit2-sys@0.18.0+1.9.0: libgit2/src/util/hash/openssl.c:251:9: warning: &apos;SHA256_Update&apos; is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
| warning: libgit2-sys@0.18.0+1.9.0:   251 |         if (SHA256_Update(&amp;ctx-&gt;c, data, len) != 1) {
| warning: libgit2-sys@0.18.0+1.9.0:       |         ^~
| warning: libgit2-sys@0.18.0+1.9.0: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/include/openssl/sha.h:74:27: note: declared here
| warning: libgit2-sys@0.18.0+1.9.0:    74 | OSSL_DEPRECATEDIN_3_0 int SHA256_Update(SHA256_CTX *c,
| warning: libgit2-sys@0.18.0+1.9.0:       |                           ^~~~~~~~~~~~~
| warning: libgit2-sys@0.18.0+1.9.0: libgit2/src/util/hash/openssl.c: In function &apos;git_hash_sha256_final&apos;:
| warning: libgit2-sys@0.18.0+1.9.0: libgit2/src/util/hash/openssl.c:263:9: warning: &apos;SHA256_Final&apos; is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
| warning: libgit2-sys@0.18.0+1.9.0:   263 |         if (SHA256_Final(out, &amp;ctx-&gt;c) != 1) {
| warning: libgit2-sys@0.18.0+1.9.0:       |         ^~
| warning: libgit2-sys@0.18.0+1.9.0: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/cargo-native/1.87.0/recipe-sysroot-native/usr/include/openssl/sha.h:76:27: note: declared here
| warning: libgit2-sys@0.18.0+1.9.0:    76 | OSSL_DEPRECATEDIN_3_0 int SHA256_Final(unsigned char *md, SHA256_CTX *c);
| warning: libgit2-sys@0.18.0+1.9.0:       |                           ^~~~~~~~~~~~
| error: could not compile `libgit2-sys` (lib) due to 3 previous errors</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102529</commentid>
    <comment_count>8</comment_count>
    <who name="Alex Kiernan">alex.kiernan</who>
    <bug_when>2025-07-30 12:37:27 +0000</bug_when>
    <thetext>Having cleaned and rebuilt cargo-native, python3-cryptography-native was the next to fail. Again clean and rebuild and it&apos;s fine:

ERROR: python3-cryptography-native-45.0.4-r0 do_compile: Execution of &apos;/home/alexk.linux/poky/build/tmp/work/aarch64-linux/python3-cryptography-native/45.0.4/temp/run.do_compile.700427&apos; failed with exit code 1
ERROR: Logfile of failure stored in: /home/alexk.linux/poky/build/tmp/work/aarch64-linux/python3-cryptography-native/45.0.4/temp/log.do_compile.700427
Log data follows:
| DEBUG: Executing shell function do_compile
| * Getting build dependencies for wheel...
| * Building wheel...
| Running `maturin pep517 build-wheel -i /home/alexk.linux/poky/build/tmp/work/aarch64-linux/python3-cryptography-native/45.0.4/recipe-sysroot-native/usr/bin/nativepython3 --compatibility off`
| 🍹 Building a mixed python/rust project
| 🔗 Found pyo3 bindings with abi3 support
| 🐍 Found CPython 3.13
| 📡 Using build options locked from pyproject.toml
|    Compiling pyo3-build-config v0.25.0
|     Building [==&gt;                        ] 10/71: pyo3-build-config(build)
|    Compiling cryptography-cffi v0.1.0 (/home/alexk.linux/poky/build/tmp/work/aarch64-linux/python3-cryptography-native/45.0.4/sources/cryptography-45.0.4/src/rust/cryptography-cffi)
|     Building [===================&gt;       ] 53/71: pyo3-build-config(build),...
|     Building [===================&gt;       ] 54/71: pyo3-build-config, crypto...
| error[E0463]: can&apos;t find crate for `once_cell`
|   --&gt; /home/alexk.linux/poky/build/tmp/work/aarch64-linux/python3-cryptography-native/45.0.4/sources/cargo_home/bitbake/pyo3-build-config-0.25.0/src/lib.rs:21:5
|    |
| 21 | use once_cell::sync::OnceCell;
|    |     ^^^^^^^^^ can&apos;t find crate
|
| For more information about this error, try `rustc --explain E0463`.
| error: could not compile `pyo3-build-config` (lib) due to 1 previous error
| warning: build failed, waiting for other jobs to finish...
|     Building [===================&gt;       ] 55/71: cryptography-cffi(build)
| 💥 maturin failed
|   Caused by: Failed to build a native library through cargo
|   Caused by: Cargo build finished with &quot;exit status: 101&quot;: `env -u CARGO &quot;cargo&quot; &quot;rustc&quot; &quot;--target&quot; &quot;aarch64-unknown-linux-gnu&quot; &quot;--message-format&quot; &quot;json-render-diagnostics&quot; &quot;--locked&quot; &quot;--manifest-path&quot; &quot;/home/alexk.linux/poky/build/tmp/work/aarch64-linux/python3-cryptography-native/45.0.4/sources/cryptography-45.0.4/src/rust/Cargo.toml&quot; &quot;--release&quot; &quot;--lib&quot;`
| Error: command [&apos;maturin&apos;, &apos;pep517&apos;, &apos;build-wheel&apos;, &apos;-i&apos;, &apos;/home/alexk.linux/poky/build/tmp/work/aarch64-linux/python3-cryptography-native/45.0.4/recipe-sysroot-native/usr/bin/nativepython3&apos;, &apos;--compatibility&apos;, &apos;off&apos;] returned non-zero exit status 1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103223</commentid>
    <comment_count>9</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2025-11-06 17:44:53 +0000</bug_when>
    <thetext>I think I fixed this with &quot;classes/cargo_common: ensure B is clean&quot; (oe-core 9d9ce457630ea7403ffe7028e3370647db0b83fa).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>