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

Petter Reinholdtsen pere at hungry.com
Tue May 30 07:32:05 BST 2023


[Petter Reinholdtsen]
> The armel architecture need -latomic too.  Might be others as well.  I
> am testing a variant of this patch now to verify it work on armel too.

Here is a patch tested on armel to fix the armel build.  I tried
modifying the scons buidl to automaticalliy add this on armel, or when
the build of a simple code fragment require it (like autoconf can do),
but was unable to figure out how and where to modify the scons build
files to get it to work.

diff --git a/debian/rules b/debian/rules
index f46330e3..51ceee03 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,11 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
 
+# Link with libatomic on archs where it is needed.
+ifeq ($(DEB_HOST_ARCH),$(filter $(GCC_MINOR),armel riscv64))
+       export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic -Wl,--as-needed
+endif
+
 override_dh_clean:
        dh_clean
        scons -c
-- 
Happy hacking
Petter Reinholdtsen



More information about the Pkg-games-devel mailing list