[kde-solaris] KDE 3.1RC3 Compile Problem

Wout Mertens kde-solaris@mail.kde.org
Wed Nov 20 11:52:00 2002


Hi Cory,

On Sat, 16 Nov 2002, Cory C. Omand wrote:

> I'm attempting to compile KDE 3.1RC3 on Solaris 9 using the SunOne
> Developer Studio 7 compiler collection, and am running into some strange
> problems.  I have made it as far as kdelibs - kdeui to be exact.  Within

[...]

> Can anyone give me a pointer as to why this error is occuring:
>
> Making all in kdeui
> make[2]: Entering directory
> `/usr/share/src/build/kderc/kdelibs-3.0.99/kdeui'
> Making all in .
> make[3]: Entering directory
> `/usr/share/src/build/kderc/kdelibs-3.0.99/kdeui'
> source='kaccelmanager.cpp' object='kaccelmanager.lo' libtool=yes \
> depfile='.deps/kaccelmanager.Plo' tmpdepfile='.deps/kaccelmanager.TPlo' \
> depmode=none /bin/bash ../admin/depcomp \
> /bin/bash ../libtool --silent --mode=compile --tag=CXX CC
> -DHAVE_CONFIG_H -I. -I. -I.. -I../kdefx -I../interfaces -I../dcop
> -I../libltdl -I../kdecore -I../kdeui -I../kio -I../kio/kio
> -I../kio/kfile -I.. -I/opt/kde/include     -mt -DQT_THREAD_SUPPORT
> -I/usr/local/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
> -DUSE_SOLARIS -DSVR4 -I/usr/local/include  -O -library=Crun,Cstd
> -DQT_NO_TRANSLATION -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST
> -DQT_NO_COMPAT  -c -o kaccelmanager.lo `test -f 'kaccelmanager.cpp' ||
> echo './'`kaccelmanager.cpp
> "../kdecore/kdebug.h", line 219: Warning: d hides kdbgstream::d.

This is where the actual error starts:

> "kaccelmanager.cpp", line 112: Error:
> KAcceleratorManagerPrivate::ItemList is not accessible from
> KAcceleratorManagerPrivate::Item.
> "kaccelmanager.cpp", line 139: Error:
> KAcceleratorManagerPrivate::ItemList is not accessible from
> KAcceleratorManagerPrivate::Item::addChild(KAcceleratorManagerPrivate::Item*).
> 2 Error(s) and 1 Warning(s) detected.
> make[3]: *** [kaccelmanager.lo] Error 1
> make[3]: Leaving directory `/usr/share/src/build/kderc/kdelibs-3.0.99/kdeui'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/usr/share/src/build/kderc/kdelibs-3.0.99/kdeui'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/share/src/build/kderc/kdelibs-3.0.99'
> make: *** [all] Error 2
>
> The error location (kaccelmanager.cpp:112) is within the delcaration of
> KAcceleratorManagerPrivate::ItemList.  ItemList is a typedef'd QPtrList
> containing <Item> objects, but Item is declared as a private inner
> class, which itself refers to an ItemList.  I am not sure what the
> resolution rules are in this case, but at first glance this seems to me
> to be a circular reference (??).

Close, at least, that's what I think. Since the declaration is private,
any other objects will have no access to it, even if they are embedded.
The declaration should be protected instead of private.

Here's the relevant part:

=============================================
class KAcceleratorManagerPrivate
{
public:

[...]

private:
  class Item;
  typedef QPtrList<Item> ItemList;

[...]

  class Item
  {
  public:

[...]

    void addChild(Item *item);

=============================================

Can you change the "private" to "protected"? If that works, it's either
that the g++ compiler is too lax, or that the SunOne compiler is too
strict. I don't have time to look up the exact rules :)

Wout.

PS: Can I get that compiler from somewhere? I'd like to give the
compilation a try. I hope that it will result in a faster KDE...