linux compiling problems / KDE GUI / CVS & snapshots

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
astro
Posts: 41
Joined: 27.10.2003
With us: 21 years 1 month

linux compiling problems / KDE GUI / CVS & snapshots

Post #1by astro » 26.06.2004, 18:56

Hi all,

I got some compiling errors when building Celestia from snapshots or CVS.

System: Pentium4, Slackware (current), kernel 2.6.6, X.Org 6.7.0, KDE 3.2.3, gcc 3.3.4, etc ...


*celestia-cvs.20040625.tgz from http://celestia.teyssier.org/download/daily/
compiles with GLUT GUI but does not with KDE:

Code: Select all

source='celestialbrowser.cpp' object='celestialbrowser.o' libtool=no \
depfile='.deps/celestialbrowser.Po' tmpdepfile='.deps/celestialbrowser.TPo' \
depmode=gcc3 /bin/sh ../../../admin/depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../.. -I.. -I/usr/lib/qt/include -I/opt/kde/include  -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long -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 celestialbrowser.o `test -f 'celestialbrowser.cpp' || echo './'`celestialbrowser.cpp
celestialbrowser.cpp: In member function `virtual void
   CelestialBrowser::slotRefresh()':
celestialbrowser.cpp:141: error: conversion from `QString' to non-scalar type `
   std::basic_string<char, std::char_traits<char>, std::allocator<char> >'
   requested
celestialbrowser.cpp:159: error: no matching function for call to `QString::
   QString(std::string)'
/usr/lib/qt/include/qstring.h:746: error: candidates are:
   QString::QString(QStringData*, bool)
/usr/lib/qt/include/qstring.h:720: error:                 QString::QString(int,
   bool)
/usr/lib/qt/include/qstring.h:406: error:
   QString::QString(const char*)
/usr/lib/qt/include/qstring.h:404: error:
   QString::QString(const QChar*, unsigned int)
/usr/lib/qt/include/qstring.h:403: error:
   QString::QString(const QByteArray&)
/usr/lib/qt/include/qstring.h:402: error:
   QString::QString(const QString&)
/usr/lib/qt/include/qstring.h:401: error:
   QString::QString(QChar)
/usr/lib/qt/include/qstring.h:838: error:                 QString::QString()
celestialbrowser.cpp:176: error: no matching function for call to `QString::
   QString(std::string)'
/usr/lib/qt/include/qstring.h:746: error: candidates are:
   QString::QString(QStringData*, bool)
/usr/lib/qt/include/qstring.h:720: error:                 QString::QString(int,
   bool)
/usr/lib/qt/include/qstring.h:406: error:
   QString::QString(const char*)
/usr/lib/qt/include/qstring.h:404: error:
   QString::QString(const QChar*, unsigned int)
/usr/lib/qt/include/qstring.h:403: error:
   QString::QString(const QByteArray&)
/usr/lib/qt/include/qstring.h:402: error:
   QString::QString(const QString&)
/usr/lib/qt/include/qstring.h:401: error:
   QString::QString(QChar)
/usr/lib/qt/include/qstring.h:838: error:                 QString::QString()
celestialbrowser.cpp: In member function `virtual void
   CelestialBrowser::slotRightClickOnStar(QListViewItem*, const QPoint&, int)':
celestialbrowser.cpp:217: warning: unused parameter `int col'
make[5]: *** [celestialbrowser.o] Error 1
make[5]: Leaving directory `/home/astro/celestia-1.3.2/src/celestia/kde'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/astro/celestia-1.3.2/src/celestia/kde'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/astro/celestia-1.3.2/src/celestia'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/astro/celestia-1.3.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/astro/celestia-1.3.2'
make: *** [all] Error 2


*celestia-cvs.20040611.tgz from http://celestia.teyssier.org/download/daily/
Same problem with the KDE GUI.

Is there a problem with my installation of KDE or is Celestia's KDE GUI broken in CVS? Note that I can still compile and run smoothly 1.3.1 with KDE GUI.

*CVS checkout from Sourceforge on June 23, 2004:

Code: Select all

astro@lune:~/celestia$ make -f Makefile.cvs
This Makefile is only for the CVS repository
This will be deleted before making the distribution

*** YOU'RE USING automake (GNU automake) 1.8.5.
*** KDE requires automake 1.5
make[1]: *** [cvs] Error 1
make: *** [all] Error 2


Last time I did that was before 1.3.1 was released and it went smoothly,

Thank you.

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #2by Christophe » 27.06.2004, 10:31

The QString(std::string) constructor was introduced in Qt 3.1, are you sure you're not using old Qt 3.0 headers?
Christophe

Topic author
astro
Posts: 41
Joined: 27.10.2003
With us: 21 years 1 month

Post #3by astro » 27.06.2004, 14:19

I am using QT 3.3.2. I specified the directories to find both include files and libraries:

Code: Select all

./configure --with-kde --with-qt-includes=/usr/lib/qt-3.3.2/include --with-qt-libraries=/usr/lib/qt-3.3.2/lib/

but I still get the same error message while running make.

Below is part of my qstring.h.

Code: Select all

class Q_EXPORT QString
{
public:
    QString();                                  // make null string
    QString( QChar );                           // one-char string
    QString( const QString & );                 // impl-shared copy
    QString( const QByteArray& );               // deep copy
    QString( const QChar* unicode, uint length ); // deep copy
#ifndef QT_NO_CAST_ASCII
    QString( const char *str );                 // deep copy
#endif
#ifndef QT_NO_STL
    QString( const std::string& );                   // deep copy
#endif
    ~QString();

    QString    &operator=( const QString & );   // impl-shared copy
    QString    &operator=( const char * );      // deep copy
#ifndef QT_NO_STL
    QString    &operator=( const std::string& );     // deep copy
#endif
    QString    &operator=( const QCString& );   // deep copy
    QString    &operator=( QChar c );
    QString    &operator=( char c );

    QT_STATIC_CONST QString null;

    bool        isNull()        const;
    bool        isEmpty()       const;
    uint        length()        const;
    void        truncate( uint pos );

    QString &   fill( QChar c, int len = -1 );

    QString     copy()  const;


Is

Code: Select all

 QString( const std::string& );   
the constructor you are talking about? In that case I should maybe track QT_NO_STL.

Thank you.

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #4by Christophe » 27.06.2004, 20:42

astro wrote:Is

Code: Select all

 QString( const std::string& );   
the constructor you are talking about? In that case I should maybe track QT_NO_STL.


Yes, you're right. Now I remember we've had this problem before, some distributions use Qt without STL support. You now have to recompile Qt to enable that STL support.
Christophe


Return to “Development”