Bug#1125016: ucx: error: implicit declaration of function 'ucs_cpu_relax' on loong64

zhangdandan zhangdandan at loongson.cn
Thu Jan 8 12:43:39 GMT 2026


Source: ucx
Version: 1.20.0+ds-3
Severity: normal
Tags: patch
User: debian-loongarch at lists.debian.org
Usertags: loong64

Dear maintainers,

Compiling the ucx 1.20 failed for loong64 in the Debian Package 
Auto-Building environment.
The error log is as follows,
```
In file included from 
/build/reproducible-path/ucx-1.20.0+ds/src/ucs/memory/rcache_int.h:16,
                  from debug/debug.c:15:
/build/reproducible-path/ucx-1.20.0+ds/src/ucs/type/rwlock.h: In 
function 'ucs_rw_spinlock_read_lock':
/build/reproducible-path/ucx-1.20.0+ds/src/ucs/type/rwlock.h:64:13: 
error: implicit declaration of function 'ucs_cpu_relax' 
[-Wimplicit-function-declaration]
    64 |             ucs_cpu_relax();
       |             ^~~~~~~~~~~~~
/build/reproducible-path/ucx-1.20.0+ds/src/ucs/type/rwlock.h:64:13: 
error: nested extern declaration of 'ucs_cpu_relax' [-Werror=nested-externs]
cc1: all warnings being treated as errors
make[4]: *** [Makefile:1815: debug/libucs_la-debug.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
```

Please consider the patch attached.
Based attached patch, I have built ucx 1.20.0+ds-3 successfully on loong64.
```
dpkg-deb: building package 'libucx-dev' in 
'../libucx-dev_1.20.0+ds-3+loong64_loong64.deb'.
dpkg-deb: building package 'ucx-utils-dbgsym' in 
'../ucx-utils-dbgsym_1.20.0+ds-3+loong64_loong64.deb'.
dpkg-deb: building package 'ucx-utils' in 
'../ucx-utils_1.20.0+ds-3+loong64_loong64.deb'.
dpkg-deb: building package 'libucx0' in 
'../libucx0_1.20.0+ds-3+loong64_loong64.deb'.
dpkg-deb: building package 'libucx0-dbgsym' in 
'../libucx0-dbgsym_1.20.0+ds-3+loong64_loong64.deb'.
  dpkg-genbuildinfo -O../ucx_1.20.0+ds-3+loong64_loong64.buildinfo
  dpkg-genchanges -O../ucx_1.20.0+ds-3+loong64_loong64.changes
```

Best regards,
Dandan Zhang

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ucx-Fix-implicit-declaration-of-function-ucs_cpu_relax-on-loong64.patch
Type: text/x-patch
Size: 586 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20260108/5b34402a/attachment.bin>


More information about the debian-science-maintainers mailing list