Bug 67597 - kdelibs/khtml does not compile on gcc 2.96-98 (internal error)
Summary: kdelibs/khtml does not compile on gcc 2.96-98 (internal error)
Status: RESOLVED NOT A BUG
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 74805 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-08 16:26 UTC by Dik Takken
Modified: 2004-02-14 18:49 UTC (History)
2 users (show)

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 Dik Takken 2003-11-08 16:26:29 UTC
Version:            (using KDE KDE 3.1.93)
Installed from:    Compiled From Sources
OS:          Linux

I am trying to build KDE 3.1.93, but the kdelibs package fails to compile. I used the following configure options:

./configure --disable-dependency-tracking --disable-debug --enable-dnotify  --enable-fast-malloc=full

The make output looks like this:

make[1]: Leaving directory `/mnt/dataschijf2/kdelibs-3.1.93/khtml/ecma'
Making all in .
make[1]: Entering directory `/mnt/dataschijf2/kdelibs-3.1.93/khtml'
/bin/sh ../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../dcop -I../kio/kssl -I../kjs -I../kimgio -I./java -I../dcop -I./misc -I./dom -I./xml -I./html -I./css -I../libltdl -I../kio/kssl -I../kio/kssl -I../kdeprint -I../interfaces -I../interfaces/kregexpeditor -I../kwallet/client -I.. -I../dcop -I../libltdl -I../kdefx -I../kdecore -I../kdeui -I../kio -I../kio/kio -I../kio/kfile -I.. -I/usr/local/qt/include -I/usr/X11R6/include -I/usr/local/kde/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 -DNDEBUG -DNO_DEBUG -O2 -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 khtmlview.lo `test -f 'khtmlview.cpp' || echo './'`khtmlview.cpp
In file included from khtmlview.cpp:2202:
khtml_caret.cpp: In function `khtml::RenderFlow
*khtml::generateDummyBlock (khtml::RenderArena *, khtml::RenderObject
*)':
khtml_caret.cpp:281: warning: unused parameter `khtml::RenderArena
*arena'
In file included from khtmlview.cpp:2202:
khtml_caret_p.h: In method `khtml::EditableCharacterIterator
&khtml::EditableCharacterIterator::operator++ ()':
khtml_caret_p.h:404: Internal error: Floating point exception.
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
make[1]: *** [khtmlview.lo] Error 1
make[1]: Leaving directory `/mnt/dataschijf2/kdelibs-3.1.93/khtml'
make: *** [all-recursive] Error 1
[dik@dik khtml]$

Please, don't tell me gcc 2.96 isn't supported.. :)
Comment 1 Matt Rogers 2003-11-08 16:30:55 UTC
you should do what it says in the error message and report your error to bugzilla.redhat.com/bugzilla since this isn't a KDE bug.
Comment 2 Dik Takken 2003-11-08 16:41:39 UTC
That's not going to help anything, because Redhat does not support 2.96 anymore, nor does the gcc group. I guess the only thing we can do is change the line of code that triggers the gcc bug. 

I only want to test 3.2 Beta 1 for you guys, please give me the chance to do so. You do need beta testers, don't you?
Comment 3 Dik Takken 2003-11-08 16:47:43 UTC
I found a work-around. Removing *all* compiler optimizations for the file khtmlview.cpp fixes it. Hopefully, it won't have too much impact on the performance of the whole thing...
Comment 4 Mike Perik 2003-11-26 17:41:43 UTC
Changing the statements from 
fromEnd ? --*this : ++*this

to

if (fromEnd)
 --*this;
else
 ++*this;

Also, fixes this problem.

Comment 5 Yanick Champoux 2004-01-25 16:57:48 UTC
A variant of the same problem is found in 3.1.95 (still using gcc 2.96, but this time from Mandrake):

make[6]: Entering directory `/usr/local/soft/KDE/konstruct/kde/kdelibs/work/kdelibs-3.1.95/khtml'
if /bin/sh ../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../dcop -I../kio/kssl -I../kjs -I../kimgio -I./java -I../dcop -I./misc -I./dom -I./xml -I./html -I./css -I../libltdl -I../kio/kssl -I../kio/kssl -I../kdeprint -I../interfaces -I../interfaces/kregexpeditor -I../kwallet/client -I.. -I../dcop -I../libltdl -I../kdefx -I../kdecore -I../kdeui -I../kio -I../kio/kio -I../kio/kfile -I.. -I/usr/local/soft/KDE/kde3.2-rc/include -I/usr/X11R6/include  -I/usr/kerberos/include  -DQT_THREAD_SUPPORT -I/usr/local/soft/KDE/kde3.2-rc/include -I/usr/X11R6/include -I/usr/local/soft/KDE/kde3.2-rc/include -I/usr/X11R6/include -I/usr/local/soft/KDE/kde3.2-rc/include -I/usr/X11R6/include -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 -O2 -I/usr/local/soft/KDE/kde3.2-rc/include -I/usr/X11R6/include -L/usr/local/soft/KDE/kde3.2-rc/lib -L/usr/X11R6/lib -O2 -pipe -I/usr/local/soft/KDE/kde3.2-rc/include -I/usr/X11R6/include -L/usr/local/soft/KDE/kde3.2-rc/lib -L/usr/X11R6/lib -O2 -pipe -I/usr/local/soft/KDE/kde3.2-rc/include -I/usr/X11R6/include -L/usr/local/soft/KDE/kde3.2-rc/lib -L/usr/X11R6/lib -O2 -pipe -fno-exceptions -fno-check-new -fno-common  -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -MT libkhtml_la.all_cpp.lo -MD -MP -MF ".deps/libkhtml_la.all_cpp.Tpo" \
  -c -o libkhtml_la.all_cpp.lo `test -f 'libkhtml_la.all_cpp.cpp' || echo './'`libkhtml_la.all_cpp.cpp; \
then mv -f ".deps/libkhtml_la.all_cpp.Tpo" ".deps/libkhtml_la.all_cpp.Plo"; \
else rm -f ".deps/libkhtml_la.all_cpp.Tpo"; exit 1; \
fi
In file included from khtmlview.cpp:2311,
                 from libkhtml_la.all_cpp.cpp:2:
khtml_caret_p.h: In method `khtml::EditableCharacterIterator
&khtml::EditableCharacterIterator::operator++ ()':
khtml_caret_p.h:407: Internal compiler error in emit_move_insn, at
expr.c:2577
Please submit a full bug report.
See <URL:https://qa.mandrakesoft.com/> for instructions.
Comment 6 Rex Dieter 2004-02-10 22:28:10 UTC
*** Bug 74805 has been marked as a duplicate of this bug. ***
Comment 7 Maksim Orlovich 2004-02-13 19:50:07 UTC
CVS commit by orlovich: 

Workaround ICE in "gcc" 2.96. 
CCMAIL:67597@bugs.kde.org


  M +14 -2     khtml_caret_p.h   1.7.2.1


--- kdelibs/khtml/khtml_caret_p.h  #1.7:1.7.2.1
@@ -405,5 +405,11 @@ public:
                 : InlineBoxIterator(lit, fromEnd, initBox), m_part(lit.lines->m_part)
   {
-    if (box && !isEditable(box)) fromEnd ? --*this : ++*this;
+    if (box && !isEditable(box)) 
+    {
+      if (fromEnd)
+        --*this;
+      else 
+        ++*this;
+    }
   }
 
@@ -500,5 +506,11 @@ public:
                 : LineIterator(it)
   {
-    if (flowBox && !isEditable(*this)) fromEnd ? operator--() : operator ++();
+    if (flowBox && !isEditable(*this)) 
+    {
+      if (fromEnd) 
+        operator--();
+      else
+        operator ++();
+    }    
     if (!flowBox || !cb) {
 #if DEBUG_CARETMODE > 0