Source: coot
Version: 1.1.09+dfsg-4
Severity: normal
Tags: patch
User: debian-loonga...@lists.debian.org
Usertags: loong64

Dear maintainers,

Compiling the coot failed for loong64 in the Debian Package Auto-Building environment.
The error log is as follows,
```
......
/usr/bin/ld: mini-rsr.o: in function `bool std::__atomic_impl::__compare_exchange<false, boost::lockfree::detail::tagged_ptr<boost::lockfree::queue<std::function<void (int)>*>::node> >(boost::lockfree::detail::tagged_ptr<boost::lockfree::queue<std::function<void (int)>*>::node>&, std::remove_volatile<boost::lockfree::detail::tagged_ptr<boost::lockfree::queue<std::function<void (int)>*>::node> >::type&, std::remove_volatile<boost::lockfree::detail::tagged_ptr<boost::lockfree::queue<std::function<void (int)>*>::node> >::type&, bool, std::memory_order, std::memory_order)': /usr/include/c++/14/bits/atomic_base.h:1002:(.text._ZN5boost8lockfree5queueIPSt8functionIFviEEJEE3popIS5_EEbRT_[_ZN5boost8lockfree5queueIPSt8functionIFviEEJEE3popIS5_EEbRT_]+0x180): undefined reference to `__atomic_compare_exchange_16'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:910: mini-rsr-bin] Error 1
.......
```
The full build log can be found at https://buildd.debian.org/status/logs.php?pkg=coot&arch=loong64.

Please consider the patch I attached.
Add -latomic to LDFLAGS on loong64.
Your opinions are welcome.

Best regards,
Dandan Zhang

diff -Nru coot-1.1.09+dfsg/debian/rules coot-1.1.09+dfsg/debian/rules
--- coot-1.1.09+dfsg/debian/rules       2025-01-22 08:11:25.000000000 +0000
+++ coot-1.1.09+dfsg/debian/rules       2025-01-22 08:13:31.000000000 +0000
@@ -15,7 +15,7 @@
 endif
 
 # Link with libatomic on riscv64 and mips64el
-ifneq (,$(filter $(DEB_HOST_ARCH),riscv64 mips64el))
+ifneq (,$(filter $(DEB_HOST_ARCH),riscv64 mips64el loong64))
        export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic 
-Wl,--as-needed
 endif
 

Reply via email to