[GNC] trouble compiling 3.2 release

David Cousens davidcousens at bigpond.com
Sun Sep 2 20:44:34 EDT 2018


John

The output you are getting from the make is similar to what you get when
cmake  has not correctly addressed the source directory from the build
directory. It has not started with the toplevel CmakeLists.txt file. The
relative addressing can be a bit tricky. Try the build instructions on the
wiki for Ubuntu (https://wiki.gnucash.org/wiki/BuildUbuntu16.04). They work
for Ubuntu versions after 16.04, Debian (not sure of which versions here but
certainlt the ones LM is based on), Linux Mint ( 17,18,19) once you have all
the dependencies installed. 

The process of creating a build directory and running cmake are covered in
some detail for various optional locations of the build directory relative
to the sources on the wiki.
 
You should not have to copy anything into the build directory. cmake creates
the contents of the build directory from the sources when it runs.

You run the cmake command in a shell open in the build directory. 

The final argument for the cmake command can be either a relative path from
the build directory to the directory with the sources in it or an absolute
path to the directory with the sources, e.g.
/home/<user>/.../gnucash-3.2 where gnucash-3.2 is the directory containing
the sources somewhere under the <user> directory.

Also the cmake command you are using is trying to install to the source
directory which is not desirable. If you wish to install locally (i.e. just
for the one user, it is probably preferrable to install to
/home/<user>/.local/gnucash-3.2 (and use that as the installprefix).
Assuming:
/home/john/gnucash-3.2               conatins the sources;
/home/john/gnucash-3.2/build      is your build directory;
/home/john/.local/gnucash-3.2      is the install directory;

Ihe cmake command using absolute addressing should be:

cmake -D CMAKE_INSTALL_PREFIX=/home/john/.local/gnucash-3.2 
/home/john/gnucash-3.2

(or using relative addressing

cmake -D CMAKE_INSTALL_PREFIX=/home/john/.local/gnucash-3.2 ../   

Here the "../" directs you from the build directory up one level to the
source directory which if it as described above contains the build
directory. "../gnucash-3.2" would be looking for the sources in a directory
/home/john/gnucash-3.2/gnucash-3.2. 

 /home/john/gnucash-3.2 the source directory also contains a directory
gnucash and as it also has a CMakeLists.txts file, cmake seems to assume
this is the top level directory for the build rather than starting with 
/home/john/gnucash-3.2/CMakeLists.txt as it should.

(You could also substitute "~" or "$HOME" (if defined) for "/home/john"
depending on your distribution)

Note .local is a hidden directory. 

The command to run gnucash, if configured as above  would be: 
/home/john/.local/gnucash-3.2/bin/gnucash. 

You should  be able to set that in a launcher to run GnuCash from the menu
or create an alias
(https://www.hostingadvice.com/how-to/set-command-aliases-linuxubuntudebian/)
for the above command.


David Cousens




-----
David Cousens
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html


More information about the gnucash-user mailing list