GnuCash
Contact   Instructions
Bug 796899 - FTBFS on [mips]: segfault; test-backend-dbi; endianness
Summary: FTBFS on [mips]: segfault; test-backend-dbi; endianness
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Build system (show other bugs)
Version: 3.3
Hardware: PC Linux
: Normal normal
Target Milestone: ---
Assignee: core
QA Contact: core
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-07 21:32 EDT by Dmitry Smirnov
Modified: 2021-01-28 21:30 EST (History)
5 users (show)

See Also:


Attachments

Description Dmitry Smirnov 2018-10-07 21:32:18 EDT
As reported in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906609
GnuCash FTBFS on mips due to segfault related to endianness.
Debian bug report contains extensive analysis by Bernhard Übelacker and proposed Debian-specific patch based on passing `-DWORDS_BIGENDIAN` and the following:

~~~~
--- a/common/config.h.cmake.in
+++ b/common/config.h.cmake.in
@@ -355,9 +355,9 @@
 #  define WORDS_BIGENDIAN 1
 # endif
 #else
 # ifndef WORDS_BIGENDIAN
-#cmakedefine WORDS_BIGENDIAN
+#cmakedefine WORDS_BIGENDIAN 1
 # endif
 #endif

 /* Define to 1 if on MINIX. */
~~~~

That seems to help (though perhaps needs to be incorporated into CMake somehow) but then "test-backend-dbi" failed on mips:

  https://buildd.debian.org/status/fetch.php?pkg=gnucash&arch=mips&ver=1%3A3.3-2&stamp=1538887923&raw=0
Comment 1 John Ralls 2018-10-07 23:12:32 EDT
We got halfway there with https://github.com/Gnucash/gnucash/commit/766dc9b2d5cee4810a2d3a3b85091e1934f3d19f#diff-af3b638bc2a3e6c650974192a53c7291
but left off the config.h part.
Comment 2 John Ralls 2018-10-29 17:38:19 EDT
I've pushed the fix to config.h.cmake.in.

I'm not sure what to make of the failure in test-backend-dbi. The warning is nonsensical: 
(/<<PKGBUILDDIR>>/.build/bin/test-backend-dbi:31612): GLib-GObject-WARNING **: 04:46:36.835: value "0" of type 'gint' is invalid or out of range for property 'fraction' of type 'gint'

How can 0 be invalid or out of range for int? It's the one number that reads the same for both big and little endianness.

Finding what's actually wrong will require someone to go at it with a debugger, I'm afraid.
Comment 3 John Ralls 2021-01-28 21:30:33 EST
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906609 is resolved so I guess this is too.

Note You need to log in before you can comment on or make changes to this bug.