Bug#1104825: mame: FTBFS on riscv64: g++: error: unrecognized command-line option ‘'-m64'

Bo YU vimer at debian.org
Wed May 7 02:45:14 BST 2025


Source: mame
Version: 0.277+dfsg.1-3
Severity: serious
Tags: ftbfs patch
User: debian-riscv at lists.debian.org
Usertags: riscv64
X-Debbugs-Cc: debian-riscv at lists.debian.org

Dear Maintainer,

now mame has one ftbfs issue since 0.277+dfsg.1-1 due to:

```

Precompiling src/emu/emu.h...
g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/mame-0.277+dfsg.1=. -fstack-protector-strong -Wformat -Werror=format-security -g0 -O2 -Wno-error=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/mame-0.277+dfsg.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -MMD -MP -MP -DNDEBUG -DCRLF=2 -DLSB_FIRST -DXMD_H -DFLAC__NO_DLL -DLUA_COMPAT_ALL -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -DPTR64=1 -I"../../../../../src/osd" -I"../../../../../src/emu" -I"../../../../../src/lib/util"  -m64 -std=c++17 -pipe -O1 -fno-strict-aliasing -Wno-unknown-pragmas -Wall -Wcast-align -Wformat-security -Wundef -Wwrite-strings -Wno-conversion -Wno-sign-compare -Wno-error=deprecated-declarations -Wno-error=unused-result -Wno-error=array-bounds -Wno-error=attributes -Wno-error=stringop-truncation -Wno-stringop-overflow -Wno-nonnull -Wno-stringop-overread -Wno-error=maybe-uninitialized -Wno-error=uninitialized -m64 -std=c++17 -Woverloaded-virtual -Wvla -Wimplicit-fallthrough -Wno-xor-used-as-pow -Wsuggest-override -x c++-header -DNDEBUG -DCRLF=2 -DLSB_FIRST -DXMD_H -DFLAC__NO_DLL -DLUA_COMPAT_ALL -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -DPTR64=1 -I"../../../../../src/osd" -I"../../../../../src/emu" -I"../../../../../src/lib/util" -o "../../../../linux_gcc/obj/x64/Release/emu.h.gch" -c "../../../../../src/emu/emu.h"
g++: error: unrecognized command-line option ‘-m64’
g++: error: unrecognized command-line option ‘-m64’
make[4]: *** [precompile.make:320: ../../../../linux_gcc/obj/x64/Release/emu.h.gch] Error 1
```

To see the full buildd log:
https://buildd.debian.org/status/fetch.php?pkg=mame&arch=riscv64&ver=0.277%2Bdfsg.1-3&stamp=1746406180&raw=0

It seems it need DRC_C_BACKEND on riscv64 currently and I have tested
it on my localy Unmatched board.

BTW, I have reverted the commit[0] on risv64 because it did not fix the FTBFS
on riscv64, but I am not confident about this, so please review it
carefully and let me know any issues.

[0]: https://salsa.debian.org/games-team/mame/-/commit/d15e23dcba86be55c46352434b9c097b722cce87

-- 
Regards,
--
  Bo YU

-------------- next part --------------
diff -Nru mame-0.277+dfsg.1/debian/changelog mame-0.277+dfsg.1/debian/changelog
--- mame-0.277+dfsg.1/debian/changelog	2025-05-04 20:28:24.000000000 +0000
+++ mame-0.277+dfsg.1/debian/changelog	2025-05-06 01:18:41.000000000 +0000
@@ -1,3 +1,10 @@
+mame (0.277+dfsg.1-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix fbtfs issue on riscv64. (Closes: #-1) 
+
+ -- Bo YU <vimer at debian.org>  Tue, 06 May 2025 01:18:41 +0000
+
 mame (0.277+dfsg.1-3) unstable; urgency=medium
 
   * Restore riscv64 part of a patch that was accidentally dropped during
diff -Nru mame-0.277+dfsg.1/debian/patches/ftbfs_alpha_ia64.patch mame-0.277+dfsg.1/debian/patches/ftbfs_alpha_ia64.patch
--- mame-0.277+dfsg.1/debian/patches/ftbfs_alpha_ia64.patch	2025-05-04 20:28:24.000000000 +0000
+++ mame-0.277+dfsg.1/debian/patches/ftbfs_alpha_ia64.patch	2025-05-06 01:18:41.000000000 +0000
@@ -3,11 +3,9 @@
 Forwarded: no
 Last-Update: 2025-03-04
 
-Index: mame/makefile
-===================================================================
---- mame.orig/makefile
-+++ mame/makefile
-@@ -193,6 +193,14 @@ else ifneq ($(filter arm%,$(UNAME_M)),)
+--- a/makefile
++++ b/makefile
+@@ -193,6 +193,14 @@
  PLATFORM := arm
  else ifneq ($(filter arm%,$(UNAME_P)),)
  PLATFORM := arm
@@ -22,7 +20,7 @@
  else ifneq ($(filter powerpc,$(UNAME_P)),)
  PLATFORM := powerpc
  else ifneq ($(filter riscv64%,$(UNAME_M)),)
-@@ -409,6 +417,27 @@ else
+@@ -409,6 +417,33 @@
  BIGENDIAN := 1
  endif
  endif
@@ -47,14 +45,18 @@
 +	FORCE_DRC_C_BACKEND := 1
 +endif
 +endif
++ifeq ($(findstring riscv64,$(UNAME)),riscv64)
++ARCHITECTURE :=
++ifndef FORCE_DRC_C_BACKEND
++	FORCE_DRC_C_BACKEND := 1
++endif
++endif
  ifneq (,$(findstring s390x,$(UNAME)))
  BIGENDIAN := 1
  endif
-Index: mame/scripts/genie.lua
-===================================================================
---- mame.orig/scripts/genie.lua
-+++ mame/scripts/genie.lua
-@@ -1089,6 +1089,18 @@ if (_OPTIONS["PLATFORM"]=="arm64") then
+--- a/scripts/genie.lua
++++ b/scripts/genie.lua
+@@ -1089,6 +1089,12 @@
  	}
  end
  
@@ -62,12 +64,6 @@
 +	defines {
 +		"PTR64=1",
 +	}
-+end
-+
-+if (_OPTIONS["PLATFORM"]=="riscv64") then
-+	defines {
-+		"PTR64=1",
-+	}
 +end
 +
  local subdir
-------------- 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/20250507/f9a40d5a/attachment.sig>


More information about the Pkg-games-devel mailing list