Re: Building with CMake

2017-06-04 Thread DaveC49
Hi Rob,

I do have a build file under gnucash and the cache files were located there.
I have deleted all files in it.

I'll take your advice and get a clean clone up and compile that without
modifying anyof the files. I had already modified the files to include a
feature for addinga link to external documents to invoices/bills, etc. I can
then transfer the modified files from the current sources directory once I
have it building successfully.

Having done that I can now identify the problem. I had made the build
directory a subdirectory of the gnucash file created when I cloned gnucash
from github instead of a directory in the same folder. The cmake is now
working OK but ninja is dropping out with an error.

/usr/local/include/boost/mpl/vector/aux_/push_front.hpp:22:45: fatal error:
/usr/local/include/boost/mpl/vector/aux_/item.hpp: Timer expired

Which is clearly something to do with my boost installation - possibly the
wrong version. I hav both 1.64.0 and 1.58.0 installed and it is currently
linking to 1.64.0. That I can sort out fairly easily.

Thanks for your help in sorting me out on cmake. I havent done any C++
development since the mid 1990s , I was trying to get familiar with Eclipse
and cmake at the same time as finding my way around the gnucash architecture
and got myself in a knot.

Best wishes

David Cousens



--
View this message in context: 
http://gnucash.1415818.n4.nabble.com/Building-with-CMake-tp4691977p4692019.html
Sent from the GnuCash - Dev mailing list archive at Nabble.com.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Building with CMake

2017-06-04 Thread Rob Gowin
On Sun, Jun 4, 2017 at 12:34 AM, DaveC49  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,
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Building with CMake

2017-06-03 Thread DaveC49
 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



--
View this message in context: 
http://gnucash.1415818.n4.nabble.com/Building-with-CMake-tp4691977p4692002.html
Sent from the GnuCash - Dev mailing list archive at Nabble.com.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Building with CMake

2017-06-01 Thread Graham Menhennitt
That file should be called CMakeLists.txt (note difference in case). Not 
sure if that will make a difference or not (or maybe you just typed it 
incorrectly in the email).


Graham


On 2/06/2017 7:37 AM, DaveC49 wrote:

Solved my own problem or at least found the
../src/cmake-modules/GncAddTest.cmake.  Somehow these files are not being
picked up in the configure even though it is in the INCLUDEs in the
CMAKELists.txt in the top level gnucash folder above the src folder (  in my
case ~/GnucashDevelopment/sources/gnucash)

David cousens



--
View this message in context: 
http://gnucash.1415818.n4.nabble.com/Building-with-CMake-tp4691977p4691983.html
Sent from the GnuCash - Dev mailing list archive at Nabble.com.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Building with CMake

2017-06-01 Thread DaveC49
Solved my own problem or at least found the
../src/cmake-modules/GncAddTest.cmake.  Somehow these files are not being
picked up in the configure even though it is in the INCLUDEs in the
CMAKELists.txt in the top level gnucash folder above the src folder (  in my
case ~/GnucashDevelopment/sources/gnucash)

David cousens



--
View this message in context: 
http://gnucash.1415818.n4.nabble.com/Building-with-CMake-tp4691977p4691983.html
Sent from the GnuCash - Dev mailing list archive at Nabble.com.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Building with CMake

2017-06-01 Thread Rob Gowin
On Thu, Jun 1, 2017 at 2:19 AM, DaveC49  wrote:

> Hi,
> I am getting an error as follows while building a branch from the master
> for
> gnucash to implement links to documents in invoices/bills/creditNotes etc.
>
> $ cmake -D CMAKE_INSTALL_PREFIX=/opt/gnucash-devel ../gnucash
> CMake Error at libqof/qof/test/CMakeLists.txt:44 (GNC_ADD_TEST):
>   Unknown CMake command "GNC_ADD_TEST".
>
>
> -- Configuring incomplete, errors occurred!
>
> I am presuming that GNC_ADD_TEST is a macro but cannot find where it is
> defined or if it is defined.  Is anyone able to enlighten me as to where I
> can or should find it and what the macro is
>
> Thanks
>
> David Cousens
>

Hi David,

The GNC_ADD_TEST function is defined in src/cmake_modules/GncAddTest.cmake.
See here:
https://github.com/Gnucash/gnucash/blob/master/src/cmake_modules/GncAddTest.cmake#L40


Perhaps you only have a partial checkout of the branch? What version of
CMake are you using (cmake -version) and on what platform? For what it's
worth, I just checked that master builds on Ubuntu 16.04 without error.

Regards,

Rob
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Building with CMake

2017-06-01 Thread DaveC49
Hi,
I am getting an error as follows while building a branch from the master for
gnucash to implement links to documents in invoices/bills/creditNotes etc.

$ cmake -D CMAKE_INSTALL_PREFIX=/opt/gnucash-devel ../gnucash
CMake Error at libqof/qof/test/CMakeLists.txt:44 (GNC_ADD_TEST):
  Unknown CMake command "GNC_ADD_TEST".


-- Configuring incomplete, errors occurred!

I am presuming that GNC_ADD_TEST is a macro but cannot find where it is
defined or if it is defined.  Is anyone able to enlighten me as to where I
can or should find it and what the macro is

Thanks

David Cousens




--
View this message in context: 
http://gnucash.1415818.n4.nabble.com/Building-with-CMake-tp4691977.html
Sent from the GnuCash - Dev mailing list archive at Nabble.com.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel