[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1018010: marked as done (libime: FTBFs on hppa architecture (with patch))



Your message dated Sat, 17 Feb 2024 05:31:43 +0200
with message-id <ZdAon+4AbkuW4Wo1@localhost>
and subject line Fixed since 1.1.0-1~exp1
has caused the Debian Bug report #1018010,
regarding libime: FTBFs on hppa architecture (with patch)
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 owner@bugs.debian.org
immediately.)


-- 
1018010: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018010
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libime
Version: 1.0.13-1
Severity: important
Tags: hppa, patch

libmime fails to build on the hppa (PA-RISC) architecture because of
the check in ./test/testtrie.cpp:
        auto nan1 = std::nanf("1");
...
        // NaN != NaN, we must use memcmp to do this.
        FCITX_ASSERT(memcmp(&nan1, &result, sizeof(float)) == 0);

This is basically the same problem as reported for the mips platform:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=973576

The problem is, that hppa and (older) mips use a different encoding for NaNs than
all other platforms. See: https://en.wikipedia.org/wiki/NaN

The attached patch is from John David Anglin <dave.anglin@bell.net>
and fixed the problem for hppa.

I assume that if the:
	#ifdef __hppa__
is changed to
	#if defined(__hppa__) || (defined(__mips__) && !defined(__LP64__))
then it probably fixes the debian bug report 973576 as well.

Thanks,
Helge
Index: libime-1.0.13/src/libime/core/datrie.h
===================================================================
--- libime-1.0.13.orig/src/libime/core/datrie.h
+++ libime-1.0.13/src/libime/core/datrie.h
@@ -34,8 +34,13 @@ struct NaN {
 };
 template <>
 struct NaN<float> {
+#ifdef __hppa__
+    static constexpr auto N1 = 0x7f800001;
+    static constexpr auto N2 = 0x7f800002;
+#else
     static constexpr auto N1 = 0x7fc00001;
     static constexpr auto N2 = 0x7fc00002;
+#endif
 };
 
 /**

--- End Message ---
--- Begin Message ---
Version: 1.1.0-1~exp1

Upstream fixed it in 1.1.0:
https://github.com/fcitx/libime/commit/40d390f1b6dfdda0734588a5c176fc41136604b9

cu
Adrian

--- End Message ---

Reply to: