[Kmymoney-devel] build questions

Thomas Baumgart thb at net-bembel.de
Sun Jul 25 09:13:07 CEST 2010


Hi all,

on Sunday 25 July 2010 02:48:15 Jack wrote:


> On 2010.07.24 20:29, Alvaro Soliverez wrote:
> > On Sat, Jul 24, 2010 at 9:19 PM, Jack <ostroffjh at sbcglobal.net> wrote:
> > > On 2010.07.24 19:57, Alvaro Soliverez wrote:
> > >> On Sat, Jul 24, 2010 at 8:37 PM, Jack <ostroffjh at sbcglobal.net>
> >
> > wrote:
> >>>> First, a minor issue, but I've gotten curious.  I've notice
> >>>> recently people suggesting to run "make" twice.  In fact, I've
> >>>> also noticed that it sometimes takes more runs for another "make"
> >>>> to not to anything else.  Is this just a side effect of actually
> >>>> running "make -j3" or is there something non-deterministic about
> >>>> make?
> >>>
> >>> There is some issue with dependencies not being compiled correctly
> >>> on the first run. Before, it actually took 3 runs to build
> >>> completely. We're still working out why it happens, but it doesn't
> >>> have anything to do with running "make -j3". I run "make -j5"
> >>> actually.
> >>
> >> Good to know.  I've always assumed a good "j" value is one more than
> >> the number of processors or cores you have.
> >
> > I have a Phenom x4, that's why.

I have heard from people (Gentoo packagers - OK, they compile a lot) who have 
a quad core engine that they use -j9 because they have hyperthreading. So it's 
number of threads (or whatever the correct term in CPU talk theses days is) 
plus one. And there must be a diffence, because they had problems compiling 
with -j9 but not with -j5 on the same box.

> >>>> Second, and this is now starting to drive me crazy, the last few
> >>>> times I've compiled from svn, I've noticed that the handbook has
> >>>> not been installed, and it actually looks like it wasn't even
> >>>> 'compiled.'  I then noticed the cmake option
> >>>> KDE4_ENABLE_HTMLHANDBOOK, which seems not to be on by default.
> >>>>  (I'm using the default CMAKE_BUILD_TYPE of RelWithDebInfo.)  I
> >>>> know it has worked in the past, because my installed version has a
> >>>> handbook labeled 4.5, which was only in index.docbook briefly.
> >>>
> >>> Cristian fixed the handbook a couple of weeks ago. Perhaps it was
> >>> before that. After Cristian's fix, you have to enable it
> >>> explicitely.
> >>
> >> I assume he just changed some of the defaults, and that this can be
> >> enabled by -DKDE4_ENABLE_HANDBOOK=on in the cmake command?
> >
> > Yes. Keep in mind that the developer's handbook is only of use for
> > developers actually interested to get involved in KMM's development.
> > That would reduce the intended audience to less than 20 people. To be
> > off by default is really sensible in this case.

Hmm, I just checked the CMakeLists.txt file in the main directory and the 
switch for the developer doc is called USE_DEVELOPER_DOC:

OPTION(USE_DEVELOPER_DOC
  "Install KMyMoney specific developer documentation (default=OFF)" OFF)

The same file does *not* contain *any* information about the user 
documentation in case it comes straight from SVN. And this is most notably the 
reason for Jack's problems.


The createtarball script adds an important line to the CMakeLists.txt file 
which is

  add_subdirectory(doc)

If this line is missing (in case of a fresh checkout from SVN), the doc 
subdirectory will not be considered by cmake and thus not build. The 
createtarball adds some more which are called

  add_subdirectory(po)
  add_subdirectory(doc-translations)

but those are only added if you don't specify that new -t option.


Besides that, the generation of user manual from the tarball sources is 
unconditional. Here's the diff between the two versions:

thb at thb-nb:~/devel> diff -u kmymoney4/CMakeLists.txt 
createtarball/kmymoney-3.98.2/CMakeLists.txt
--- kmymoney4/CMakeLists.txt    2010-07-24 19:31:50.000000000 +0200
+++ createtarball/kmymoney-3.98.2/CMakeLists.txt        2010-07-24 
20:10:44.000000000 +0200
@@ -406,3 +406,4 @@
 message("Good - your configure finished.
 Now type 'make' to build KMyMoney. For more help, consult README.cmake
 ")
+add_subdirectory( doc )


In case you want to have it conditional you need to add the necessary entries 
in the doc/CMakeLists.txt. But then you have to make sure the same option is 
used in the translations.


> I think we're having two different conversations here.  I am not
> talking about the developers documentation.  I am talking about the
> main KMM handbook.  I know the former is of interest to very few
> people, and is probably reasonable to omit from most distro builds.
> The main handbook, however, should probably be on be default, although
> I agree a switch to turn it off is reasonable.
> 
> >>>   It also doesn't show the new faq or installation chapters.  My
> >>> current index.docbook says 3.97 and has those chapters, and that is
> >>> the version in the doc/ directory.
> >>> I think that has to do with the createtarball not finding the docs
> >>> every time. I've seen that happen once or twice.
> >>
> >> No - these problems are compiling from svn.  I have a script that
> >> creates (or empties) the doc directory under the main source
> >> directory and copies everything from my working doc svn directory,
> >> then cleans out the build directory, and runs cmake.  (pretty much
> >> like the createtarball script does.)
> >
> > Do you run a compile from scratch in this case? When you add or
> > remove files, it is advised that you uninstall first, rm * your build
> > file and build from scratch. Otherwise, some files may be overlooked.
> 
> I usually just try make, but if anything is at all funny, then I clean
> out build and doc, reload doc from my working directory, and then run
> cmake.

Don't forget to add that one special line. And please make sure that you never 
add that line to to SVN!!  It will screw up everyone else.

Hope that helps.

-- 

Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
If a cluttered desk is characteristic of a cluttered mind,
what does an empty desk mean ?
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 225 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kmymoney-devel/attachments/20100725/6f8c4612/attachment-0001.sig 


More information about the KMyMoney-devel mailing list