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

[SOLVED] Need help building

Tags: None
(comma "," separated)
User avatar
Timmer
Registered Member
Posts
23
Karma
0
OS

[SOLVED] Need help building

Thu Mar 19, 2009 12:00 am
Hi. There's a little bug with the fuzzy clock width in panels, and I figured it'd be easy to fix, so I'm using it as something to cut my teeth on.

I think I fixed it, but now I can't figure out how to build it to find out.

I untared the kdeplasma-addons file, and then after editing the code, ran
Code: Select all
cmake

in the fuzzy-clock directory.

Since it's the kde source package, it has what I assume to be the right CMakeLists.txt file, but cmake is failing with
Code: Select all
CMake Error at CMakeLists.txt:5 (kde4_add_ui_files):                                                                       
  Unknown CMake command "kde4_add_ui_files".


I looked at the cmake tutorials in the Techbase tutorials but they didn't really seem to indicate that I was doing something terribly wrong.

Can someone help me out? If you need more information, just ask.


Timmer, proud to be a member of KDE forums since 2008-Nov.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

[SOLVED] Need help building

Thu Mar 19, 2009 7:19 am
KDE modules don't support building a single subdirectory unfortunately. You will need to checkout the entire module, make your changes then configure it in the top level directory:

Code: Select all
mkdir build
cd build
cmake ..
cd normal/path/to/what/you/changed
make install


Example:
I made changes in ~/kdemodule/application/src/
I would create "build" in ~/kdemodule and run cmake there,
Then I would change to ~/kdemodule/build/application/src/ and perform "make" there

Hope this helps


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Timmer
Registered Member
Posts
23
Karma
0
OS

[SOLVED] Need help building

Thu Mar 19, 2009 11:42 am
Thanks. I'll test it out tonight. I managed to compile it last night by finagling portage but that method was way way too difficult. I wouldn't want to use it for debugging my work.


Timmer, proud to be a member of KDE forums since 2008-Nov.
User avatar
Timmer
Registered Member
Posts
23
Karma
0
OS

[SOLVED] Need help building

Fri Mar 20, 2009 4:46 am
Thanks. The cmake worked. But now make is failing. It compiles fine, but fails at the linking stage:

Code: Select all
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lKDE4Workspace__plasmaclock
collect2: ld returned 1 exit status


(If some one could point me to a tutorial perhaps, instead of having to come back to the forum, that'd be totally fine)


Timmer, proud to be a member of KDE forums since 2008-Nov.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

[SOLVED] Need help building

Fri Mar 20, 2009 5:53 am
Which svn link did you use to checkout from?
svn://anonsvn.kde.org/trunk/KDE/kdeplasma-addons/


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Timmer
Registered Member
Posts
23
Karma
0
OS

[SOLVED] Need help building

Fri Mar 20, 2009 11:28 am
Mmm. I didn't. Since I use Gentoo, I just used the 4.2.1 sources that were already in my portage distfiles.

I take it I should be using svn trunk sources instead?


Timmer, proud to be a member of KDE forums since 2008-Nov.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

[SOLVED] Need help building

Fri Mar 20, 2009 12:00 pm
That should be fine then. I have never seen CMake have a linker error however. Where is KDE 4.2 installed on your system? Is the library directory inside that $KDEDIR/libs/ contained in /etc/ld.so.conf?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Timmer
Registered Member
Posts
23
Karma
0
OS

[SOLVED] Need help building

Fri Mar 20, 2009 10:35 pm
KDEDIR is /usr/ i think, since all the programs are in /usr/bin, and all the libraries appear to be in /usr/lib and /usr/lib/kde4. I added the latter to /etc/ld.so.conf, but with no effect. The former was already there, of course.

I think the likely candidates for a match are libplasmaclock.so, libplasmaclock.so.4, or libplasmaclock.so.4.2.0 which are all in /usr/lib

Is there some way I can figure out where it's looking for the library?


Timmer, proud to be a member of KDE forums since 2008-Nov.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

[SOLVED] Need help building

Fri Mar 20, 2009 10:45 pm
Is Plasma clock present under /usr/lib64/? You are using the 64bit versions of gcc and ld.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Timmer
Registered Member
Posts
23
Karma
0
OS

[SOLVED] Need help building

Sat Mar 21, 2009 2:51 am
lib is a symlink to lib64, so yes.


Timmer, proud to be a member of KDE forums since 2008-Nov.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

[SOLVED] Need help building

Sat Mar 21, 2009 4:39 am
Can you please execute make with "VERBOSE=1" and paste the output here?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Timmer
Registered Member
Posts
23
Karma
0
OS

[SOLVED] Need help building

Sat Mar 21, 2009 3:39 pm
Code: Select all
VERBOSE=1 make
cd /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build && /usr/bin/cmake -H/home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1 -B/home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build --check-build-system CMakeFiles/Makefile.cmake 0 
cd /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build && /usr/bin/cmake -E cmake_progress_start /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build/CMakeFiles /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build/applets/fuzzy-clock/CMakeFiles/progress.make                                                                                                     
cd /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build && make -f CMakeFiles/Makefile2 applets/fuzzy-clock/all         
make[1]: Entering directory `/home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build'                                     
make -f applets/fuzzy-clock/CMakeFiles/plasma_applet_fuzzy_clock_automoc.dir/build.make applets/fuzzy-clock/CMakeFiles/plasma_applet_fuzzy_clock_automoc.dir/depend                                                                                                     
make[2]: Entering directory `/home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build'                                     
cd /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1 /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/applets/fuzzy-clock /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build/applets/fuzzy-clock /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build/applets/fuzzy-clock/CMakeFiles/plasma_applet_fuzzy_clock_automoc.dir/DependInfo.cmake --color=                                                                                             
make[2]: Leaving directory `/home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build'                                       
make -f applets/fuzzy-clock/CMakeFiles/plasma_applet_fuzzy_clock_automoc.dir/build.make applets/fuzzy-clock/CMakeFiles/plasma_applet_fuzzy_clock_automoc.dir/build                                                                                                     
make[2]: Entering directory `/home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build'                                     
cd /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build/applets/fuzzy-clock && /usr/bin/automoc4 /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build/applets/fuzzy-clock/plasma_applet_fuzzy_clock_automoc.cpp /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/applets/fuzzy-clock /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build/applets/fuzzy-clock /usr/bin/moc /usr/bin/cmake                                                                                                         
make[2]: Leaving directory `/home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build'                                       
/usr/bin/cmake -E cmake_progress_report /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build/CMakeFiles                 
[  0%] Built target plasma_applet_fuzzy_clock_automoc                                                                               
make -f applets/fuzzy-clock/CMakeFiles/plasma_applet_fuzzy_clock.dir/build.make applets/fuzzy-clock/CMakeFiles/plasma_applet_fuzzy_clock.dir/depend                                                                                                                     
make[2]: Entering directory `/home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build'                                     
cd /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1 /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/applets/fuzzy-clock /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build/applets/fuzzy-clock /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build/applets/fuzzy-clock/CMakeFiles/plasma_applet_fuzzy_clock.dir/DependInfo.cmake --color=                                                                                                     
make[2]: Leaving directory `/home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build'                                       
make -f applets/fuzzy-clock/CMakeFiles/plasma_applet_fuzzy_clock.dir/build.make applets/fuzzy-clock/CMakeFiles/plasma_applet_fuzzy_clock.dir/build                                                                                                                     
make[2]: Entering directory `/home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build'                                     
Linking CXX shared module ../../lib/plasma_applet_fuzzy_clock.so                                                                   
cd /home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build/applets/fuzzy-clock && /usr/bin/cmake -E cmake_link_script CMakeFiles/plasma_applet_fuzzy_clock.dir/link.txt --verbose=1                                                                           
/usr/bin/c++  -fPIC  -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden -O2 -g -Wl,--enable-new-dtags -Wl,--fatal-warnings -Wl,--no-undefined -lc  -shared -Wl,-soname,plasma_applet_fuzzy_clock.so -o ../../lib/plasma_applet_fuzzy_clock.so CMakeFiles/plasma_applet_fuzzy_clock.dir/plasma_applet_fuzzy_clock_automoc.o CMakeFiles/plasma_applet_fuzzy_clock.dir/fuzzyClock.o -L/usr/lib64/qt4 -lKDE4Workspace__plasmaclock /usr/lib64/libplasma.so.3.0.0 /usr/lib64/libkdeui.so.5.2.0 /usr/lib64/qt4/libQtSvg.so /usr/lib64/libkdecore.so.5.2.0 /usr/lib64/qt4/libQtDBus.so /usr/lib64/qt4/libQtCore.so -lpthread /usr/lib64/qt4/libQtGui.so -Wl,-rpath,/usr/lib64/qt4:::::::::::::::::
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lKDE4Workspace__plasmaclock
collect2: ld returned 1 exit status
make[2]: *** [lib/plasma_applet_fuzzy_clock.so] Error 1
make[2]: Leaving directory `/home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build'
make[1]: *** [applets/fuzzy-clock/CMakeFiles/plasma_applet_fuzzy_clock.dir/all] Error 2
make[1]: Leaving directory `/home/tim/Documents/Programming/KDE/kdeplasma-addons-4.2.1/build'
make: *** [all] Error 2


Timmer, proud to be a member of KDE forums since 2008-Nov.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

[SOLVED] Need help building

Sat Mar 21, 2009 7:21 pm
Try using this command instead:

/usr/bin/c++ -fPIC -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden -O2 -g -Wl,--enable-new-dtags -Wl,--fatal-warnings -Wl,--no-undefined -lc -shared -Wl,-soname,plasma_applet_fuzzy_clock.so -o ../../lib/plasma_applet_fuzzy_clock.so CMakeFiles/plasma_applet_fuzzy_clock.dir/plasma_applet_fuzzy_clock_automoc.o CMakeFiles/plasma_applet_fuzzy_clock.dir/fuzzyClock.o -L/usr/lib64/qt4 /usr/lib64/libplasmaclock.so /usr/lib64/libplasma.so.3.0.0 /usr/lib64/libkdeui.so.5.2.0 /usr/lib64/qt4/libQtSvg.so /usr/lib64/libkdecore.so.5.2.0 /usr/lib64/qt4/libQtDBus.so /usr/lib64/qt4/libQtCore.so -lpthread /usr/lib64/qt4/libQtGui.so -Wl,-rpath,/usr/lib64/qt4:::::::::::::::::


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Timmer
Registered Member
Posts
23
Karma
0
OS

[SOLVED] Need help building

Mon Mar 23, 2009 1:27 am
Ooh! I was just about to tell you what a resounding failure that was, because when I first looked at it, I thought you only removed the -lKDE4Workspace__plasmaclock bit, and that failed miserably. But then I copy and pasted, and it worked excellently.

So thanks! What did you do, why did it work, and how can I make it automatically generate that command in the future, so I don't have to go in and change that file every time?


Timmer, proud to be a member of KDE forums since 2008-Nov.
User avatar
Timmer
Registered Member
Posts
23
Karma
0
OS

[SOLVED] Need help building

Mon Mar 23, 2009 1:42 am
oh, I think I've figured it out...

You switched -lKDE4Workspace__plasmaclock to /usr/lib64/libplasmaclock.so

And it looks like that's called from CMakeLists.txt in the ${KDE4WORKSPACE_PLASMACLOCK_LIBRARY} variable, which must be misdefined somewhere.

So, I could either hard code it to the right value, or try and find the initial definition and fix it, correct?


Timmer, proud to be a member of KDE forums since 2008-Nov.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell