Bug 1172430 - gnucash can't be built with guile-3.0
Summary: gnucash can't be built with guile-3.0
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Martin Liška
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-03 07:01 UTC by Martin Liška
Modified: 2021-03-02 14:05 UTC (History)
5 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liška 2020-06-03 07:01:27 UTC
There's an upstream bug for it:
https://bugs.gnucash.org/show_bug.cgi?id=797579

Using the CMake change (set minimal version from 2.2 to 3.0),
I experimented a bit I can workaround the upstream problem with:

diff --git a/libgnucash/app-utils/c-interface.scm b/libgnucash/app-utils/c-interface.scm
index 7e16d892b..633bcf984 100644
--- a/libgnucash/app-utils/c-interface.scm
+++ b/libgnucash/app-utils/c-interface.scm
@@ -81,7 +81,7 @@
 (define (gnc:make-string-database)
   (define string-hash (make-hash-table))
   (define (lookup key)
-    (_ (hash-ref string-hash key)))
+    (lambda() (hash-ref string-hash key)))
   (define (store key string)
     (hash-set! string-hash key string))
   (define (dispatch message . args)

and I get to the following failure:

[   49s] ../gnucash/import-export/qif-imp/assistant-qif-import.c: In function 'gnc_ui_qif_import_assistant_get_mappings':
[   49s] ../gnucash/import-export/qif-imp/assistant-qif-import.c:1425:12: error: implicit declaration of function 'SCM_LIST3'; did you mean 'SCM_LIST_H'? [-Werror=implicit-function-declaration]
[   49s]  1425 |     return SCM_LIST3(w->acct_map_info,
[   49s]       |            ^~~~~~~~~
[   49s]       |            SCM_LIST_H
[   49s] ../gnucash/import-export/qif-imp/assistant-qif-import.c:1425:12: error: returning 'int' from a function with return type 'SCM' {aka 'struct scm_unused_struct *'} makes pointer from integer without a cast [-Werror=int-conversion]
[   49s]  1425 |     return SCM_LIST3(w->acct_map_info,
[   49s]       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
[   49s]  1426 |                      w->cat_map_info,
[   49s]       |                      ~~~~~~~~~~~~~~~~
[   49s]  1427 |                      w->memo_map_info);
[   49s]       |                      ~~~~~~~~~~~~~~~~~
[   49s] ../gnucash/import-export/qif-imp/assistant-qif-import.c: In function 'gnc_ui_qif_import_convert_progress_start_cb':
[   49s] ../gnucash/import-export/qif-imp/assistant-qif-import.c:3041:24: error: implicit declaration of function 'SCM_LIST8'; did you mean 'SCM_LIST_H'? [-Werror=implicit-function-declaration]
[   49s]  3041 |                        SCM_LIST8(wind->imported_files,
[   49s]       |                        ^~~~~~~~~
[   49s]       |                        SCM_LIST_H
[   49s] ../gnucash/import-export/qif-imp/assistant-qif-import.c:3041:24: error: passing argument 2 of 'scm_apply' makes pointer from integer without a cast [-Werror=int-conversion]
[   49s]  3041 |                        SCM_LIST8(wind->imported_files,
[   49s]       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[   49s]       |                        |
[   49s]       |                        int
[   49s]  3042 |                                  wind->acct_map_info,
[   49s]       |                                  ~~~~~~~~~~~~~~~~~~~~
[   49s]  3043 |                                  wind->cat_map_info,
[   49s]       |                                  ~~~~~~~~~~~~~~~~~~~
[   49s]  3044 |                                  wind->memo_map_info,
[   49s]       |                                  ~~~~~~~~~~~~~~~~~~~~
[   49s]  3045 |                                  wind->security_hash,
[   49s]       |                                  ~~~~~~~~~~~~~~~~~~~~
[   49s]  3046 |                                  scm_from_utf8_string (currname ? currname : ""),
[   49s]       |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[   49s]  3047 |                                  wind->transaction_status,
[   49s]       |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~
[   49s]  3048 |                                  progress),
[   49s]       |                                  ~~~~~~~~~
[   49s] In file included from /usr/include/guile/3.0/libguile.h:50,
[   49s]                  from ../gnucash/import-export/qif-imp/assistant-qif-import.c:29:
[   49s] /usr/include/guile/3.0/libguile/eval.h:80:38: note: expected 'SCM' {aka 'struct scm_unused_struct *'} but argument is of type 'int'
[   49s]    80 | SCM_API SCM scm_apply (SCM proc, SCM arg1, SCM args);
[   49s]       |                                  ~~~~^~~~
[   49s] ../gnucash/import-export/qif-imp/assistant-qif-import.c: In function 'gnc_ui_qif_import_finish_cb':
[   49s] ../gnucash/import-export/qif-imp/assistant-qif-import.c:3406:29: error: implicit declaration of function 'SCM_LIST5'; did you mean 'SCM_LIST_H'? [-Werror=implicit-function-declaration]
[   49s]  3406 |                             SCM_LIST5 (wind->acct_map_info, wind->cat_map_info,
[   49s]       |                             ^~~~~~~~~
[   49s]       |                             SCM_LIST_H
[   49s] ../gnucash/import-export/qif-imp/assistant-qif-import.c:3406:29: error: passing argument 2 of 'scm_apply' makes pointer from integer without a cast [-Werror=int-conversion]
[   49s]  3406 |                             SCM_LIST5 (wind->acct_map_info, wind->cat_map_info,
[   49s]       |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[   49s]       |                             |
[   49s]       |                             int
[   49s]  3407 |                                       wind->memo_map_info, wind->security_hash,
[   49s]       |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[   49s]  3408 |                                       wind->security_prefs),
[   49s]       |                                       ~~~~~~~~~~~~~~~~~~~~~
[   49s] In file included from /usr/include/guile/3.0/libguile.h:50,
[   49s]                  from ../gnucash/import-export/qif-imp/assistant-qif-import.c:29:
Comment 1 Martin Liška 2020-06-03 07:04:10 UTC
openQA error can be seen here:
https://openqa.opensuse.org/tests/1284765#step/gnucash/16
Comment 2 Martin Liška 2020-06-03 11:02:37 UTC
I likely know how to port it...
Comment 8 Martin Liška 2021-03-02 14:05:05 UTC
It's fixed now.