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

debug build Koffice

Tags: None
(comma "," separated)
xyfix
Registered Member
Posts
110
Karma
0

debug build Koffice

Mon Oct 05, 2009 12:03 pm
hi guys,

I have two questions about building koffice on linux. I downloaded the source package and ran a configure --enable-debug=full on the top directory and it made a few Makefiles in several directories included the top one. Since I'm only interested in kword ( for now) and I only run the Makefile inside the kword directory, I expect the kword release and debug build to be located here. But I only see a release version of it and on top of that the dependancies aren't build correctly ( aren't build at all) I have to manually cd to the directory and run an make for every lib file.
Koffice 1.6.3 on linux fedora 10.
User avatar
LukasT.dev
KDE Developer
Posts
209
Karma
1
OS

Re: debug build Koffice

Mon Oct 05, 2009 12:20 pm
If you want to have debug build but in mode RelWithDebInfo, you can do this to install debug libs in Fedora:

su -
debuginfo-install koffice-kword

Just an option not to compile it.. :)


Daylight is coming...
Krita developer | http://lukast.mediablog.sk/log
xyfix
Registered Member
Posts
110
Karma
0

Re: debug build Koffice

Mon Oct 05, 2009 2:30 pm
LukasT,

thanks for replying, but I forgot to mention that I've already installed
koffice-debuginfo-1.6.3-24.20090306svn.fc10.i386 and unfortunately the command you supplied did not succeed. ( see output )

[admin@lorentz:~/koffice-1.6.3]$sudo debuginfo-install koffice-word
[sudo] password for admin:
Loaded plugins: refresh-packagekit
fedora | 2.8 kB 00:00
updates | 3.4 kB 00:00
enabling fedora-debuginfo
Reading repository metadata in from local files
fedora-debuginfo | 2.2 kB 00:00
fedora-debuginfo/primary_db | 1.0 MB 00:02
enabling updates-debuginfo
Reading repository metadata in from local files
updates-debuginfo | 2.6 kB 00:00
updates-debuginfo/primary_db | 554 kB 00:01
No debuginfo packages available to install
User avatar
LukasT.dev
KDE Developer
Posts
209
Karma
1
OS

Re: debug build Koffice

Mon Oct 05, 2009 2:44 pm
If you already have debuginfo, then you don't need anything else.

Why are you trying to compile KOffice 1.6 in debugfull? What is your goal?


Daylight is coming...
Krita developer | http://lukast.mediablog.sk/log
xyfix
Registered Member
Posts
110
Karma
0

Re: debug build Koffice

Mon Oct 05, 2009 3:23 pm
well, actually I'm not trying to build the whole koffice suite but just kword. I want to debug a kword session and see how the code flows, because I need to do something simular. I always thought that it would be straight forward 1. configure with flags 2. make 3. debug a session.
:|
User avatar
cyrille
Moderator
Posts
110
Karma
1

Re: debug build Koffice

Mon Oct 05, 2009 4:31 pm
Why don't you do that with kword 2.x ? You can find build instructions here: http://wiki.koffice.org/index.php?title ... ng_KOffice as well as instructions on how to compile only one specific application. (I think there was a similar configure option for 1.6, but I don't remember what it was)


Cyrille Berger
Krita developer and Calligra release coordinator
blog
xyfix
Registered Member
Posts
110
Karma
0

Re: debug build Koffice

Tue Oct 06, 2009 7:33 am
thank you for the advice. I followed it exactly like on the site is stated, but this is what I got

Code: Select all
kword(9898)/koffice (lib komain) KoDocument::readNativeService: "kwordpart.desktop"  found.
kword(9898)/koffice (lib komain) KoDocumentEntry::createDoc: "QLibrary::load_sys: Cannot load /home/admin/.kde4/lib/libkwordpart.so (libkwordprivate.so.5: cannot open shared object file: No such file or directory)"


the libkwordpart.so is in my /home/admin/.kde4/lib/ directory and I added this directory to the LD_LIBRARY_PATH in the kword-shell script. Why can't it be found, it's there! :/


Edit:I did not install it yet, but that should be a problem......I guess

Last edited by xyfix on Tue Oct 06, 2009 7:45 am, edited 2 times in total.
User avatar
cyrille
Moderator
Posts
110
Karma
1

Re: debug build Koffice

Tue Oct 06, 2009 7:43 am
you also need to set KDEDIRS and run kbuildsycoca4: http://wiki.koffice.org/index.php?title ... plications


Cyrille Berger
Krita developer and Calligra release coordinator
blog
xyfix
Registered Member
Posts
110
Karma
0

Re: debug build Koffice

Tue Oct 06, 2009 9:54 am
OK, I'm following the link exactly now on a open Suse machine ( I have also a fedora 10 machine). But this "zypper si -d koffice-devel" does not work.

Code: Select all
> zypper si -d koffice-devel

Reading installed packages...
Loading repository data...
Source package 'koffice-devel' not found.
Resolving package dependencies...
Nothing to do.


I did a ccmake . and turned of most of the packages ( except kword and a few others) and I supplied the "CMAKE_BUILD_TYPE" option with "Debug Release".

Again I didn't install ( so no make install yet ), but then again I'm guessing that I should not have to since I want to change the code and build it again and test it. So installing it won't be necessary.....am I right??

But still the error from above and were is my debug version ?

update: "ldd kword" tells me that all the library files are found
xyfix
Registered Member
Posts
110
Karma
0

Re: debug build Koffice

Tue Oct 06, 2009 11:29 am
output of "strace kword"

Code: Select all
open("/home/admin/koffice-2.0.2/lib/libkwordprivate.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/admin/koffice-2.0.2/lib", 0xbfe12e08) = -1 ENOENT (No such file or directory)
open("/usr/local/Trolltech/Qt-4.5.1/lib/libkwordprivate.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 16
fstat64(16, {st_mode=S_IFREG|0644, st_size=140246, ...}) = 0
mmap2(NULL, 140246, PROT_READ, MAP_PRIVATE, 16, 0) = 0xb56b6000
close(16)                               = 0
open("/lib/libkwordprivate.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libkwordprivate.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libkwordprivate.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
munmap(0xb56b6000, 140246)              = 0
munmap(0xb4100000, 8220)                = 0
stat64("/home/admin/.kde4/lib/libkwordpart.so", {st_mode=S_IFREG|0755, st_size=93497, ...}) = 0
write(2, "kword(31237)/koffice (lib komain"..., 207kword(31237)/koffice (lib komain) KoDocumentEntry::createDoc: "Cannot load library /home/admin/.kde4/lib/libkwordpart.so: (libkwordprivate.so.5: cannot open shared object file: No such file or directory)"
) = 207



Where is this file and why doesn't it get created when I do a "make -j 8 kword"?
xyfix
Registered Member
Posts
110
Karma
0

Re: debug build Koffice

Tue Oct 06, 2009 12:28 pm
OK, it seemed that the libkwordprivate.so.5 was build when I did a "make -j 8 kword" in the top build directory. So I did a make in the kword directory, which did result in a libkwordprivate.so.5 in the $HOME/build/lib directory. But now I get

Code: Select all
~/koffice-2.0/build/kword/part ]$ ./kword.shell
kword(12352)/koffice (lib komain) KoDocument::readNativeService: "kwordpart.desktop"  found.
kword: symbol lookup error: /home/admin/koffice-2.0/build/lib/./libkomain.so.5: undefined symbol: _Z13qFlagLocationPKc


and I get a fatal error when running kword

Code: Select all
This backtrace appears to be of no use.
This is probably because your packages are built in a way which prevents creation of proper backtraces, or the stack frame was seriously corrupted in the crash.

[?1034h[Thread debugging using libthread_db enabled]
0xffffe430 in __kernel_vsyscall ()
[Current thread is 1 (Thread 0xb5a66700 (LWP 12353))]

Thread 1 (Thread 0xb5a66700 (LWP 12353)):
#0  0xffffe430 in __kernel_vsyscall ()
#1  0xb675de60 in nanosleep () from /lib/libc.so.6
#2  0xb675dc6e in sleep () from /lib/libc.so.6
#3  0xb710661a in ?? () from /usr/lib/libkdeui.so.5
#4  0xb710704c in KCrash::defaultCrashHandler(int) () from /usr/lib/libkdeui.so.5
#5  <signal handler called>
#6  QString::operator= (this=0xbfacb378, other=@0x35) at tools/qstring.cpp:1129
#7  0xb71bcb33 in ?? () from /usr/lib/libkdeui.so.5
#8  0xb71ac078 in KXMLGUIClient::findMostRecentXMLFile(QStringList const&, QString&) () from /usr/lib/libkdeui.so.5
#9  0xb6e70972 in KoMainWindow::KoMainWindow(KComponentData const&) () from /home/admin/koffice-2.0/build/lib/libkomain.so.5
#10 0xb6e7848d in KoApplication::start() () from /home/admin/koffice-2.0/build/lib/libkomain.so.5
#11 0xb80b5e23 in kdemain () from /home/admin/koffice-2.0/build/lib/libkdeinit4_kword.so
#12 0x080487e6 in main ()


:confused:
xyfix
Registered Member
Posts
110
Karma
0

Re: debug build Koffice

Tue Oct 06, 2009 1:32 pm
EUREKA !! it works :D . I did an install and added the install directory to the KDEDIRS environment variable and ran kbuildsycoca4. But one question though : how do I get a debug version with debug flags?

thank you, guys.
xyfix
Registered Member
Posts
110
Karma
0

Re: debug build Koffice

Tue Oct 06, 2009 1:48 pm
With the help of the ccmake tool I am now able to get a debug build, just put Debug after the Build type.
User avatar
cyrille
Moderator
Posts
110
Karma
1

Re: debug build Koffice

Tue Oct 06, 2009 1:59 pm
Great ! Indeed the debug option is missing from the wiki, I am going to add that. Have fun with kword ;)


Cyrille Berger
Krita developer and Calligra release coordinator
blog
xyfix
Registered Member
Posts
110
Karma
0

Re: debug build Koffice

Tue Oct 06, 2009 8:13 pm
thanks cyrille for your help.


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan