Source: mangohud
Version: 0.7.2-1
Severity: important
Tags: patch
User: debian-ri...@lists.debian.org
Usertags: riscv64
X-Debbugs-Cc: debian-ri...@lists.debian.org, numbk...@gmail.com

Dear Maintainer,

Now mangohud will crash on riscv64 with below message:

```
MANGOHUD: Can't get dlopen() and dlsym()
```

But upstream has fixed the issue:
https://github.com/flightlessmango/MangoHud/commit/d0894fff38e033f5f0074efa975cfbe0069035b1

I have tested it on my local riscv64 hardware, it works.

Could you apply it when next upload? TIA.

Thanks for ksco's headups also.


-- 
Regards,
--
  Bo YU

diff -Nru mangohud-0.7.2/debian/changelog mangohud-0.7.2/debian/changelog
--- mangohud-0.7.2/debian/changelog     2024-09-03 00:31:14.000000000 +0000
+++ mangohud-0.7.2/debian/changelog     2024-10-11 13:15:11.000000000 +0000
@@ -1,3 +1,10 @@
+mangohud (0.7.2-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Backport commit from upstream to fix crash on riscv64. (Closes: #-1) 
+
+ -- Bo YU <tsu.y...@gmail.com>  Fri, 11 Oct 2024 13:15:11 +0000
+
 mangohud (0.7.2-1) unstable; urgency=medium
 
   * New upstream version 0.7.2
diff -Nru mangohud-0.7.2/debian/patches/fix-crash-on-rv64.patch 
mangohud-0.7.2/debian/patches/fix-crash-on-rv64.patch
--- mangohud-0.7.2/debian/patches/fix-crash-on-rv64.patch       1970-01-01 
00:00:00.000000000 +0000
+++ mangohud-0.7.2/debian/patches/fix-crash-on-rv64.patch       2024-10-11 
13:14:35.000000000 +0000
@@ -0,0 +1,22 @@
+From d0894fff38e033f5f0074efa975cfbe0069035b1 Mon Sep 17 00:00:00 2001
+From: Yang Liu <numbk...@gmail.com>
+Date: Thu, 5 Sep 2024 00:27:05 +0800
+Subject: [PATCH] elfhacks: d_un.d_ptr is relative on riscv glibc
+
+---
+ src/elfhacks.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/elfhacks.cpp b/src/elfhacks.cpp
+index 810a19d967..230b21676c 100644
+--- a/src/elfhacks.cpp
++++ b/src/elfhacks.cpp
+@@ -29,7 +29,7 @@
+  *  \{
+  */
+ 
+-#ifdef __GLIBC__
++#if defined(__GLIBC__) && !defined(__riscv)
+ # define ABS_ADDR(obj, ptr) (ptr)
+ #else
+ # define ABS_ADDR(obj, ptr) ((obj->addr) + (ptr))
diff -Nru mangohud-0.7.2/debian/patches/series 
mangohud-0.7.2/debian/patches/series
--- mangohud-0.7.2/debian/patches/series        2024-09-03 00:24:46.000000000 
+0000
+++ mangohud-0.7.2/debian/patches/series        2024-10-11 13:14:56.000000000 
+0000
@@ -1 +1,2 @@
 02-mangoplot_use_python3.patch
+fix-crash-on-rv64.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to