Bug#1119717: mame: FTBFS: Fix relocation R_LARCH_B26 overflow for loong64
zhangdandan
zhangdandan at loongson.cn
Fri Oct 31 08:13:36 GMT 2025
Source: mame
Version: 0.281+dfsg1-1
Severity: normal
Tags: FTBFS patch
User: debian-loongarch at lists.debian.org
Usertags: loong64
Dear maintainers,
Compiling the mame failed for loong64 in the Debian Package
Auto-Building environment.
The error log is as follows,
```
......
/usr/bin/ld: ../../../../../scripts/mame_mame/libaccess.a(acvirus.o):
relocation R_LARCH_B26 overflow 0xca3b080
Dump relocate record:
stack top relocation name symbol
at
/usr/lib/gcc/loongarch64-linux-gnu/15/../../../loongarch64-linux-gnu/Scrt1.o(.text+0x0):
...
0x0000000000000000 R_LARCH_NONE `<nameless>' + 4(0x4)
......
```
The full build log can be found at
https://buildd.debian.org/status/fetch.php?pkg=mame&arch=loong64&ver=0.281%2Bdfsg1-1&stamp=1759236774&raw=0.
Please consider the patch I attached.
Based on attached patch, I have built mame successfully on locally.
```
......
dpkg-deb: building package 'mame-tools-dbgsym' in
'../mame-tools-dbgsym_0.281+dfsg1-1+loong64_loong64.deb'.
dpkg-deb: building package 'mame-doc' in
'../mame-doc_0.281+dfsg1-1+loong64_all.deb'.
dpkg-genbuildinfo -O../mame_0.281+dfsg1-1+loong64_loong64.buildinfo
dpkg-genchanges -O../mame_0.281+dfsg1-1+loong64_loong64.changes
dpkg-genchanges: info: not including original source code in upload
dpkg-source --after-build .
```
Your opinions are welcome.
Best regards,
Dandan Zhang
-------------- next part --------------
diff -Nru mame-0.281+dfsg1/debian/changelog mame-0.281+dfsg1/debian/changelog
--- mame-0.281+dfsg1/debian/changelog 2025-09-29 17:28:06.000000000 +0000
+++ mame-0.281+dfsg1/debian/changelog 2025-10-30 08:49:18.000000000 +0000
@@ -1,3 +1,9 @@
+mame (0.281+dfsg1-1+loong64) unstable; urgency=medium
+
+ * Fix relocation R_LARCH_B26 overflow for loong64.
+
+ -- Dandan Zhang <zhangdandan at loongson.cn> Thu, 30 Oct 2025 16:49:18 +0800
+
mame (0.281+dfsg1-1) unstable; urgency=medium
[ Cesare Falco ]
diff -Nru mame-0.281+dfsg1/debian/rules mame-0.281+dfsg1/debian/rules
--- mame-0.281+dfsg1/debian/rules 2025-09-29 17:28:06.000000000 +0000
+++ mame-0.281+dfsg1/debian/rules 2025-10-30 08:49:18.000000000 +0000
@@ -109,6 +109,8 @@
ifeq ($(DEB_HOST_ARCH),loong64)
DEB_OPTS += \
PTR64=1
+export DEB_CFLAGS_MAINT_APPEND += -mcmodel=medium
+export DEB_CXXFLAGS_MAINT_APPEND += -mcmodel=medium
endif
ifeq ($(DEB_HOST_ARCH),m68k)
More information about the Pkg-games-devel
mailing list