Your message dated Wed, 29 Jun 2022 13:35:53 +0000
with message-id <[email protected]>
and subject line Bug#1013922: fixed in libemf 1.0.13-5
has caused the Debian Bug report #1013922,
regarding libemf: ftbfs on riscv64(libEMF/wine/winnt.h:73:3: #error Unknown CPU 
architecture!)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1013922: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1013922
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: libemf
Version: 1.0.13-4
Severity: minor
Tags: ftbfs, patch
User: [email protected]
Usertags: riscv64
X-Debbugs-Cc: [email protected]

Dear Maintainer,

The libemf has a ftbfs issue on riscv64:

```
...
In file included from ../include/libEMF/wine/windef.h:16,
                 from ../include/libEMF/emf.h:27,
                 from libemf.h:33,
                 from libemf.cpp:24:
../include/libEMF/wine/winnt.h:73:3: error: #error Unknown CPU architecture!
   73 | # error Unknown CPU architecture!
      |   ^~~~~
In file included from ../include/libEMF/wine/windef.h:16,
                 from ../include/libEMF/emf.h:27,
                 from libemf.h:33,
                 from libemf.cpp:24:
../include/libEMF/wine/winnt.h:1586:2: error: #error You need to define a 
CONTEXT for your CPU
 1586 | #error You need to define a CONTEXT for your CPU
...
```

The full buildd log is here:
https://buildd.debian.org/status/fetch.php?pkg=libemf&arch=riscv64&ver=1.0.13-4&stamp=1655992161&raw=0

The patch attached is try to fix the issue and I successfully compiled the 
package on my locally real risv64 machines(unmatched board). But we may
still need to verify the content of the riscv64 CONTEXT in the patch.
Please let me know if there are any issue here. 

Bo
-- 
Best Regards,

add support for riscv64 arch

Original reference e2k code for supporting riscv64 arch

Bo YU <[email protected]>
--- a/include/libEMF/wine/winnt.h
+++ b/include/libEMF/wine/winnt.h
@@ -69,6 +69,10 @@
 # define  WORDS_BIGENDIAN
 # define  BITFIELDS_BIGENDIAN
 # undef  ALLOW_UNALIGNED_ACCESS
+#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
+# undef  WORDS_BIGENDIAN
+# undef  BITFIELDS_BIGENDIAN
+# undef  ALLOW_UNALIGNED_ACCESS
 #elif !defined(RC_INVOKED)
 # error Unknown CPU architecture!
 #endif
@@ -1582,6 +1586,77 @@

 #endif /* __e2k__ */

+#ifdef __riscv && __riscv_xlen==64
+/*
+ * FIXME:
+ *
+ * There is not yet an official CONTEXT structure defined for the
+ * riscv64 architecture (64-bit LE), so I just made one up.
+ *
+ */
+
+#define CONTEXT_RISCV64             0x4000000
+#define CONTEXT_CONTROL         (CONTEXT_RISCV64 | 0x00000001)
+#define CONTEXT_INTEGER         (CONTEXT_RISCV64 | 0x00000002)
+#define CONTEXT_FLOATING_POINT  (CONTEXT_RISCV64 | 0x00000004)
+#define CONTEXT_DEBUG_REGISTERS (CONTEXT_RISCV64 | 0x00000008)
+
+#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER)
+
+#define EXCEPTION_READ_FAULT    0
+#define EXCEPTION_WRITE_FAULT   1
+#define EXCEPTION_EXECUTE_FAULT 8
+
+typedef struct _CONTEXT {
+    ULONG ContextFlags;
+
+    /* This section is specified/returned if the ContextFlags word contains
+       the flag CONTEXT_INTEGER. */
+    ULONGLONG X0;
+    ULONGLONG X1;
+    ULONGLONG X2;
+    ULONGLONG X3;
+    ULONGLONG X4;
+    ULONGLONG X5;
+    ULONGLONG X6;
+    ULONGLONG X7;
+    ULONGLONG X8;
+    ULONGLONG X9;
+    ULONGLONG X10;
+    ULONGLONG X11;
+    ULONGLONG X12;
+    ULONGLONG X13;
+    ULONGLONG X14;
+    ULONGLONG X15;
+    ULONGLONG X16;
+    ULONGLONG X17;
+    ULONGLONG X18;
+    ULONGLONG X19;
+    ULONGLONG X20;
+    ULONGLONG X21;
+    ULONGLONG X22;
+    ULONGLONG X23;
+    ULONGLONG X24;
+    ULONGLONG X25;
+    ULONGLONG X26;
+    ULONGLONG X27;
+    ULONGLONG X28;
+    ULONGLONG X29;
+    ULONGLONG X30;
+    ULONGLONG X31;
+
+    /* These are selected by CONTEXT_CONTROL */
+    ULONGLONG Sp;
+    ULONGLONG Pc;
+    ULONGLONG PState;
+
+    /* These are selected by CONTEXT_FLOATING_POINT */
+    /* FIXME */
+} CONTEXT;
+
+#endif /* __riscv64__ */
+
+
 #if !defined(CONTEXT_FULL) && !defined(RC_INVOKED)
 #error You need to define a CONTEXT for your CPU
 #endif

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: libemf
Source-Version: 1.0.13-5
Done: Barak A. Pearlmutter <[email protected]>

We believe that the bug you reported is fixed in the latest version of
libemf, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Barak A. Pearlmutter <[email protected]> (supplier of updated libemf package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 29 Jun 2022 14:15:38 +0100
Source: libemf
Architecture: source
Version: 1.0.13-5
Distribution: unstable
Urgency: medium
Maintainer: Barak A. Pearlmutter <[email protected]>
Changed-By: Barak A. Pearlmutter <[email protected]>
Closes: 1013922
Changes:
 libemf (1.0.13-5) unstable; urgency=medium
 .
   * Patch to actually support riscv64 (closes: #1013922) kindly provided
     by Bo YU <[email protected]>
Checksums-Sha1:
 6b3e63cd274e7c779d7612a167e5e42e85725822 2528 libemf_1.0.13-5.dsc
 705c99e317c57d001e6129380c9a93342b3e64b1 31124 libemf_1.0.13-5.debian.tar.xz
 cd66ecb3c35f675c525af4ff8dd9f7c13994265f 10491 libemf_1.0.13-5_source.buildinfo
Checksums-Sha256:
 0df81bc22eaded446f577df95e3d462db72faf995b62066cc292e89169123cdd 2528 
libemf_1.0.13-5.dsc
 8e2d9159e2e6a018b8534cef5aaa98c1f8345dce7e80fb3c65f2a2d56faa88db 31124 
libemf_1.0.13-5.debian.tar.xz
 a88babc4e5d94b7431c5a123ece4c57e14a3ab9d81bc2d88e83c0806e120ae35 10491 
libemf_1.0.13-5_source.buildinfo
Files:
 d6419c171e53eba8586823c306073fa8 2528 libs optional libemf_1.0.13-5.dsc
 cf70d4b3436eac2781d5de9ca987ab69 31124 libs optional 
libemf_1.0.13-5.debian.tar.xz
 1f40532878aebb339bf00e9aa94ca328 10491 libs optional 
libemf_1.0.13-5_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJDBAEBCgAtFiEE+nZaz+JE7Dn2AefCmesepNIze4gFAmK8UZcPHGJhcEBkZWJp
YW4ub3JnAAoJEJnrHqTSM3uIrjwP/jERRLu/5QuOvhYjDy0rnOjgHooKH3uLWu+L
P6E743znq0gJbQx1DZ0JEaTh7InTf/oZWEK7ThD1NuOwj54Znm2HSH6rZidB7FJ1
8SqM9LEVOn6RnDbfGyKkIejc1Gq+oPd/gdNYSysSYkX7p2hDk0s2vsVzkB45YI7W
nlVZ1024pzGGk/xjl5SIKeAGdSqWy0R4PU9iQHM4+jaC4SAeSartIMxi3Z9jA8C3
MnOtN9Ya3+v73gdHdxL/NPEihBjEaAX/M6nQMzcW9NsQzcdIAULkdMRd3V1pTSYS
k1RGNwUshvqSeApngzkMsprwYwn4BhUbV7GsMc+XQtnad/ouZLBppn50dmZe3vKu
ep4fMYEicpiyk+d+qSCpqN4UHkNvFmHSxKpsXTZ5tgtgbQ/sketdBjXMph5hDArp
+uLpIg6nlhjBxK884VIZzaJacj3ie2W4H/RCjzIDH/zaKWjn3XssQsqts+hqrFAX
NWPitjMAEvOQRgSvISpvZ/7I1LMA/GbROjMhOJDjvPfWOl/3HlZy7OMad9/o1Lw6
HGh+fL8FrRooxgxvLvHMJrszGC43eGTlK87potsym4XBr/daSuTZq2heXO0Nl3uM
yIBZVl1e5ixVPT7nt2kZ0K/xDR8MY/I2YybkCq3/Vz4JpFA5aM4sf4PV0UMeYNPU
tFm9DHrY
=XX4H
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to