[GNC-dev] running freshly built gnucash without reinstalling the entire package
John Ralls
jralls at ceridwen.us
Tue May 9 18:54:48 EDT 2023
You must remove the installed GnuCash to run a different version from the build directory. There are also two environment variables, GNC_UNINSTALLED and GNC_BUILDDIR, that are needed for some edge-cases, mostly involving Guile code. Set the first one to 1 and the second to your absolute build directory path.
Regards,
John Ralls
> On May 1, 2023, at 5:48 AM, Platon Pronko <platon7pronko at gmail.com> wrote:
>
> Hi!
>
> I'm trying to apply some changes to the code and test them. Previously I could just execute `make` in the build directory and then run `./bin/gnucash`, however on 5.x versions that stopped working. My current workaround is to build and reinstall the entire package (I'm on Arch Linux), but that's very slow and inconvenient.
>
> Is there some way to run the code directly from the build tree, or install into some temporary location and run from there?
>
>
> Below are my attempts so far.
>
> When I run ./build/bin/gnucash (in the repository) I get some error about inability to find app-utils module:
>
> ```
> ice-9/boot-9.scm:3330:6: In procedure resolve-interface:
> no code for module (gnucash app-utils)
> ```
>
> I looked through the docs, and in "Starting GnuCash from the build tree" I found some reference to installing it using some custom --prefix. My next attempt was to run `make DESTDIR=/var/tmp/gnucash/ install`. Then I tried starting gnucash from that temp location:
>
> ```
> $ /var/tmp/gnucash/usr/bin/gnucash
> /var/tmp/gnucash/usr/bin/gnucash: error while loading shared libraries: libgnc-module.so: cannot open shared object file: No such file or directory
> ```
>
> Which is logical, because the binaries were not installed in the global library dirs. I tried adding the paths to LD_LIBRARY_PATH:
>
> ```
> $ LD_LIBRARY_PATH=/var/tmp/gnucash/usr/lib/:/var/tmp/gnucash/usr/lib/gnucash/ ./usr/bin/gnucash
> This is a development version. It may or may not work.
> Report bugs and other problems to gnucash-devel at gnucash.org
> You can also lookup and file bug reports at https://bugs.gnucash.org
> To find the last stable version, please refer to https://www.gnucash.org/
> Backtrace:
> In ice-9/boot-9.scm:
> 1752:10 5 (with-exception-handler _ _ #:unwind? _ # _)
> In unknown file:
> 4 (apply-smob/0 #<thunk 7f00bc1cd2a0>)
> In ice-9/boot-9.scm:
> 3935:20 3 (process-use-modules _)
> 222:17 2 (map1 (((gnucash app-utils))))
> 3936:31 1 (_ ((gnucash app-utils)))
> 3330:6 0 (resolve-interface (gnucash app-utils) #:select _ #:hide …)
>
> ice-9/boot-9.scm:3330:6: In procedure resolve-interface:
> no code for module (gnucash app-utils)
> ```
>
> Now I again get the error about inability to find the modules. Tried setting GNC_MODULE_PATH - no effect. Then I tried setting GUILE_LOAD_PATH, and observed some change in file open syscalls in strace. After tweaking GUILE_LOAD_PATH some more I arrived at:
>
> ```
> LD_LIBRARY_PATH=/var/tmp/gnucash/usr/lib/:/var/tmp/gnucash/usr/lib/gnucash/ GUILE_LOAD_PATH=/var/tmp/gnucash/usr/share/guile/site/3.0/ ./usr/bin/gnucash
> ```
>
> It starts, but fails with coredump when I try to do "File > Open...":
>
> ```
> gnucash/gnome-utils/dialog-file-access.c:487:gnc_ui_file_access: assertion failed: (active_access_method_index >= 0)
> ```
>
> --
> Best regards,
> Platon Pronko
> PGP 2A62D77A7A2CB94E
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
More information about the gnucash-devel
mailing list