Building with CMake

Rob Gowin robg at gowin.net
Sun Jun 4 10:33:09 EDT 2017


On Sun, Jun 4, 2017 at 12:34 AM, DaveC49 <davidcousens at bigpond.com> wrote:

>  Hi further progress
> I ran cmake with the --trace option ( *cmake --trace -D
> CMAKE_INSTALL_PREFIX=/opt/gnucash-devel ../gnucash*). It appears that
> cmake
> is executing the call to add the libqof directory
> .../gnucash/src/CMakeLists.txt  line 141 and the qof/test subdirectory
> .../gnucash/src/libqof/CMakeLists.txt(3) without ever having called the
> INCLUDE (GncAddTest) at line 48 of .../gnucash/CMakeLists.txt.
> In the resultant trace output cmake in fact never seems to enter
> .../gnucash/CMakeLists.txt as the trace starts with
> .../gnucash/src/CMakeLists.txt(0):  PROJECT(Project )  and does not appear
> to be executing .../gnucash/CMakeLists.txt at all or if it is is executing
> it silently.
>
> I have deleted the cach files .../gnucash/CMakeFiles and rerun the above
> command but still get the same error and trace output
>
> If I execute *cmake --trace -D CMAKE_INSTALL_PREFIX=/opt/gnucash-devel
> ../gnucash/CmakeLists.txt*
> I obtain
> *cmake: /usr/local/lib/libcurl.so.4: no version information available
> (required by cmake)
> Running with trace output on.
> CMake Error: The source ".../gnucash/CMakeLists.txt" does not match the
> source ".../gnucash/src/CMakeLists.txt" used to generate cache.  Re-run
> cmake with a different source directory.*
>  I confess to being totally confused as to why cmake is not executing
> .../gnucash/CmakeLists.txt
>
> The trace output can be accessed using this link to a folder in my dropbox
> https://www.dropbox.com/sh/chibk4l66mz1esp/AADDP0EV9pmHjwpUHeow_zkra?dl=0
>
> Thanks for any help anyone can offer
>
> David Cousens


 Hi David,

Do you have CMake cache files in
/home/david/Documents/SoftwareDevelopment/GnucashDevelopment/sources/gnucash/src?
I think you do. If so, you need to remove them.

>From what I can tell, you haven't created a separate CMake build directory,
which you should. I usually use 'gnucash-build' that lives in the same
directory as gnucash (so in the 'sources' directory for you). Other folks
will create a 'build' directory in the gnucash source directory and use
that.

Run these commands to do a clean clone and build in a /tmp directory. If
these work, you might want to remove your .../sources/gnucash directory and
start over. Also, you should consider building with ninja for faster build
times (CMake generates a build using 'make' by default).

Commands: (assumes bash)

$ rm -rf /tmp/gcdev
$ mkdir /tmp/gcdev
$ cd /tmp/gcdev
$ git clone https://github.com/Gnucash/gnucash.git
$ mkdir gnucash-build
$ cd gnucash-build
# For ninja, add '-G Ninja' to cmake command below before '../gnucash'
# Also, make sure /opt/gnucash-devel is user-writable
$ cmake -D CMAKE_INSTALL_PREFIX=/opt/gnucash-devel ../gnucash
$ make -j 4 && TZ=America/Los_Angeles make -j 4 check && make install
# or: ninja && TZ=America/Los_Angeles ninja check && ninja install

Let me know how it goes.

Regards,


More information about the gnucash-devel mailing list