Bug#1019868: godot: ftbfs on riscv64 ("undefined reference to `__atomic_compare_exchange_1'")

Bo YU tsu.yubo at gmail.com
Thu Sep 15 07:25:30 BST 2022


Source: godot
Version: 3.2.3-stable-1
Severity: normal
Tags: ftbfs, patch
User: debian-riscv at lists.debian.org
Usertags: riscv64
X-Debbugs-Cc: debian-riscv at lists.debian.org

Dear Maintainer,

The package has a ftbfs issue due to:

usr/include/c++/11/bits/atomic_base.h:571: undefined reference to `__atomic_compare_exchange_1'


The full buildd log is here:
https://buildd.debian.org/status/fetch.php?pkg=godot&arch=riscv64&ver=3.2.3-stable-1&stamp=1635495260&raw=0

The patch attached is to fix the issue and I have tested it on my
local real riscv64 hardware.

please let me know if there are any issues.

-- 
Regards,
--
  Bo YU

-------------- next part --------------
diff -Nru godot-3.2.3-stable/debian/rules godot-3.2.3-stable/debian/rules
--- godot-3.2.3-stable/debian/rules	2020-10-28 12:56:05.000000000 +0000
+++ godot-3.2.3-stable/debian/rules	2020-10-28 12:56:05.000000000 +0000
@@ -7,6 +7,11 @@
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
 
+# Link with libatomic on riscv64
+ifeq ($(DEB_HOST_ARCH),riscv64)
+	export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic -Wl,--as-needed
+endif
+
 override_dh_clean:
 	dh_clean
 	scons -c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-games-devel/attachments/20220915/13861939/attachment-0001.sig>


More information about the Pkg-games-devel mailing list