On 2016.10.23 17:40, aga wrote:
On 23/10/16 20:24, Jack wrote:
> On 2016.10.23 14:02, aga wrote:
>> I'm trying to build 4.8.0 from git and am having problems. I thought, >> perhaps wrongly, that 4.8.0 would be KDE4 rather than qt5, but found >> there were quite a few qt5 files involved. Finally, I think I've got >> rid of those and have now got to make. I'm getting an error here that I
>> don't understand -
>>
>> [  0%] Building CXX object
>> libkgpgfile/CMakeFiles/kgpgfile.dir/kgpgfile.cpp.o
>> In file included from
>> /home/aga/kmymoney-4.8.0/libkgpgfile/kgpgfile.cpp:20:0:
>> /home/aga/kmymoney-4.8.0/libkgpgfile/kgpgfile.h:22:17: fatal error:
>> QFile: No such file or directory
>> compilation terminated.
>> libkgpgfile/CMakeFiles/kgpgfile.dir/build.make:62: recipe for target
>> 'libkgpgfile/CMakeFiles/kgpgfile.dir/kgpgfile.cpp.o' failed
>> make[2]: *** [libkgpgfile/CMakeFiles/kgpgfile.dir/kgpgfile.cpp.o] Error 1
>> CMakeFiles/Makefile2:150: recipe for target
>> 'libkgpgfile/CMakeFiles/kgpgfile.dir/all' failed
>>
>> Now, I do seem to have that file in that directory, so what is the
>> problem, please.
> I can't help with that particular error, but on the qt5 stuff, I fought > that for a long time. It turns out in my case, that at least one of the > dependencies had been compiled with qt5, and that dragged in other qt5 > stuff. (That was libalkimia, which we've discussed in other threads.)
> What you can try, is in the build directory, do "grep -i qt5
> CMakeCache.txt" and hope you don't find any.  I suppose a "grep -ir"
> would be even more thorough, but the first always found it for me.
>
> Jack

Hi Jack

I've been reading your epic biography!

Now, this surprises me, showing the shallowness of my knowledge/memory,
as I'd done a text search of the
CMakeLists.txt, which now produces no finds.  However, your two
suggestions produce -

QT_BINARY_DIR:INTERNAL=/usr/lib/x86_64-linux-gnu/qt5/bin
QT_HEADERS_DIR:INTERNAL=/usr/include/x86_64-linux-gnu/qt5

Only on seeing the result did it dawn on me to look at CMakeCache.txt.
I'm glad to say that I immediately realised that after removing the qt5
references, I hadn't deleted that file or the build directory.  Right
now, make has reached 25% and looking good.

I got bogged down on qt5 build, and didn't really understand what it was
telling me about wrong versions.  I didn't seem to have what it wanted
and couldn't find a source for them.  Assuming 4.8.0 goes OK - now 65%
-I'll need to try once more, again, again.  Installation now complete.

Many thanks, again

Allan
I've learned a lot about cmake in the past few weeks, and still far from enough, just to use it wisely, much less write files for it. One thing to remember is CMkaeLists.txt is the main source file which drives what cmake looks for and where. Once cmake runs, it stores what it has found in CMakeCache.txt (and various cmake files in lower directories) in the build directory. Running cmake again, doesn't seem to override anything already in CMakeCache.txt. However, if there are only one or two things it found "wrong" you can delete those entries and then run cmake again, and it will only look for those items, not everything. It can save some time.

The other thing I can say is that it is possible for cmake to think it has found everything it needs, but for the subsequent make to fail over some version mismatch. I'm not sure if that is an inherent potential issue with the system, or if that just implies that something could/should have been different in CMakeLists.txt.

Final learning (or not learned, perhaps) is that there are various ways of passing hints to cmake - both through environment variables and -D parameters on the command line. My problem is that I have had lots of experience where these do not seem to do what I expected them to do, and I'm still not sure if I had some syntax error, or if I misunderstood what was actually supposed to happen.

At this point, I have 4.8 git head (qt4/KDE4) running well as my "system" KMM, and will soon start on compiling git master (qt5/Frameworks) in my alternate install tree, so I can actually run both. (Yes, I backup my kmy file just about every time I make any change to it at all.)

Jack

Reply via email to