This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[solved] Compiling plasmoids from kdesvn e.g. weather

Tags: None
(comma "," separated)
User avatar
dcrabs
Registered Member
Posts
81
Karma
0
OS
Hi everyone
I try to compile the weather plasmoid which is in kdereview now. Unfortunately there are two problems. The first is related to CMakeLists.txt:

Code: Select all
david@farnsworth ~/build/kde4/weather % cmake CMAKE_INSTALL_PREFIX=/usr .
-- The C compiler identification is GNU                                 
-- The CXX compiler identification is GNU                               
-- Check for working C compiler: /usr/bin/gcc                           
-- Check for working C compiler: /usr/bin/gcc -- works                   
-- Detecting C compiler ABI info                                         
-- Detecting C compiler ABI info - done                                 
-- Check for working CXX compiler: /usr/bin/c++                         
-- Check for working CXX compiler: /usr/bin/c++ -- works                 
-- Detecting CXX compiler ABI info                                       
-- Detecting CXX compiler ABI info - done
CMake Error at CMakeLists.txt:8 (kde4_add_ui_files):
  Unknown CMake command "kde4_add_ui_files"

That happens with a couple of plasmoids I tried from svn repositories. Usually I was able to solve it by inserting the following in CMakeLists.txt:
Code: Select all
# Find the required Libaries
find_package(KDE4 REQUIRED)
include(KDE4Defaults)

Why does it happen with so many plasmoids?
The second problem is that the weather plasmoid does not compile here. Since it is in kdereview I excpected it to be easier.
Here is what I get. It is especially strange since nothing else (qt4/kde4 related) had an error like this.
Code: Select all
david@farnsworth ~/build/kde4/weather % make
[ 14%] Building CXX object CMakeFiles/plasma_applet_weather.dir/weatherapplet.o
/home/david/build/kde4/weather/weatherapplet.cpp:22:21: error: QCheckBox: No such file or directory                                           
/home/david/build/kde4/weather/weatherapplet.cpp:23:23: error: KMessageBox: No such file or directory                                         
/home/david/build/kde4/weather/weatherapplet.cpp:24:16: error: KRun: No such file or directory                                               
/home/david/build/kde4/weather/weatherapplet.cpp:25:19: error: KDialog: No such file or directory                                             
/home/david/build/kde4/weather/weatherapplet.cpp:26:25: error: KConfigDialog: No such file or directory                                       
/home/david/build/kde4/weather/weatherapplet.cpp:27:19: error: KLocale: No such file or directory                                             
/home/david/build/kde4/weather/weatherapplet.cpp:28:30: error: QStandardItemModel: No such file or directory                                 
/home/david/build/kde4/weather/weatherapplet.cpp:29:23: error: QPushButton: No such file or directory                                         
/home/david/build/kde4/weather/weatherapplet.cpp:30:20: error: QPainter: No such file or directory                                           
/home/david/build/kde4/weather/weatherapplet.cpp:39:33: error: QGraphicsLinearLayout: No such file or directory                               
/home/david/build/kde4/weather/weatherapplet.cpp:40:31: error: QGraphicsGridLayout: No such file or directory                                 
/home/david/build/kde4/weather/weatherapplet.cpp: In member function ‘virtual QGraphicsWidget* WeatherApplet::graphicsWidget()’:             
/home/david/build/kde4/weather/weatherapplet.cpp:108: error: invalid use of incomplete type ‘struct QGraphicsGridLayout’                     
/home/david/build/kde4/weather/weatherapplet.h:35: error: forward declaration of ‘struct QGraphicsGridLayout’                                 
/home/david/build/kde4/weather/weatherapplet.cpp:109: error: invalid use of incomplete type ‘struct QGraphicsGridLayout’                     
/home/david/build/kde4/weather/weatherapplet.h:35: error: forward declaration of ‘struct QGraphicsGridLayout’                                 
/home/david/build/kde4/weather/weatherapplet.cpp:110: error: invalid use of incomplete type ‘struct QGraphicsGridLayout’                     
/home/david/build/kde4/weather/weatherapplet.h:35: error: forward declaration of ‘struct QGraphicsGridLayout’                                 
/home/david/build/kde4/weather/weatherapplet.cpp:113: error: invalid use of incomplete type ‘struct QGraphicsGridLayout’                     
/home/david/build/kde4/weather/weatherapplet.h:35: error: forward declaration of ‘struct QGraphicsGridLayout’                                 
/home/david/build/kde4/weather/weatherapplet.cpp:114: error: invalid use of incomplete type ‘struct QGraphicsGridLayout’                     
/home/david/build/kde4/weather/weatherapplet.h:35: error: forward declaration of ‘struct QGraphicsGridLayout’                                 
/home/david/build/kde4/weather/weatherapplet.cpp:115: error: invalid use of incomplete type ‘struct QGraphicsGridLayout’                     
/home/david/build/kde4/weather/weatherapplet.h:35: error: forward declaration of ‘struct QGraphicsGridLayout’                                 
/home/david/build/kde4/weather/weatherapplet.cpp:117: error: invalid use of incomplete type ‘struct QGraphicsGridLayout’                     
/home/david/build/kde4/weather/weatherapplet.h:35: error: forward declaration of ‘struct QGraphicsGridLayout’                                 
/home/david/build/kde4/weather/weatherapplet.cpp:118: error: invalid use of incomplete type ‘struct QGraphicsGridLayout’                     
/home/david/build/kde4/weather/weatherapplet.h:35: error: forward declaration of ‘struct QGraphicsGridLayout’
[...]

It goes on like this but shows alway the same messages.
I use Archlinux with kde4 trunk (4.1.86) and qt 4.4.3. Maybe there is an other variable missing from CMakeLists.txt. Do you have any idea how to fix this?
Thanks,
David

Last edited by dcrabs on Sun Jan 04, 2009 4:54 pm, edited 1 time in total.


dcrabs, proud to be a member of KDE forums since 2008-Oct.
User avatar
GeneralZod
KDE Developer
Posts
77
Karma
1
OS
Hope you don't mind if I just copy and paste some IRC logs: somebody asked exactly the same question earlier today :)

Code: Select all
11:29]  i tried to compile the new weather plasmoid in kdereview, but it keeps telling me :
[11:29]  ian| has joined this channel (n=ian@dslb-088-077-083-051.pools.arcor-ip.net).
[11:30]  unown cmake command "kde4_add_ui_files"
[11:31]  so i added "lfind_package(KDE4 REQUIRED)" to the cmake file
[11:31]  no
[11:31]  ademmer: You need to checkout all of kdereview and run cmake from the top level of that, if you haven't done so.
[11:31]  you have to run cmake (that does not mean "compiling all") from the top-level of kdereview
[11:31]  ademmer: Then you can compile and install individual components.
[11:31]  pinotree: ah, i see, I'll try

...


[11:34]  pinotree, SSJ_GZ: that worked quite well! could anyone give a very short explanation why i need to check out a whole dir? i'd like to understand wthe reasons for this
[11:34] --> Scorcerer has joined this channel (n=Scorek@77.87.120.128).
[11:34] * SSJ_GZ defers to pinotree :)
[11:35]  ademmer: kde never supported bulding random subpieces of a module
[11:36]  pinotree: i am new to kde development but i will definetely dig into this
[11:36]  you configure from the top level (that does NOT mean having the whole stuff, you can checkout pieces in a smart way), and then `make` in the subdirectories you want
[11:36]  thx for helping, plasmoid's up and running


ssj-gz.blogspot.com: KDE4Daily, Konqueror4 Restoration
User avatar
dcrabs
Registered Member
Posts
81
Karma
0
OS
GeneralZod wrote:Hope you don't mind if I just copy and paste some IRC logs: somebody asked exactly the same question earlier today :)

[...]

Thanks, that explains it. It is a bit of mess now but cmake works now.
Unfortunately it still does not compile. Now I get this:
Code: Select all
[ 57%] Building CXX object plasma/applets/weather/CMakeFiles/plasma_applet_weather.dir/plasma_applet_weather_automoc.o
[ 71%] Building CXX object plasma/applets/weather/CMakeFiles/plasma_applet_weather.dir/weatherapplet.o
/home/david/build/kde4/kdereview/plasma/applets/weather/weatherapplet.cpp: In member function ‘void WeatherApplet::toolTipAboutToShow()’:
/home/david/build/kde4/kdereview/plasma/applets/weather/weatherapplet.cpp:204: error: ‘isPopupShowing’ was not declared in this scope
make[2]: *** [plasma/applets/weather/CMakeFiles/plasma_applet_weather.dir/weatherapplet.o] Error 1
make[1]: *** [plasma/applets/weather/CMakeFiles/plasma_applet_weather.dir/all] Error 2
make: *** [all] Error 2


dcrabs, proud to be a member of KDE forums since 2008-Oct.
User avatar
GeneralZod
KDE Developer
Posts
77
Karma
1
OS
dcrabs wrote:
Code: Select all
 error: ‘isPopupShowing’ was not declared in this scope



You'll need kdelibs trunk from within the last 7 days.


ssj-gz.blogspot.com: KDE4Daily, Konqueror4 Restoration
User avatar
dcrabs
Registered Member
Posts
81
Karma
0
OS
GeneralZod wrote:
dcrabs wrote:
Code: Select all
 error: ‘isPopupShowing’ was not declared in this scope



You'll need kdelibs trunk from within the last 7 days.


Thanks, I try to updadate. Didn't expect that. :)

Last edited by dcrabs on Sun Jan 04, 2009 4:53 pm, edited 1 time in total.


dcrabs, proud to be a member of KDE forums since 2008-Oct.
User avatar
steveire
KDE Developer
Posts
8
Karma
0
OS
Code: Select all
 you configure from the top level (that does NOT mean having the whole stuff, you can checkout pieces in a smart way), and then `make` in the subdirectories you want


By the way, the smart way pino is talking about is to use svn co -N kdereview, then svn up plasmoidname, then cmake in the kdereview directory, then make. That will build only the plasmoid.

http://techbase.kde.org/Getting_Started ... f_a_module


steveire, proud to be a member of KDE forums since 2008-Oct.
User avatar
dcrabs
Registered Member
Posts
81
Karma
0
OS
steveire wrote:
Code: Select all
 you configure from the top level (that does NOT mean having the whole stuff, you can checkout pieces in a smart way), and then `make` in the subdirectories you want


By the way, the smart way pino is talking about is to use svn co -N kdereview, then svn up plasmoidname, then cmake in the kdereview directory, then make. That will build only the plasmoid.

http://techbase.kde.org/Getting_Started ... f_a_module


Thanks for the info. But how am I supposed to do that with plasmoids in playground? Where should I start there. For example when I checkout the plasmoid base folder I get plenty of errors because of missing subdirectories. But I don't think I need for example the "stockwidget" plasmoid when I want to compile something else.


dcrabs, proud to be a member of KDE forums since 2008-Oct.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
With Playground, a quick hack would be to edit the CMakeLists.txt file in the plasmoids directory and comment out ( "#" ) the ones which cause errors.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
dcrabs
Registered Member
Posts
81
Karma
0
OS
bcooksley wrote:With Playground, a quick hack would be to edit the CMakeLists.txt file in the plasmoids directory and comment out ( "#" ) the ones which cause errors.


Ah I see. :) I tried that and configuring works, thanks. networkmanager is still not compiling but that's an other story.


dcrabs, proud to be a member of KDE forums since 2008-Oct.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
EDIT: Just looked at the network manager applet plasmoid thread....

Last edited by bcooksley on Thu Jan 08, 2009 7:22 am, edited 1 time in total.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Google [Bot], Sogou [Bot]