|
First of all: use kde beta4 or later, this is only provided for documentation
and information purposes.
The libtool version that comes with the KDE beta3 will not produce working
binaries - at least with gcc-2.7.2.x and binutils-2.8.1. Some of them might
look good when you start them (for instance kfm), others will coredump
immediately (kedit, kdehelp).
To avoid the problem, you have to do comment the following lines in
libtool, after running configure and before running make.
Do this each time you compile the next part, such as kdelibs, kdebase,
kdegames, kdeutils and similar.
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
if test "${COLLECT_NAMES+set}" != set; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
They should rather look like that:
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
# if test "${COLLECT_NAMES+set}" != set; then
# COLLECT_NAMES=
# export COLLECT_NAMES
# fi
If you are curious what goes wrong, here is an explenation, otherwise
skip the rest of this section:
The problem was always the same:
foo.h:
------
class kfoo {
static QList windowList;
};
foo.cpp:
--------
QList kfoo::windowList;
In an application which uses foo.o and somehow accesses kfoo::windowList
(from inside or outside kfoo), AIX says SIGILL (illegal instruction) and
the program terminates.
The problem is that the constructor of the QList never gets called.
(But also other classes than QList cause problems). So generally speaking,
"static member classes" don't work. Some programs (e.g. kfm)
have been tuned in the past to avoid such, because AIX was not the only
architecture causing troubles. But this has never been official KDE programming
style, and newer libtools will fix the problem out-of-the-box, even without
patching. |