Source: rustc
Version: 1.71.1+dfsg1-2
Severity: normal
Tags: patch
User: debian-loonga...@lists.debian.org
Usertags: loong64

Dear maintainers,

Compiling rustc 1.71 based on llvm-toolchain-16 failed in the Debian loong64 Package Auto-Building environment.
The error log is as follows,
```
......
error: could not find native static library `/usr/lib/llvm-16/lib/clang/16/lib/linux/libclang_rt.profile-loongarch64.a`, perhaps an -L flag is missing?
Did not run successfully: exit status: 1
......
```
The full build log can be found at https://buildd.debian.org/status/logs.php?pkg=rustc&ver=1.71.1%2Bdfsg1-2&arch=loong64. Regarding the missing libclang_rt.profile-loongarch64.a file in the libclang-rt-16-dev package, our llvm team will add patches and commit bug for Debian llvm-toolchain-16.

Please note that Debian llvm support for loongarch is complete as of llvm-toolchain-17, for example,
```
root@localhost:/home# dpkg -c libclang-rt-16-dev_1%3a16.0.6-27_loong64.deb |grep libclang_rt.profile-loongarch64.a
root@localhost:/home#
root@localhost:/home# dpkg -c libclang-rt-17-dev_1%3a17.0.6-12_loong64.deb |grep libclang_rt.profile-loongarch64.a -rw-r--r-- root/root    146744 2024-05-04 05:30 ./usr/lib/llvm-17/lib/clang/17/lib/linux/libclang_rt.profile-loongarch64.a root@localhost:/home# dpkg -c libclang-rt-18-dev_1%3a18.1.6-1_loong64.deb |grep libclang_rt.profile-loongarch64.a -rw-r--r-- root/root    150362 2024-05-19 07:27 ./usr/lib/llvm-18/lib/clang/18/lib/linux/libclang_rt.profile-loongarch64.a
```

Compiling rustc 1.71 based on llvm-toolchain-17 failed in our local loong64 ENV. The error message is related to the number of failed test cases, for example,
```
......
Summary: exit code 1, counted 14 tests failed.
10 maximum allowed. Aborting the build.
......
```
We need to add loong64 to the FAILURES_ALLOWED lists in d/rules.
Please consider the patch (Signed-off-by: wang...@loongson.cn) I attached.
Your opinions are welcome.

Thanks,
Dandan Zhang

diff --git a/rules b/rules
index c7b0541..d9a423a 100755
--- a/rules
+++ b/rules
@@ -335,7 +335,7 @@ endif
 ifneq (,$(filter $(DEB_BUILD_ARCH), ppc64 s390x))
   FAILURES_ALLOWED = 40
 endif
-ifneq (,$(filter $(DEB_BUILD_ARCH), powerpc powerpcspe riscv64 sparc64 x32))
+ifneq (,$(filter $(DEB_BUILD_ARCH), powerpc powerpcspe riscv64 sparc64 x32 loong64))
   FAILURES_ALLOWED = 180
 endif
 FAILED_TESTS = grep "FAILED\|^command did not execute successfully" $(TEST_LOG) | grep -v '^test result: FAILED' | grep -v 'FAILED (allowed)'

Reply via email to