Bug 117722 - kdelibs 3.5 fails to compile
Summary: kdelibs 3.5 fails to compile
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kspell (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Zack Rusin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-05 15:03 UTC by Patrizio Bassi
Modified: 2005-12-06 17:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrizio Bassi 2005-12-05 15:03:01 UTC
Version:            (using KDE KDE 3.5.0)
Installed from:    Gentoo Packages
Compiler:          gcc 3.4.4 
OS:                Linux

kdelibs 3.5 fails if hspell 0.7 is installed.

/bin/sh ../../../libtool --silent --tag=CXX --mode=compile i686-pc-linux-gnu-g++  
-DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../dcop -I../../../kdecore -I../../../kio/kssl -I../../../kjs   
-I../../../kspell2 -I../../.. -I../../../dcop -I../../../libltdl -I../../../kdefx -I../../../kdecore -I../../../kdecore  
-I../../../kdeui -I../../../kio -I../../../kio/kio -I../../../kio/kfile -I../../.. -I/usr/qt/3/include -I.  
-I/usr/kde/3.5/include  -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wno-long-long -Wundef  
-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion  
-Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -O3  
-mtune=pentium3 -march=pentium3 -pipe -fomit-frame-pointer -mmmx -msse -Wformat-security  
-Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common   
-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT  
-DQT_NO_TRANSLATION  -c -o kspell_hspell_la.all_cpp.lo kspell_hspell_la.all_cpp.cpp  
In file included from kspell_hspell_la.all_cpp.cpp:3:  
kspell_hspelldict.cpp: In destructor `virtual HSpellDict::~HSpellDict()':  
kspell_hspelldict.cpp:43: error: `hspell_uninit' undeclared (first use this function)  
kspell_hspelldict.cpp:43: error: (Each undeclared identifier is reported only once for each function  
it appears in.)  
kspell_hspelldict.cpp: At global scope:  
kspell_hspelldict.cpp:103: warning: unused parameter 'word'  
kspell_hspelldict.cpp:96: warning: unused parameter 'word'  
kspell_hspelldict.cpp:89: warning: unused parameter 'bad'  
kspell_hspelldict.cpp:89: warning: unused parameter 'good'  
make: *** [kspell_hspell_la.all_cpp.lo] Error 1  


removing hspell and doing configure fixes it.
the problem is that hspell_uninit is in > 0.8 and not 0.8<= as written in comments.

reported here too:
http://bugs.gentoo.org/show_bug.cgi?id=114161
Comment 1 Jeff Manson 2005-12-06 12:51:25 UTC
This is a similar bug to #117329. This is what I submitted to fix it :

I had a similar problem - I fixed it by modifying the following line in kspell_hspellclient.h :

#include "hspell.h"

to

/* libhspell is a C library and it does not have #ifdef __cplusplus */
extern "C" {
#include "hspell.h"
}

This is what they had in kspell_hspelldict.h but they forgot to do it for kspell_hspellclient.h which gets called via the #include "kspell_hspellclient.cpp" line in kspell_hspell_la.all_cpp.cpp.

Just go to the konstruct/kde/kdelibs/work/kdelibs-3.5.0/kspell2/plugins/hspell directory and  modify this file. Then type make to recompile it.
Comment 2 Patrizio Bassi 2005-12-06 13:57:31 UTC
actually i've compiled without hspeel. i've removed it cause i don't need it!
don't know why i had that since i don't need hebrew spell.

however the problem is: 
grep "uninit" /usr/lib/hspell.h" gives nothing.
there is no prototype of such function in hspell 0.7.

if you add a fake skeleton, it fails on linking later, due to other functions too.

i'm just a casual reporter :P
Comment 3 Thiago Macieira 2005-12-06 17:07:18 UTC
SVN commit 486041 by thiago:

Fixing the bug in kspell's hspell plugin. Thanks to Jeff Manson for the patch.

BUG:117329,117722,117360


 M  +3 -0      kspell_hspellclient.h  


--- trunk/KDE/kdelibs/kspell2/plugins/hspell/kspell_hspellclient.h #486040:486041
@@ -25,7 +25,10 @@
 #include "client.h"
 #include <qobject.h>
 
+/* libhspell is a C library and it does not have #ifdef __cplusplus */
+extern "C" {
 #include "hspell.h"
+}
 
 namespace KSpell2 {
     class Dictionary;