[kaffe] Update on qt-embedded link errors

Dalibor Topic robilad@yahoo.com
Sat Mar 8 04:10:02 2003


Here are the current results of my inspection ;)

* linking against __ti7QWidget fails : 

qt is written in C++. C++ compilers use name mangling
to map
symbols to unique identifiers. A tool called c++filt
exists, which
allows us to demangle such names. Try 
c++filt __ti7QWdiget
to see what kaffe wants to link to.

In the above case, it turns out kaffe wants to link to
the type_info
node of the class QWidget. This happens because
kaffe's makefile.am
for QT has a bug: it sets necessary flags like
-fno-rtti as CFLAGS
instead of CXXFLAGS, so they don't get picked up by
the C++ compiler.

I'll have a simple fix for that soon, I just need to
test it on the
different Qt 2/3/embedded releases to be sure it
works.

The interim solution is to make kaffe with 
make CXX="g++ -fno-exceptions -fno-rtti"

* linking against kaffevmDebugMask fails :

This symbol comes from kaffe/kaffevm/debug.c . It is
only defined if
NDEBUG is not defined and DEBUG is defined. By
default, neither symbol
is defined, so all DBG macros, and kaffevmDebugMask
are undefined.

Qt, on the other hand, defines QT_DEBUG and DEBUG.
This leads qt-awt
to try to link against kaffevmDebugMask, which does
not exist.

The interim solution is to configure kaffe with
--enable-debug.

As the long term solution, I'll post a patch that
renames kaffe's
DEBUG define to KAFFE_VMDEBUG, making such collisions
unlikely in the
future.

* I've done what you say, I've set QTDIR to the
qt-embedded directory where the fonts are, I've
updated  LD_LIBRARY_PATH to include libqte and it
still does not work! I get garbage on the screeen!

Ah yes. qt-embedded doesn't really appreciate dual use
of the framebuffer as the linux console and QWS
screen. So you'll have to redirect stdout and stderr
to some file when you run kaffe with qte. 

following the above directions, I've got kaffe to work
with qt-embedded, and ran the TextEditor awt test
successfully (as far as the qt awt is implemented, it
still has its own share of bugs).

Jim Huang is working on improving the qt awt support
for Qtopia, and I hope others will help out with the
code as well. the code needs some cleanup, there are
some quite annoying bugs that need to be fixed, etc. 

cheers,
dalibor topic

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/