[GNC-dev] GnuCash 3.4: Building on ubuntu 18.04

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[GNC-dev] GnuCash 3.4: Building on ubuntu 18.04

Antonios Hadjigeorgalis
   I'm seeing two issues when building gnucash on ubuntu 18.04

   issue #1:

   build completes successfully using cmake and make with cmake command
   line:

   cmake -DWITH_PYTHON=ON -DCMAKE_INSTALL_PREFIX=/opt/gnucash34
   -DCMAKE_BUILD_TYPE=RelWithDebInfo ..

   But then, the executable fails to find library modules is
   /opt/gnucash34/lib  after make install. Also, the same error occurs if
   trying to start from the build directory.  I see lines in the trace
   file saying (there are about 20 lines with various module names in
   place of ...
   * 14:56:29  WARN <gnc.module> Could not locate module gnucash/ ... v.0
   * 14:56:29  MESSG <gnc.module> Could not locate module gnucash/ ... v.0
   and a final line saying

   * 14:56:29  WARN <gnc.bin> GnuCash engine failed to initialize.
   Exiting.

   If I remove the -DCMAKE_INSTALL_PREFIX=/opt/gnucash34 then the build
   starts and works from the build directory.

   issue#2

   Running tests, one test fails: 28 - test-userdata-dir-invalid-home
   (Failed). This happens regardless of successful
   Running that test individually shows error messages such as:
   (Error: /home/antonios/.config/gnucash is a descendant of a
   non-existing home directory. As GnuCash will never create a home
   directory this path can't be used: Permission denied:
   "/home/antonios/.config/gnucash")

   Antonios Hadjigeorgalis

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3.4: Building on ubuntu 18.04

John Ralls-2


> On Dec 31, 2018, at 3:15 PM, Antonios Hadjigeorgalis <[hidden email]> wrote:
>
>   I'm seeing two issues when building gnucash on ubuntu 18.04
>
>   issue #1:
>
>   build completes successfully using cmake and make with cmake command
>   line:
>
>   cmake -DWITH_PYTHON=ON -DCMAKE_INSTALL_PREFIX=/opt/gnucash34
>   -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
>
>   But then, the executable fails to find library modules is
>   /opt/gnucash34/lib  after make install. Also, the same error occurs if
>   trying to start from the build directory.  I see lines in the trace
>   file saying (there are about 20 lines with various module names in
>   place of ...
>   * 14:56:29  WARN <gnc.module> Could not locate module gnucash/ ... v.0
>   * 14:56:29  MESSG <gnc.module> Could not locate module gnucash/ ... v.0
>   and a final line saying
>
>   * 14:56:29  WARN <gnc.bin> GnuCash engine failed to initialize.
>   Exiting.
>
>   If I remove the -DCMAKE_INSTALL_PREFIX=/opt/gnucash34 then the build
>   starts and works from the build directory.
>
>   issue#2
>
>   Running tests, one test fails: 28 - test-userdata-dir-invalid-home
>   (Failed). This happens regardless of successful
>   Running that test individually shows error messages such as:
>   (Error: /home/antonios/.config/gnucash is a descendant of a
>   non-existing home directory. As GnuCash will never create a home
>   directory this path can't be used: Permission denied:
>   "/home/antonios/.config/gnucash")

Cmake mangles some paths when CMAKE_INSTALL_PREFIX is rooted in either /usr or /opt, and defaults to /usr/local. The simplest work-around is to set it to something in $HOME. A little more complicated approach (one that I sometimes take) is to create a top-level directory and chown it to your userid and use a subdirectory under that for CMAKE_INSTALL_PREFIX.

Regards,
John Ralls
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3.4: Building on ubuntu 18.04

Antonios Hadjigeorgalis
Thanks John.  My solution was to put a symlink in $HOME/bin linked to the
working version in my build tree.  This seems to be working normally for
me.

On Tue, Jan 1, 2019 at 12:58 AM John Ralls <[hidden email]> wrote:

>
> Cmake mangles some paths when CMAKE_INSTALL_PREFIX is rooted in either
> /usr or /opt, and defaults to /usr/local. The simplest work-around is to
> set it to something in $HOME. A little more complicated approach (one that
> I sometimes take) is to create a top-level directory and chown it to your
> userid and use a subdirectory under that for CMAKE_INSTALL_PREFIX.
>
> Regards,
> John Ralls
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel