Re: [GNC-dev] gc 4.6 compile problem
Am 02.07.21 um 18:33 schrieb John Ralls: It depends on whether you manage to get it to build and how you configure your library-loader defaults. Each executable needs to find the right set of shared libraries and loadable modules: /usr/bin/gnucash needs to find the ones in /usr/ and /opt/bin/gnucash needs to find the ones in /opt/. Linux generally organizes loading the shared libraries with /etc/ldso.conf, but it can be tweaked with the environment variable $LD_LIBRARY_PATH. In general that config also applies to loadable modules, but Guile still uses the utterly obsolete Gnu libtool libltdl.so that has its own environment variable and redirection files ("lt libraries") that provide another layer of complexity for you to navigate. You might be able to override the shared library half of the problem with additional CMake arguments that set up RPATHs to override the defaults and by running the self-built GnuCash from a shell script or .desktop that overrides the Guile and Gnu libtool environments to point at your /opt build. This isn't script-kiddie stuff so if you haven't been nodding along to all of that you've got some studying to do. Thanks, I'm quite familiar with Linux. I'm using it now for about 25 years (and about 10 years more HP-UX). After overwriting /usr/lib64/libgnucash-guile.so, the build succeded. The Makefile seems to do "the right thing", an "ldd /opt/bin/gnucash" shows the correct shared library paths, no fiddling with ldso.conf or LD_LIBRARY_PATH is necessary. And during make, there were a lot of messages like this: ;;; note: source file /home/lothar/src/work/gnucash/gnucash-4.6/build/share/guile/site/3.0/gnucash/report/html-chart.scm ;;; newer than compiled /usr/lib64/guile/3.0/site-ccache/gnucash/report/html-chart.go It seems, that all *.go files are built and installed correctly to /opt/gnucash/lib64/guile/3.0/site-ccache/gnucash/ and gnucash seems to run without problems. Maybe I'll do a last check and remove the package version. If everything still works, then I think, the use of /usr/lib64/libgnucash-guile.so by guile during make is the only issue. Thanks and best regards Lothar ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [GNC-dev] gc 4.6 compile problem
> On Jul 2, 2021, at 3:58 AM, Lothar Paltins via gnucash-devel > wrote: > > Am 01.07.21 um 18:18 schrieb John Ralls: >> You're absolutely right, it should be. Unfortunately Guile doesn't agree and >> our efforts to convince it otherwise have been unsuccessful. It's not >> possible on Linux to build GnuCash on a machine that has GnuCash installed >> by the package manager without some gymnastics. I think the simplest work >> around is to set up a VM for building GnuCash, but maybe there's another way. > > Hi John, > > just to be sure. Is this only a build issue or could it be a problem at > runtime? It depends on whether you manage to get it to build and how you configure your library-loader defaults. Each executable needs to find the right set of shared libraries and loadable modules: /usr/bin/gnucash needs to find the ones in /usr/ and /opt/bin/gnucash needs to find the ones in /opt/. Linux generally organizes loading the shared libraries with /etc/ldso.conf, but it can be tweaked with the environment variable $LD_LIBRARY_PATH. In general that config also applies to loadable modules, but Guile still uses the utterly obsolete Gnu libtool libltdl.so that has its own environment variable and redirection files ("lt libraries") that provide another layer of complexity for you to navigate. You might be able to override the shared library half of the problem with additional CMake arguments that set up RPATHs to override the defaults and by running the self-built GnuCash from a shell script or .desktop that overrides the Guile and Gnu libtool environments to point at your /opt build. This isn't script-kiddie stuff so if you haven't been nodding along to all of that you've got some studying to do. Regards, John Ralls ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [GNC-dev] gc 4.6 compile problem
Am 01.07.21 um 18:18 schrieb John Ralls: You're absolutely right, it should be. Unfortunately Guile doesn't agree and our efforts to convince it otherwise have been unsuccessful. It's not possible on Linux to build GnuCash on a machine that has GnuCash installed by the package manager without some gymnastics. I think the simplest work around is to set up a VM for building GnuCash, but maybe there's another way. Hi John, just to be sure. Is this only a build issue or could it be a problem at runtime? Lothar ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [GNC-dev] gc 4.6 compile problem
Op donderdag 1 juli 2021 18:18:19 CEST schreef John Ralls: > > On Jul 1, 2021, at 4:18 AM, Lothar Paltins via gnucash-devel > > wrote:> > > Am 01.07.21 um 05:15 schrieb John Ralls: > >> You don't need to replace the old libraries, just remove them. Then Guile > >> won't be able to find them and will fall back to looking where it's told > >> to, in the build directory. Kinda like that (probably apocryphal) > >> Churchill quote about Americans always doing the right thing after > >> they'd exhausted all of the alternatives. Make/ninja uninstall is > >> easiest but doesn't always work if there are filename changes and the > >> builddir or sourcedir are reused. If it fails it's usually enough to > >> remove libgnc* from the install library folder; sometimes you also need > >> to remove the installed *.scm and *.go files from their respective > >> directories in libdir/guile/version/ccache and sharedir/guile.> > > I'm not really familiar with the build process of gnucash and with guile > > and I don't know, if it's possible. But I think, if a shared library is > > generated during a build process, then this version should be used > > afterwards unconditionally. Any other version anywhere in the file system > > is most likely outdated. And my install directory is /opt/gnucash-4.6 and > > it's empty during a "make". /usr/lib64 isn't my install directory, a > > "make uninstall" will not remove anything there. A library in this > > directory is almost certainly outdated. I want to install my compiled > > version separated from the distribution version, so I can't simply remove > > /usr/lib64/libgnucash-guile.so. I would have to restore it later. > You're absolutely right, it should be. Unfortunately Guile doesn't agree and > our efforts to convince it otherwise have been unsuccessful. It's not > possible on Linux to build GnuCash on a machine that has GnuCash installed > by the package manager without some gymnastics. I think the simplest work > around is to set up a VM for building GnuCash, but maybe there's another > way. A (docker/podman) container is slightly more lightweight than a VM. But the idea is the same. Regards, Geert ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [GNC-dev] gc 4.6 compile problem
> On Jul 1, 2021, at 4:18 AM, Lothar Paltins via gnucash-devel > wrote: > > Am 01.07.21 um 05:15 schrieb John Ralls: >> You don't need to replace the old libraries, just remove them. Then Guile >> won't be able to find them and will fall back to looking where it's told to, >> in the build directory. Kinda like that (probably apocryphal) Churchill >> quote about Americans always doing the right thing after they'd exhausted >> all of the alternatives. Make/ninja uninstall is easiest but doesn't always >> work if there are filename changes and the builddir or sourcedir are reused. >> If it fails it's usually enough to remove libgnc* from the install library >> folder; sometimes you also need to remove the installed *.scm and *.go files >> from their respective directories in libdir/guile/version/ccache and >> sharedir/guile. > > I'm not really familiar with the build process of gnucash and with guile and > I don't know, if it's possible. But I think, if a shared library is generated > during a build process, then this version should be used afterwards > unconditionally. Any other version anywhere in the file system is most likely > outdated. And my install directory is /opt/gnucash-4.6 and it's empty during > a "make". /usr/lib64 isn't my install directory, a "make uninstall" will not > remove anything there. A library in this directory is almost certainly > outdated. I want to install my compiled version separated from the > distribution version, so I can't simply remove > /usr/lib64/libgnucash-guile.so. I would have to restore it later. You're absolutely right, it should be. Unfortunately Guile doesn't agree and our efforts to convince it otherwise have been unsuccessful. It's not possible on Linux to build GnuCash on a machine that has GnuCash installed by the package manager without some gymnastics. I think the simplest work around is to set up a VM for building GnuCash, but maybe there's another way. Regards, John Ralls ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [GNC-dev] gc 4.6 compile problem
Am 01.07.21 um 05:15 schrieb John Ralls: You don't need to replace the old libraries, just remove them. Then Guile won't be able to find them and will fall back to looking where it's told to, in the build directory. Kinda like that (probably apocryphal) Churchill quote about Americans always doing the right thing after they'd exhausted all of the alternatives. Make/ninja uninstall is easiest but doesn't always work if there are filename changes and the builddir or sourcedir are reused. If it fails it's usually enough to remove libgnc* from the install library folder; sometimes you also need to remove the installed *.scm and *.go files from their respective directories in libdir/guile/version/ccache and sharedir/guile. I'm not really familiar with the build process of gnucash and with guile and I don't know, if it's possible. But I think, if a shared library is generated during a build process, then this version should be used afterwards unconditionally. Any other version anywhere in the file system is most likely outdated. And my install directory is /opt/gnucash-4.6 and it's empty during a "make". /usr/lib64 isn't my install directory, a "make uninstall" will not remove anything there. A library in this directory is almost certainly outdated. I want to install my compiled version separated from the distribution version, so I can't simply remove /usr/lib64/libgnucash-guile.so. I would have to restore it later. Best regards Lothar -- Lothar Paltins lkp...@mailbox.org ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [GNC-dev] gc 4.6 compile problem
> On Jun 30, 2021, at 11:34 AM, Lothar Paltins via gnucash-devel > wrote: > > Hi, > > I've tried to compile gnucash 4.6 under Linux (OpenSuse Tumbleweed): > cmake -DCMAKE_INSTALL_PREFIX=/opt/gnucash .. > make > > There was the following error: > >> [ 23%] Generating >> ../../lib64/guile/3.0/site-ccache/gnucash/engine/business-core.go >> Backtrace: >> In /usr/bin/guild: >>72:17 19 (main _) >> In srfi/srfi-1.scm: >>634:9 18 (for-each # ?) >> In scripts/compile.scm: >> 279:26 17 (_ _) >> In system/base/target.scm: >> 65:6 16 (with-target _ _) >> In system/base/compile.scm: >>187:6 15 (compile-file "/home/lothar/src/work/gnucash/gnucash-4?" ?) >> 53:4 14 (call-with-output-file/atomic _ _ _) >> In ice-9/boot-9.scm: >> 1752:10 13 (with-exception-handler _ _ #:unwind? _ # _) >> In system/base/compile.scm: >>69:11 12 (_) >> 190:11 11 (_ #) >> 331:39 10 (read-and-compile # #:from ?) >> 261:27 9 (_ _ _) >> In ice-9/boot-9.scm: >> 2835:4 8 (save-module-excursion #) >> In language/scheme/compile-tree-il.scm: >>31:15 7 (_) >> In ice-9/psyntax.scm: >> 1230:36 6 (expand-top-sequence (#) ?) >> 1222:19 5 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?) >> 259:10 4 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?) >> In unknown file: >> 3 (load-extension "libgnucash-guile" "gnc_guile_bindings_?") >> In system/foreign-library.scm: >> 190:25 2 (load-foreign-library _ #:extensions _ # _ #:search-path ?) >> In unknown file: >> 1 (dlopen "/usr/lib64/libgnucash-guile.so" 1) >> In ice-9/boot-9.scm: >> 1685:16 0 (raise-exception _ #:continuable? _) >> ice-9/boot-9.scm:1685:16: In procedure raise-exception: >> In procedure dlopen: file "/usr/lib64/libgnucash-guile.so", message >> "/usr/lib64/libgnucash-guile.so: undefined symbol: >> gnc_pricedb_lookup_latest_before_any_currency_t64" >> make[2]: *** [bindings/guile/CMakeFiles/scm-engine-0.dir/build.make:79: >> lib64/guile/3.0/site-ccache/gnucash/engine/business-core.go] Error 1 >> make[1]: *** [CMakeFiles/Makefile2:11852: >> bindings/guile/CMakeFiles/scm-engine-0.dir/all] Error 2 >> make: *** [Makefile:166: all] Error 2 > > According to the NEWS file, gnc_pricedb_lookup_latest_before_any_currency_t64 > was replaced by gnc_pricedb_lookup_nearest_before_any_currency_t64. The > problem seems to be the dlopen "/usr/lib64/libgnucash-guile.so", that's the > old 4.5 library installed by the distribution. Copying the new generated > library build/lib64/libgnucash-guile.so to /usr/lib64 fixes the issue, but > that's a pretty ugly hack. You don't need to replace the old libraries, just remove them. Then Guile won't be able to find them and will fall back to looking where it's told to, in the build directory. Kinda like that (probably apocryphal) Churchill quote about Americans always doing the right thing after they'd exhausted all of the alternatives. Make/ninja uninstall is easiest but doesn't always work if there are filename changes and the builddir or sourcedir are reused. If it fails it's usually enough to remove libgnc* from the install library folder; sometimes you also need to remove the installed *.scm and *.go files from their respective directories in libdir/guile/version/ccache and sharedir/guile. Regards, John Ralls ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
[GNC-dev] gc 4.6 compile problem
Hi, I've tried to compile gnucash 4.6 under Linux (OpenSuse Tumbleweed): cmake -DCMAKE_INSTALL_PREFIX=/opt/gnucash .. make There was the following error: [ 23%] Generating ../../lib64/guile/3.0/site-ccache/gnucash/engine/business-core.go Backtrace: In /usr/bin/guild: 72:17 19 (main _) In srfi/srfi-1.scm: 634:9 18 (for-each # ?) In scripts/compile.scm: 279:26 17 (_ _) In system/base/target.scm: 65:6 16 (with-target _ _) In system/base/compile.scm: 187:6 15 (compile-file "/home/lothar/src/work/gnucash/gnucash-4?" ?) 53:4 14 (call-with-output-file/atomic _ _ _) In ice-9/boot-9.scm: 1752:10 13 (with-exception-handler _ _ #:unwind? _ # _) In system/base/compile.scm: 69:11 12 (_) 190:11 11 (_ #) 331:39 10 (read-and-compile # #:from ?) 261:27 9 (_ _ _) In ice-9/boot-9.scm: 2835:4 8 (save-module-excursion #) In language/scheme/compile-tree-il.scm: 31:15 7 (_) In ice-9/psyntax.scm: 1230:36 6 (expand-top-sequence (#) ?) 1222:19 5 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?) 259:10 4 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?) In unknown file: 3 (load-extension "libgnucash-guile" "gnc_guile_bindings_?") In system/foreign-library.scm: 190:25 2 (load-foreign-library _ #:extensions _ # _ #:search-path ?) In unknown file: 1 (dlopen "/usr/lib64/libgnucash-guile.so" 1) In ice-9/boot-9.scm: 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure dlopen: file "/usr/lib64/libgnucash-guile.so", message "/usr/lib64/libgnucash-guile.so: undefined symbol: gnc_pricedb_lookup_latest_before_any_currency_t64" make[2]: *** [bindings/guile/CMakeFiles/scm-engine-0.dir/build.make:79: lib64/guile/3.0/site-ccache/gnucash/engine/business-core.go] Error 1 make[1]: *** [CMakeFiles/Makefile2:11852: bindings/guile/CMakeFiles/scm-engine-0.dir/all] Error 2 make: *** [Makefile:166: all] Error 2 According to the NEWS file, gnc_pricedb_lookup_latest_before_any_currency_t64 was replaced by gnc_pricedb_lookup_nearest_before_any_currency_t64. The problem seems to be the dlopen "/usr/lib64/libgnucash-guile.so", that's the old 4.5 library installed by the distribution. Copying the new generated library build/lib64/libgnucash-guile.so to /usr/lib64 fixes the issue, but that's a pretty ugly hack. Is there a better fix? Lothar -- Lothar Paltins lkp...@mailbox.org ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel