[Pkg-rust-maintainers] Bug#1098921: rust-uucore: Please add loongarch64 support

zhangdandan zhangdandan at loongson.cn
Wed Feb 26 03:17:51 GMT 2025


Source: rust-uucore
Version: 0.0.23-3
Severity: normal
Tags: patch
User: debian-loongarch at lists.debian.org
Usertags: loong64

Hi maintainers,

The rust-uucore package was built on loong64.
But I found that there is a lack of loong64 support in 
src/lib/features/fs.rs file.

If the support for loong64 is missing in rust-uucore source package, 
packages that depend on librust-uucore-dev:loong64 will fail to build, 
for example,
Compiling the rust-findutils 0.7.0-3 failed for loong64 in the Debian 
Package Auto-Building environment.
Build failed 5 times.
The build error log is as follows,
```
error[E0308]: mismatched types
    --> 
/usr/share/cargo/registry/uucore-0.0.23/src/lib/features/fs.rs:124:16
     |
111 |     pub fn number_of_links(&self) -> u64 {
     |                                      --- expected `u64` because 
of return type
...
124 |         return self.0.st_nlink;
     |                ^^^^^^^^^^^^^^^ expected `u64`, found `u32`
     |
help: you can convert a `u32` to a `u64`
     |
124 |         return self.0.st_nlink.into();
     |                               +++++++
...
```
The full build log can be found at 
https://buildd.debian.org/status/fetch.php?pkg=rust-findutils&arch=loong64&ver=0.7.0-3&stamp=1740507372&raw=0.

Please consider the patch I attached for rust-uucore source package.
I have built rust-uucore 0.0.23-3+loong64 package successfully on my 
local ENV.
```
    dh_builddeb -O--buildsystem=cargo
dpkg-deb: building package 'librust-uucore-dev' in 
'../librust-uucore-dev_0.0.23-3+loong64_loong64.deb'.
  dpkg-genbuildinfo -O../rust-uucore_0.0.23-3+loong64_loong64.buildinfo
  dpkg-genchanges -O../rust-uucore_0.0.23-3+loong64_loong64.changes
```
And based on librust-uucore-dev_0.0.23-3+loong64, I have built 
rust-findutils successfully on my local ENV.
Could you add loong64 support in the next upload?

Best regrads,
Dandan Zhang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rust-uucore-add-loongarch64-support.patch
Type: text/x-patch
Size: 900 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-rust-maintainers/attachments/20250226/d0dfacbf/attachment.bin>


More information about the Pkg-rust-maintainers mailing list