Page 1 of 1

Celestia 1.2.5 vs KDE 3.1/QT 3.1.1

Posted: 15.03.2003, 17:11
by Kelledin
When trying to build Celestia, I get the following error:

Code: Select all

g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../.. -I.. -I/opt/qt3/include -I/opt/kde3/include  -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long -Wbad-function-cast -Wundef -Wall -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -DNDEBUG -DNO_DEBUG -O2 -fno-exceptions -fno-check-new  -O2 -Wall -ffast-math -fexpensive-optimizations -fomit-frame-pointer    -c -o celestialbrowserbase.uic.o `test -f 'celestialbrowserbase.uic.cpp' || echo './'`celestialbrowserbase.uic.cpp
celestialbrowserbase.uic.cpp: In constructor
   `CelestialBrowserBase::CelestialBrowserBase(QWidget*, const char*, bool,
   unsigned int)':
celestialbrowserbase.uic.cpp:46: invalid use of undefined type `struct
   KListView'
celestialbrowserbase.uic.h:19: forward declaration of `struct KListView'
celestialbrowserbase.uic.cpp:47: invalid use of undefined type `struct
   KListView'
celestialbrowserbase.uic.h:19: forward declaration of `struct KListView'
celestialbrowserbase.uic.cpp:48: invalid use of undefined type `struct
   KListView'
celestialbrowserbase.uic.h:19: forward declaration of `struct KListView'
celestialbrowserbase.uic.cpp:49: invalid use of undefined type `struct
   KListView'
celestialbrowserbase.uic.h:19: forward declaration of `struct KListView'
celestialbrowserbase.uic.cpp:50: invalid use of undefined type `struct
   KListView'
celestialbrowserbase.uic.h:19: forward declaration of `struct KListView'
celestialbrowserbase.uic.cpp:51: invalid use of undefined type `struct
   KListView'
celestialbrowserbase.uic.h:19: forward declaration of `struct KListView'
celestialbrowserbase.uic.cpp:53: no matching function for call to `QGridLayout
   ::addMultiCellWidget(KListView*&, int, int, int, int)'
/opt/qt3/include/qlayout.h:326: candidates are: void
   QGridLayout::addMultiCellWidget(QWidget*, int, int, int, int, int = 0)
celestialbrowserbase.uic.cpp:94: no matching function for call to `
   CelestialBrowserBase::connect(KListView*&, const char[56],
   CelestialBrowserBase* const, const char[56])'
/opt/qt3/include/qobject.h:116: candidates are: static bool
   QObject::connect(const QObject*, const char*, const QObject*, const char*)
/opt/qt3/include/qobject.h:227:                 bool QObject::connect(const
   QObject*, const char*, const char*) const
celestialbrowserbase.uic.cpp: In member function `virtual void
   CelestialBrowserBase::languageChange()':
celestialbrowserbase.uic.cpp:115: invalid use of undefined type `struct
   KListView'
celestialbrowserbase.uic.h:19: forward declaration of `struct KListView'
celestialbrowserbase.uic.cpp:116: invalid use of undefined type `struct
   KListView'
celestialbrowserbase.uic.h:19: forward declaration of `struct KListView'
celestialbrowserbase.uic.cpp:117: invalid use of undefined type `struct
   KListView'
celestialbrowserbase.uic.h:19: forward declaration of `struct KListView'
celestialbrowserbase.uic.cpp:118: invalid use of undefined type `struct
   KListView'
celestialbrowserbase.uic.h:19: forward declaration of `struct KListView'
celestialbrowserbase.uic.cpp:119: invalid use of undefined type `struct
   KListView'
celestialbrowserbase.uic.h:19: forward declaration of `struct KListView'
make[5]: *** [celestialbrowserbase.uic.o] Error 1
make[5]: Leaving directory `/usr/src/cl/celestia-1.2.5/src/celestia/kde'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/src/cl/celestia-1.2.5/src/celestia/kde'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/src/cl/celestia-1.2.5/src/celestia'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/cl/celestia-1.2.5/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/cl/celestia-1.2.5'
make: *** [all] Error 2


Qt 3.1.1 is installed in /opt/qt3; almost all of KDE 3.1 is installed in /opt/kde3. Compiler is gcc-3.2.1. The following ./configure line was used:

Code: Select all

CFLAGS="-O2 -march=i486" CXXFLAGS="-O2 -march=i486" \
./configure \
            --prefix=/usr \
            --sysconfdir=/etc \
            --localstatedir=/var \
            --disable-debug \
            --enable-shared \
            --enable-static \
            --with-kde \
            --with-qt-dir=/opt/qt3 \
            --enable-final \
            --host=i486-incept-linux-gnu \
            --target=i486-incept-linux-gnu \
            --build=i486-incept-linux-gnu


It's fairly simple to fix at this point--it's just a matter of sticking '#include <klistview.h>' in celestialbrowserbase.uic.cpp. This isn't really a workable solution, though, because I'm trying to do a scripted build. I need it to complete without me having to be there to babysit it.

My question at this point is, why isn't the appropriate #include directive added automatically? Using my (meager) knowledge of the Qt build system, I looked in the celestialbrowserbase.ui file, and it looks like the #include should be added automatically (just judging from the following excerpt):

Code: Select all

<includehints>
    <includehint>klistview.h</includehint>
</includehints>


But that's not enough, it seems. uic isn't taking the hint.

For all I know, it may be as simple as regenerating your source files with an up-to-date QT Designer. As you might imagine, I have no such tool on hand and would have little idea how to use it, even if I did. Any ideas on what to do next?

Posted: 15.03.2003, 17:58
by Kelledin
Hmm...well, it seems I've found a suitable workaround after poking around on Google. I just used

Code: Select all

make kde_widgetdir=/opt/kde3/lib/kde3/plugins/designer


Apparently kde_widgetdir is semi-hard-coded to %{prefix}/lib/kde3/plugins/designer, which doesn't work unless celestia is going in the same prefix as KDE. This really should be fixed; considering that ./configure is able to discover the KDE3 prefix during build, this shouldn't be too much of a problem. I personally can't be arsed to take care of it with such an easy workaround in reach. :p

-L option : Additional search path

Posted: 06.07.2004, 07:58
by remi.chateauneu
Whatever your makefile is, uic must be called with an additional plugin search path, which means this syntax :

uic ...blah... -L /opt/kde3/lib/kde3/plugins/designer