After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 793122 - 2.7.3: ninja build fails
2.7.3: ninja build fails
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Build system
2.7.x
Other NetBSD
: Normal normal
: ---
Assigned To: gnucash-core-maint
gnucash-core-maint
Depends on:
Blocks:
 
 
Reported: 2018-02-02 14:44 UTC by Thomas Klausner
Modified: 2018-06-30 00:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Klausner 2018-02-02 14:44:16 UTC
While reporting an installation problem with cmake + make (where the build seems to work fine), it was suggested I try building with ninja.

However, the build with ninja fails for me. That is with guile-2.2.3, ninja-1.8.2, and cmake-3.10.2.

The error is:

[758/888] Generating ../../../lib/gnucash/scm/ccache/2.2/qif-import/qif-import.go
FAILED: lib/gnucash/scm/ccache/2.2/qif-import/qif-import.go
cd /scratch/wip/gnucash-devel/work/gnucash-2.7.3/gnucash/import-export/qif-imp && /usr/pkg/bin/cmake -E env LD_LIBRARY_PATH=/scratch/wip/gnucash-devel/work/gnucash-2.7.3/lib:/scratch/wip/gnucash-devel/work/gnucash-2.7.3/lib/gnucash: GNC_UNINSTALLED=YES GNC_BUILDDIR=/scratch/wip/gnucash-devel/work/gnucash-2.7.3 GUILE_LOAD_PATH=/scratch/wip/gnucash-devel/work/gnucash-2.7.3/gnucash/import-export/qif-imp GUILE_LOAD_COMPILED_PATH=/scratch/wip/gnucash-devel/work/gnucash-2.7.3/lib/gnucash/scm/ccache/2.2 GNC_MODULE_PATH=/scratch/wip/gnucash-devel/work/gnucash-2.7.3/lib:/scratch/wip/gnucash-devel/work/gnucash-2.7.3/lib/gnucash: /scratch/wip/gnucash-devel/work/.buildlink/bin/guile -e '(@@ (guild) main)' -s /scratch/wip/gnucash-devel/work/.buildlink/bin/guild compile -o /scratch/wip/gnucash-devel/work/gnucash-2.7.3/lib/gnucash/scm/ccache/2.2/qif-import/qif-import.go /scratch/wip/gnucash-devel/work/gnucash-2.7.3/gnucash/import-export/qif-imp/qif-import.scm
Backtrace:
In scripts/compile.scm:
   251:26 19 (_ _)
In system/base/target.scm:
     57:6 18 (with-target _ _)
In system/base/compile.scm:
    152:6 17 (compile-file _ #:output-file _ #:from _ #:to _ #:env _ ?)
     43:4 16 (call-once _)
In ice-9/boot-9.scm:
    841:4 15 (with-throw-handler _ _ _)
In system/base/compile.scm:
    59:11 14 (_)
   155:11 13 (_ #<closed: file 7da8c0>)
   235:18 12 (read-and-compile #<input: qif-import.scm 5> #:from _ # ?)
   183:32 11 (compile-fold (#<procedure compile-tree-il (x e opts)>) ?)
In ice-9/boot-9.scm:
   2312:4 10 (save-module-excursion #<procedure 6eeb20 at language/s?>)
In language/scheme/compile-tree-il.scm:
    31:15  9 (_)
In ice-9/psyntax.scm:
  1235:36  8 (expand-top-sequence ((use-modules (gnucash #))) _ _ #f ?)
  1182:24  7 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?)
   285:10  6 (parse _ (("placeholder" placeholder)) (()) _ c&e (# #) #)
In ice-9/boot-9.scm:
  3365:20  5 (process-use-modules _)
   222:17  4 (map1 (((gnucash app-utils))))
  3366:31  3 (_ ((gnucash app-utils)))
   2791:6  2 (resolve-interface _ #:select _ #:hide _ #:prefix _ # _ ?)
In unknown file:
           1 (scm-error misc-error #f "~A ~S" ("no code for modu?" ?) ?)
In ice-9/boot-9.scm:
   752:25  0 (dispatch-exception _ _ _)
  
ice-9/boot-9.scm:752:25: In procedure dispatch-exception:
no code for module (gnucash app-utils)
[759/888] Generating ../../../lib/gnucash/scm/ccache/2.2/gnucash/import-export/qif-import.go
FAILED: lib/gnucash/scm/ccache/2.2/gnucash/import-export/qif-import.go
cd /scratch/wip/gnucash-devel/work/gnucash-2.7.3/gnucash/import-export/qif-imp && /usr/pkg/bin/cmake -E env LD_LIBRARY_PATH=/scratch/wip/gnucash-devel/work/gnucash-2.7.3/lib:/scratch/wip/gnucash-devel/work/gnucash-2.7.3/lib/gnucash: GNC_UNINSTALLED=YES GNC_BUILDDIR=/scratch/wip/gnucash-devel/work/gnucash-2.7.3 GUILE_LOAD_PATH=/scratch/wip/gnucash-devel/work/gnucash-2.7.3/gnucash/import-export/qif-imp GUILE_LOAD_COMPILED_PATH=/scratch/wip/gnucash-devel/work/gnucash-2.7.3/lib/gnucash/scm/ccache/2.2 GNC_MODULE_PATH=/scratch/wip/gnucash-devel/work/gnucash-2.7.3/lib:/scratch/wip/gnucash-devel/work/gnucash-2.7.3/lib/gnucash: /scratch/wip/gnucash-devel/work/.buildlink/bin/guile -e '(@@ (guild) main)' -s /scratch/wip/gnucash-devel/work/.buildlink/bin/guild compile -o /scratch/wip/gnucash-devel/work/gnucash-2.7.3/lib/gnucash/scm/ccache/2.2/gnucash/import-export/qif-import.go /scratch/wip/gnucash-devel/work/gnucash-2.7.3/gnucash/import-export/qif-imp/qif-import.scm
Backtrace:
In scripts/compile.scm:
   251:26 19 (_ _)
In system/base/target.scm:
     57:6 18 (with-target _ _)
In system/base/compile.scm:
    152:6 17 (compile-file _ #:output-file _ #:from _ #:to _ #:env _ ?)
     43:4 16 (call-once _)
In ice-9/boot-9.scm:
    841:4 15 (with-throw-handler _ _ _)
In system/base/compile.scm:
    59:11 14 (_)
   155:11 13 (_ #<closed: file 7da8c0>)
   235:18 12 (read-and-compile #<input: qif-import.scm 5> #:from _ # ?)
   183:32 11 (compile-fold (#<procedure compile-tree-il (x e opts)>) ?)
In ice-9/boot-9.scm:
   2312:4 10 (save-module-excursion #<procedure 6eeb20 at language/s?>)
In language/scheme/compile-tree-il.scm:
    31:15  9 (_)
In ice-9/psyntax.scm:
  1235:36  8 (expand-top-sequence ((use-modules (gnucash #))) _ _ #f ?)
  1182:24  7 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?)
   285:10  6 (parse _ (("placeholder" placeholder)) (()) _ c&e (# #) #)
In ice-9/boot-9.scm:
  3365:20  5 (process-use-modules _)
   222:17  4 (map1 (((gnucash app-utils))))
  3366:31  3 (_ ((gnucash app-utils)))
   2791:6  2 (resolve-interface _ #:select _ #:hide _ #:prefix _ # _ ?)
In unknown file:
           1 (scm-error misc-error #f "~A ~S" ("no code for modu?" ?) ?)
In ice-9/boot-9.scm:
   752:25  0 (dispatch-exception _ _ _)
  
ice-9/boot-9.scm:752:25: In procedure dispatch-exception:
no code for module (gnucash app-utils)

Since the build with make works, perhaps there is a missing dependency somehwere in the ninja build?

# find . -name *app-utils*
./libgnucash/app-utils
./libgnucash/app-utils/swig-app-utils-python.c
./libgnucash/app-utils/swig-app-utils-guile.c
./libgnucash/app-utils/gncmod-app-utils.c
./libgnucash/app-utils/app-utils.scm
./libgnucash/app-utils/app-utils.i
./libgnucash/app-utils/test/test-app-utils.c
./libgnucash/app-utils/test/test-load-app-utils-module.scm
./libgnucash/app-utils/test/CMakeFiles/test-link-module-app-utils.dir
./libgnucash/app-utils/test/CMakeFiles/test-app-utils.dir
./libgnucash/app-utils/CMakeFiles/gncmod-app-utils.dir
./libgnucash/app-utils/CMakeFiles/gncmod-app-utils.dir/swig-app-utils-guile.c.o
./libgnucash/app-utils/CMakeFiles/gncmod-app-utils.dir/gncmod-app-utils.c.o
./lib/gnucash/libgncmod-app-utils.so
Comment 1 Geert Janssens 2018-02-03 14:39:36 UTC
Thank you for your report. I'm a bit confused about the sequence of commands:
You add the output of a find command in the end of your report. Was this run right after the failed ninja-build command or after running make in between ?

I have seen some timing issues in the past, but haven't been able to reproduce them reliably.

As an extra test can you re-run ninja-build a number of times after the first build failure to determine whether at some point it does generate app-utils.go in lib/gnucash/scm/ccache/2.0/app-utils.go ?
Comment 2 John Ralls 2018-02-03 17:04:47 UTC
This failure is often because guile finds an incorrect version of libgncmod-app-utils.so, either installed or from a previous build. You can run `xargs rm < install_manifest.txt` to remove previous installation products if you haven't cleaned the builddir; otherwise it's usually enough to `find <install_prefix> -name libgnc* -delete`. If you also have an installed gnucash you'll need to hide it from guile somehow.
Comment 3 Thomas Klausner 2018-02-15 13:13:02 UTC
Geert, you're right - when I run ninja-build a couple of times in a row, it starts working at some point. So this looks like a missing dependency somewhere.

John, I'm building in an empty sandbox, so there are no other gnucash files installed.

Later, when the build finished, I tried running 'ninja install' and this works, but does not install the following files:
share/gnucash/gtkbuilder/CMakeFiles/CMakeDirectoryInformation.cmake
share/gnucash/gtkbuilder/CMakeFiles/progress.marks
share/gnucash/gtkbuilder/Makefile
share/gnucash/pixmaps/CMakeFiles/CMakeDirectoryInformation.cmake
share/gnucash/pixmaps/CMakeFiles/progress.marks
share/gnucash/pixmaps/Makefile
share/gnucash/ui/CMakeFiles/CMakeDirectoryInformation.cmake
share/gnucash/ui/CMakeFiles/progress.marks
share/gnucash/ui/Makefile
which are installed by a 'make' build.
Comment 4 John Ralls 2018-02-15 15:15:32 UTC
You can work around dependency issues by limiting the number of build processes, e.g. ninja -j2 (or make -j2).

None of those files should be installed. It's because of e.g. from gnucash/gnome/gtkbuilder/CMakeLists.txt:

FILE(COPY .
    DESTINATION ${DATADIR_BUILD}/gnucash/gtkbuilder
    PATTERN Makefile.* EXCLUDE
    PATTERN CMakeLists.txt EXCLUDE)

INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
        DESTINATION share/gnucash
        PATTERN Makefile.* EXCLUDE
        PATTERN CMakeLists.txt EXCLUDE)

Which is dumb since there's a set(gnome_GLADE ...) immediately after that lists all of the files.
Comment 5 John Ralls 2018-02-16 22:33:53 UTC
I've fixed the CMake products getting installed issue and I've gone through all of the scheme targets, checked their actual dependencies on other Scheme targets and put those into the respective CMakeLists.txt.

Please pull a new 'unstable' and give it a try.
Comment 6 Thomas Klausner 2018-02-20 15:26:16 UTC
Yes, this looks very good now.

Thanks for all your help!
Comment 7 John Ralls 2018-06-30 00:04:03 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=793122. Please update any external references or bookmarks.