Bug 83334

Summary: KDevelop produces KOffice Part project that won't build
Product: [Developer tools] kdevplatform Reporter: Brad Hards <bradh>
Component: appwizardAssignee: Anne-Marie Mahfouf <annma>
Status: RESOLVED FIXED    
Severity: normal CC: marjan.mrak
Priority: NOR    
Version: 1.0.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Patch for the KOffice part template

Description Brad Hards 2004-06-14 03:48:54 UTC
Version:           3.0.90 (CVS) (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)
 Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --disable-libunwind-exceptions --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
OS:                Linux

I'm trying to build a KOffice Part using the standard KDevelop template. I've had a number of issues with getting it to install the template, which I think I have corrected (see commits at http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdevelop/languages/cpp/app_templates/kofficepart/kopart.kdevtemplate.diff?r1=1.5&r2=1.6&f=h and http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdevelop/languages/cpp/app_templates/kofficepart/kopart.kdevtemplate.diff?r1=1.4&r2=1.5&f=h)

Now it won't build, with a number of problems:

1. The Makefile.am uses SUBDIRS = $(TOPSUBDIRS), which breaks Unsermake.

2. The Makefile.am isn't passing $(QT_INCLUDES), and perhaps some other build-time magic, which leads to problems like:
source='/home/bradh/junkcode/test/src/test_part.cpp' object='test_part.lo' libtool=yes depfile='.deps/test_part.Plo' tmpdepfile='.deps/test_part.TPlo' depmode=gcc3 /bin/sh /home/bradh/junkcode/test/admin/depcomp /bin/sh ../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I/home/bradh/junkcode/test/src -I.. -I/usr/include/kde -I/usr/include/kde -I/usr/include/kde -I/usr/lib/kwmf -I/usr/lib/kwmf -I -I/usr/lib/qt-3.3/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -g3 -fno-inline -O0 -g3 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -c -o test_part.lo `test -f '/home/bradh/junkcode/test/src/test_part.cpp' || echo '/home/bradh/junkcode/test/src/'`/home/bradh/junkcode/test/src/test_part.cpp
In file included from /home/bradh/junkcode/test/src/test_part.h:9,
from /home/bradh/junkcode/test/src/test_part.cpp:6:
/usr/include/koDocument.h:27:22: qwmatrix.h: No such file or directory

3. There is something badly wrong in src/Makefile.am, which contains the line:
test_la_SOURCES = main.cpp
but there is no src/main.cpp

It looks like parts of the template have been updated, but perhaps not enough of it (or too much?). It should be simple to duplicate - just create a project based off the KOffice Part template and try to build it.
Comment 1 Anne-Marie Mahfouf 2005-12-30 02:09:58 UTC
Note: build all templates with unsermake for kdevelop 3.4 to see if they build.

I reassign that bug to myself!
Comment 2 Jeremy Lainé 2006-01-26 08:22:50 UTC
Created attachment 14392 [details]
Patch for the KOffice part template

Attached is a patch against KDevelop 3.3.0 that fixes the KOffice part
template.

Two fixes:

a/ add an (empty) implementation for initDoc, loadOasis, saveOasis (otherwise
you get an error upon instantiating the part)
b/ remove "-I$(interfacedir)" from $INCLUDES in Makefile.am (as $interfacedir
is empty this results in "-I")

Cheers,
Jeremy
Comment 3 Anne-Marie Mahfouf 2006-01-27 15:02:16 UTC
Hi Jeremy,

Thanks for the patch, it works! The only thing is that I cannot open the the project as there is no 'Blank Document" in the new KOffice start dialog (running the template against KOffice trunk here). Thus running the template leads to nothing... Not sure how to overcome this...

Anne-Marie
Comment 4 Jens Dagerbo 2007-01-14 02:16:43 UTC
*** Bug 123603 has been marked as a duplicate of this bug. ***
Comment 5 Andreas Pakulat 2007-11-30 19:26:39 UTC
Whoever comitted the patch forgot to close this bugreport.