Re: cmake problems in KDELibs4Config

2013-07-25 Thread Alexander Neundorf
On Thursday 25 July 2013, Sebastian Kügler wrote:
 Hi Alex,
 
 On Wednesday, July 24, 2013 22:27:46 Alexander Neundorf wrote:
  On Wednesday 24 July 2013, Alexander Neundorf wrote:
   What to do...
   
   So, kde4support depends on a lot of stuff in kdelibs.
   Some libs in kdelibs still depend on kde4support (at least last week
   this still was the case). That's why kde4support is still not
   installed separately.
   
   So the KDE4Attic targets needs to exist before KDELibs4 is searched.
   
Adding KDE4Attic to the KF5 modules doesn't help, what to do?
   
   What exactly did you do ?
 
 I added KDE4Attic in the find_package(KF5... call in plasma-
 framework/CMakeLists.txt). That yields a can't find KDE4Attic.
 
   If you add KDE4Attic to the list of known frameworks in
   extra-cmake-modules, and add it to the find_package(KF5  ) call as
   a needed component, it should work.
  
  No, won't work.
  kde4support depends on kde4attic, kde4attic depends e.g. on kdeui and
  kdecore. So there are cyclic dependencies.
  The kde4attic targets must not yet be exported into a separate file, but
  must  still stay in the KDE4LibraryTargets.cmake file.
 
 I don't see where and how to add it there, tried a few combinations, but
 I'm very much in the dark how these things work (your explanations help a
 bit, so thanks for that!), and what exactly I need to add, in which order,
 making it quite cumbersome (and so far without success).
 
 I understand that I should change CreateKDELibsDependenciesFile.cmake then,
 to include KDE4_kde4attic? You say the KDE4Attic files must not be
 exported,

No, must not be exported separately from the rest of kdelibs, because there 
are dependencies from kdelibs to kde4attic, and from kde4attic to kdelibs.
Which leads to the problem that when a separately installed kde4attic is 
fodund before kdelibs, the required libs from kdelibs do not yet exist, and 
doing it the other way round, first searching kdelibs, then kde4attic, the 
kde4attic is missing for those parts in kdelibs which depend on it.

So both kde4attic and the rest of kdelibs must be in the same export.
I.e. there where install(TARGETS KDE4Attic EXPORT exportSet ...)
is called, the same exportSet must be used as for the rest of kdelibs.

In KDE4AtticConfig.cmake, no targets will be imported, but it can check that 
the target KDE4__KDE4Attic exists (the KDE4__ prefix is used as namespace 
when exporting from kdelibs), and if so,
set(KDE4Attic_LIBRARIES KDE4__KDE4Attic)
and fail otherwise with the error message that KDELibs needs to be found 
first.

That way for the user it would just work, and he shouldn't notice the 
transition at all.

 I do have cmake/KDE4Attic installed along with all the other
 frameworks, so that's wrong then? OTOH, if it's not installed,
 plasma-framework/CMakeLists.txt will not be able to find it. (And if it's
 installed, it's still not found -- that's probably what you're hinting
 at.)
 
 People *really* need to build also plasma-framework before committing such
 changes to kdelibs[frameworks]. At this point, I'm spending half of my time
 just picking up build breakage from others. I'm having a really hard time
 catching up, plasma-framework hasn't built once, this entire week, and it's
 blocking people from contributing.

Kevin said he's working on it so, so I'm not.

Alex
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: cmake problems in KDELibs4Config

2013-07-24 Thread Alexander Neundorf
On Wednesday 24 July 2013, Sebastian Kügler wrote:
 Hi,
 
 I'm getting the following two errors when trying to build plasma-framework:
 
 macro_ensure_version doesn't exist anymore, but is used in
 KDELibs4Config.cmake. Is there a replacement for it?

Hopefully all such changes are documented here:

http://techbase.kde.org/Development/ECM_SourceIncompatChanges#MacroEnsureVersion.cmake

 Then:
 
 CMake Error at CMakeLists.txt:70 (find_package):
   Found package configuration file:
 
 /home/sebas/kf5/install/lib/x86_64-linux-
 gnu/cmake/KDELibs4/KDELibs4Config.cmake
 
   but it set KDELibs4_FOUND to FALSE so package KDELibs4 is considered to
   be NOT FOUND.  Reason given by package:
 
   The following imported targets are referenced, but are missing:
   KF5::KDE4Attic


KDELibs4Config.cmake includes KDELibs4LibraryTargets.cmake.
This file contains exported targets for all not yet separated libraries of 
kdelibs, e.g. KDE4Support.
kde4support links against kde4attic.
When exporting the targets, cmake puts the dependency information into the 
file containing the exported targets (KDELibs4LibraryTargets.cmake). So 
kde4support depends on kde4attic.
To make sure everything works once this export-file has been imported again by 
a using project (plasma), cmake puts in a check that all targets exist, which 
are dependencies of targets exported into this file, i.e. it checks whether 
the target KF5::KDE4Attic exists, since it is needed by the target for the 
kde4support library.
Here it fails then.

You can have a look into these files, they are more or less fully commented.

What to do...

So, kde4support depends on a lot of stuff in kdelibs.
Some libs in kdelibs still depend on kde4support (at least last week this 
still was the case). That's why kde4support is still not installed separately.

So the KDE4Attic targets needs to exist before KDELibs4 is searched.


 Adding KDE4Attic to the KF5 modules doesn't help, what to do?

What exactly did you do ?

If you add KDE4Attic to the list of known frameworks in extra-cmake-modules, 
and add it to the find_package(KF5  ) call as a needed component, it 
should work.

Alex
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: cmake problems in KDELibs4Config

2013-07-24 Thread Alexander Neundorf
On Wednesday 24 July 2013, Alexander Neundorf wrote:
 On Wednesday 24 July 2013, Sebastian Kügler wrote:
  Hi,
  
  I'm getting the following two errors when trying to build
  plasma-framework:
  
  macro_ensure_version doesn't exist anymore, but is used in
  KDELibs4Config.cmake. Is there a replacement for it?
 
 Hopefully all such changes are documented here:
 
 http://techbase.kde.org/Development/ECM_SourceIncompatChanges#MacroEnsureVe
 rsion.cmake
 
  Then:
  
  CMake Error at CMakeLists.txt:70 (find_package):
Found package configuration file:
  /home/sebas/kf5/install/lib/x86_64-linux-
  
  gnu/cmake/KDELibs4/KDELibs4Config.cmake
  
but it set KDELibs4_FOUND to FALSE so package KDELibs4 is considered
to be NOT FOUND.  Reason given by package:

The following imported targets are referenced, but are missing:
KF5::KDE4Attic
 
 KDELibs4Config.cmake includes KDELibs4LibraryTargets.cmake.
 This file contains exported targets for all not yet separated libraries of
 kdelibs, e.g. KDE4Support.
 kde4support links against kde4attic.
 When exporting the targets, cmake puts the dependency information into the
 file containing the exported targets (KDELibs4LibraryTargets.cmake). So
 kde4support depends on kde4attic.
 To make sure everything works once this export-file has been imported again
 by a using project (plasma), cmake puts in a check that all targets exist,
 which are dependencies of targets exported into this file, i.e. it checks
 whether the target KF5::KDE4Attic exists, since it is needed by the
 target for the kde4support library.
 Here it fails then.
 
 You can have a look into these files, they are more or less fully
 commented.
 
 What to do...
 
 So, kde4support depends on a lot of stuff in kdelibs.
 Some libs in kdelibs still depend on kde4support (at least last week this
 still was the case). That's why kde4support is still not installed
 separately.
 
 So the KDE4Attic targets needs to exist before KDELibs4 is searched.
 
  Adding KDE4Attic to the KF5 modules doesn't help, what to do?
 
 What exactly did you do ?
 
 If you add KDE4Attic to the list of known frameworks in
 extra-cmake-modules, and add it to the find_package(KF5  ) call as a
 needed component, it should work.


No, won't work.
kde4support depends on kde4attic, kde4attic depends e.g. on kdeui and kdecore.
So there are cyclic dependencies.
The kde4attic targets must not yet be exported into a separate file, but must 
still stay in the KDE4LibraryTargets.cmake file.

The attached dot file shows the dependencies of the KDE4Attic library.
You can generate such files by running cmake on a configured build dir:
$ cmake --graphviz=kdelibs.dot  .

Alex
digraph GG {
node [
  fontsize = 12
];
node246 [ label=KDE4Attic shape=polygon];
node477 [ label=Qt5::Widgets shape=ellipse];
node246 - node477 // KDE4Attic - Qt5::Widgets
node509 [ label=Qt5::PrintSupport shape=ellipse];
node246 - node509 // KDE4Attic - Qt5::PrintSupport
node330 [ label=kdeui shape=polygon];
node246 - node330 // KDE4Attic - kdeui
node31 [ label=ItemModels shape=polygon];
node330 - node31 // kdeui - ItemModels
node479 [ label=Qt5::Core shape=ellipse];
node31 - node479 // ItemModels - Qt5::Core
node140 [ label=SonnetUi shape=polygon];
node330 - node140 // kdeui - SonnetUi
node140 - node477 // SonnetUi - Qt5::Widgets
node136 [ label=SonnetCore shape=polygon];
node140 - node136 // SonnetUi - SonnetCore
node136 - node479 // SonnetCore - Qt5::Core
node330 - node136 // kdeui - SonnetCore
node146 [ label=KAuth shape=polygon];
node330 - node146 // kdeui - KAuth
node146 - node477 // KAuth - Qt5::Widgets
node486 [ label=Qt5::DBus shape=ellipse];
node146 - node486 // KAuth - Qt5::DBus
node90 [ label=KCoreAddons shape=polygon];
node146 - node90 // KAuth - KCoreAddons
node90 - node479 // KCoreAddons - Qt5::Core
node487 [ label=/usr/lib/libfam.so shape=ellipse];
node90 - node487 // KCoreAddons - /usr/lib/libfam.so
node29 [ label=kdeqt5staging shape=polygon];
node90 - node29 // KCoreAddons - kdeqt5staging
node29 - node477 // kdeqt5staging - Qt5::Widgets
node488 [ label=pthread shape=ellipse];
node90 - node488 // KCoreAddons - pthread
node224 [ label=KGuiAddons shape=polygon];
node330 - node224 // kdeui - KGuiAddons
node511 [ label=Qt5::Gui shape=ellipse];
node224 - node511 // KGuiAddons - Qt5::Gui
node227 [ label=KWidgets shape=polygon];
node330 - node227 // kdeui - KWidgets
node494 [ label=/usr/lib/libSM.so shape=ellipse];
node227 - node494 // KWidgets - /usr/lib/libSM.so
node495 [ label=/usr/lib/libICE.so shape=ellipse];
node227 - node495 // KWidgets - /usr/lib/libICE.so
node496 [ label=/usr/lib/libX11.so shape=ellipse];
node227 - node496 // KWidgets - /usr/lib/libX11.so
node490 [ label=/usr/lib/libXext.so shape=ellipse];
node227 - node490 // KWidgets - 

Re: cmake problems in KDELibs4Config

2013-07-24 Thread Sebastian Kügler
Hi Alex,

On Wednesday, July 24, 2013 22:27:46 Alexander Neundorf wrote:
 On Wednesday 24 July 2013, Alexander Neundorf wrote:
  What to do...
 
  So, kde4support depends on a lot of stuff in kdelibs.
  Some libs in kdelibs still depend on kde4support (at least last week this
  still was the case). That's why kde4support is still not installed
  separately.
 
  So the KDE4Attic targets needs to exist before KDELibs4 is searched.
 
   Adding KDE4Attic to the KF5 modules doesn't help, what to do?
 
  What exactly did you do ?

I added KDE4Attic in the find_package(KF5... call in plasma-
framework/CMakeLists.txt). That yields a can't find KDE4Attic.

  If you add KDE4Attic to the list of known frameworks in
  extra-cmake-modules, and add it to the find_package(KF5  ) call as a
  needed component, it should work.
 
 No, won't work.
 kde4support depends on kde4attic, kde4attic depends e.g. on kdeui and
 kdecore. So there are cyclic dependencies.
 The kde4attic targets must not yet be exported into a separate file, but
 must  still stay in the KDE4LibraryTargets.cmake file.

I don't see where and how to add it there, tried a few combinations, but I'm 
very much in the dark how these things work (your explanations help a bit, so 
thanks for that!), and what exactly I need to add, in which order, making it 
quite cumbersome (and so far without success).

I understand that I should change CreateKDELibsDependenciesFile.cmake then, to 
include KDE4_kde4attic? You say the KDE4Attic files must not be exported, I do 
have cmake/KDE4Attic installed along with all the other frameworks, so that's 
wrong then? OTOH, if it's not installed, plasma-framework/CMakeLists.txt will 
not be able to find it. (And if it's installed, it's still not found -- that's 
probably what you're hinting at.)

People *really* need to build also plasma-framework before committing such 
changes to kdelibs[frameworks]. At this point, I'm spending half of my time 
just picking up build breakage from others. I'm having a really hard time 
catching up, plasma-framework hasn't built once, this entire week, and it's 
blocking people from contributing.

 The attached dot file shows the dependencies of the KDE4Attic library.
 You can generate such files by running cmake on a configured build dir:
 $ cmake --graphviz=kdelibs.dot  .

Thanks for your help so far,
-- 
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: cmake problems in KDELibs4Config

2013-07-24 Thread Kevin Ottens
On Wednesday 24 July 2013 22:27:46 Alexander Neundorf wrote:
 On Wednesday 24 July 2013, Alexander Neundorf wrote:
  If you add KDE4Attic to the list of known frameworks in
  extra-cmake-modules, and add it to the find_package(KF5  ) call as a
  needed component, it should work.
 
 No, won't work.
 kde4support depends on kde4attic, kde4attic depends e.g. on kdeui and
 kdecore. So there are cyclic dependencies.
 The kde4attic targets must not yet be exported into a separate file, but
 must still stay in the KDE4LibraryTargets.cmake file.

Yep, been following that path the whole day yesterday. I'm trying to solve the 
cyclic dependencies still... Almost there, I hope it'll be solved by the end 
of today, stay tuned.

Cheers.
-- 
Kévin Ottens, http://ervin.ipsquad.net

Sponsored by BlueSystems and KDAB to work on KDE Frameworks


signature.asc
Description: This is a digitally signed message part.
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel