Results 1 to 16 of 16

Thread: Qt 4.2.2 and SuSE Linux 9.3

  1. #1
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    64
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Qt 4.2.2 and SuSE Linux 9.3

    I configured Qt 4.2.2 like this:

    ./configure -static -release -no-qt3support -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libjpeg

    then:

    make sub-src

    then (as root):

    cp -r qt_src/bin /usr/local/Trolltech/Qt-4.2.2/bin
    cp -r qt_src/include /usr/local/Trolltech/Qt-4.2.2/include
    cp -r qt_src/lib /usr/local/Trolltech/Qt-4.2.2/lib
    cp -r qt_src/mkspecs /usr/local/Trolltech/Qt-4.2.2/mkspecs
    cp -r qt_src/src /usr/local/Trolltech/Qt-4.2.2/src
    cp -r qt_src/doc /usr/local/Trolltech/Qt-4.2.2/doc

    in my ~/.profile I added:

    export PATH="$PATH:/usr/local/Trolltech/Qt-4.2.2/bin"

    Everything went well so far, except...

    When I try to compile even the most simple/basic progam,
    I get this error message:

    teuniz@linux:~/c/nk2edf-0.42beta-src> make
    g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/local/Trolltech/Qt-4.2.2/mkspecs/linux-g++ -I. -I/usr/local/Trolltech/Qt-4.2.2/include/QtCore -I/usr/local/Trolltech/Qt-4.2.2/include/QtCore -I/usr/local/Trolltech/Qt-4.2.2/include/QtGui -I/usr/local/Trolltech/Qt-4.2.2/include/QtGui -I/usr/local/Trolltech/Qt-4.2.2/include -I. -Imoc -I. -o objects/main.o main.cpp
    In file included from /usr/local/Trolltech/Qt-4.2.2/include/QtCore/qglobal.h:1,
    from /usr/local/Trolltech/Qt-4.2.2/src/corelib/global/qnamespace.h:27,
    from /usr/local/Trolltech/Qt-4.2.2/include/QtCore/qnamespace.h:1,
    from /usr/local/Trolltech/Qt-4.2.2/src/corelib/kernel/qobjectdefs.h:27,
    from /usr/local/Trolltech/Qt-4.2.2/include/QtCore/qobjectdefs.h:1,
    from /usr/local/Trolltech/Qt-4.2.2/src/corelib/kernel/qobject.h:29,
    from /usr/local/Trolltech/Qt-4.2.2/include/QtCore/qobject.h:1,
    from /usr/local/Trolltech/Qt-4.2.2/src/corelib/kernel/qcoreapplication.h:27,
    from /usr/local/Trolltech/Qt-4.2.2/include/QtCore/qcoreapplication.h:1,
    from /usr/local/Trolltech/Qt-4.2.2/src/gui/kernel/qapplication.h:27,
    from /usr/local/Trolltech/Qt-4.2.2/include/QtGui/qapplication.h:1,
    from /usr/local/Trolltech/Qt-4.2.2/include/QtGui/QApplication:1,
    from main.cpp:3:
    /usr/local/Trolltech/Qt-4.2.2/src/corelib/global/qglobal.h:38:28: QtCore/qconfig.h: No such file or directory
    /usr/local/Trolltech/Qt-4.2.2/src/corelib/global/qglobal.h:1075:6: #error "Qt not configured correctly, please run configure"
    /usr/local/Trolltech/Qt-4.2.2/src/corelib/global/qglobal.h:1861:6: #error "Qt not configured correctly, please run configure"

    I checked the dir /usr/local/Trolltech/Qt-4.2.2/src/corelib/global/ and the file qconfig.h is present!

    When I do the same install and configuration on a box with SuSE 10.0 or OpenSUSE 10.2 everything works well (using the same sourcecode).

    I hope somebody can solve this mysterie...

    Tnx in advance,

    Teuniz

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.2.2 and SuSE Linux 9.3

    Quote Originally Posted by Teuniz View Post
    I checked the dir /usr/local/Trolltech/Qt-4.2.2/src/corelib/global/ and the file qconfig.h is present!
    Maybe there is some problem with access rights?

  3. #3
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    64
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.2.2 and SuSE Linux 9.3

    teuniz@linux:/usr/local/Trolltech/Qt-4.2.2/src/corelib/global> ls -l
    total 312
    -rw-r--r-- 1 root root 371 2007-02-17 18:30 global.pri
    -r--r--r-- 1 root root 8332 2007-02-17 18:30 qconfig.cpp
    -rw-r--r-- 1 root root 1404 2007-02-17 18:30 qconfig-dist.h
    -r--r--r-- 1 root root 1471 2007-02-17 18:30 qconfig.h
    -rw-r--r-- 1 root root 48 2007-02-17 18:30 qconfig.h.qmake
    -rw-r--r-- 1 root root 3111 2007-02-17 18:30 qconfig-large.h
    -rw-r--r-- 1 root root 4989 2007-02-17 18:30 qconfig-medium.h
    -rw-r--r-- 1 root root 9057 2007-02-17 18:30 qconfig-minimal.h
    -rw-r--r-- 1 root root 5766 2007-02-17 18:30 qconfig-small.h
    -rw-r--r-- 1 root root 10786 2007-02-17 18:30 qendian.h
    -rw-r--r-- 1 root root 14767 2007-02-17 18:30 qfeatures.h
    -rw-r--r-- 1 root root 22748 2007-02-17 18:30 qfeatures.txt
    -rw-r--r-- 1 root root 66476 2007-02-17 18:30 qglobal.cpp
    -rw-r--r-- 1 root root 57690 2007-02-17 18:30 qglobal.h
    -rw-r--r-- 1 root root 14615 2007-02-17 18:30 qlibraryinfo.cpp
    -rw-r--r-- 1 root root 1808 2007-02-17 18:30 qlibraryinfo.h
    -rw-r--r-- 1 root root 41332 2007-02-17 18:30 qnamespace.h
    -rw-r--r-- 1 root root 4056 2007-02-17 18:30 qnumeric_p.h
    -rw-r--r-- 1 root root 1738 2007-02-17 18:30 qt_pch.h
    teuniz@linux:/usr/local/Trolltech/Qt-4.2.2/src/corelib/global>

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.2.2 and SuSE Linux 9.3

    Quote Originally Posted by Teuniz View Post
    /usr/local/Trolltech/Qt-4.2.2/src/corelib/global/qglobal.h:38:28: QtCore/qconfig.h: No such file or directory
    Do you have /usr/local/Trolltech/Qt-4.2.2/include/QtCore/qconfig.h?

    Quote Originally Posted by Teuniz View Post
    teuniz@linux:/usr/local/Trolltech/Qt-4.2.2/src/corelib/global> ls -l
    ...
    They look OK, what about directories?

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt 4.2.2 and SuSE Linux 9.3

    Why compiling an app reffers to Qt sources? Something was messed up during compiling Qt. I guess you should have done make install instead of manually copying Qt files. You can use the prefix option in configure to decide where to install Qt files.

  6. #6
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    64
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.2.2 and SuSE Linux 9.3

    Quote Originally Posted by wysota View Post
    I guess you should have done make install instead of manually copying Qt files.
    http://wiki.qtcentre.org/index.php?t...ic_Qt_on_Linux

  7. #7
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    64
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.2.2 and SuSE Linux 9.3

    Quote Originally Posted by jacek View Post
    They look OK, what about directories?
    teuniz@linux:/usr/local/Trolltech/Qt-4.2.2/src/corelib> ls -l
    total 436
    drwxr-xr-x 16 root root 856 2007-02-17 18:30 arch
    drwxr-xr-x 2 root root 688 2007-02-17 18:30 codecs
    -rw-r--r-- 1 root root 571 2007-02-17 18:30 corelib.pro
    drwxr-xr-x 2 root root 656 2007-02-17 18:30 global
    drwxr-xr-x 2 root root 1648 2007-02-17 18:30 io
    drwxr-xr-x 2 root root 1992 2007-02-17 18:30 kernel
    -rw-r--r-- 1 root root 432997 2007-02-17 18:30 Makefile
    drwxr-xr-x 2 root root 496 2007-02-17 18:30 plugin
    drwxr-xr-x 2 root root 704 2007-02-17 18:30 thread
    drwxr-xr-x 2 root root 2032 2007-02-17 18:30 tools
    teuniz@linux:/usr/local/Trolltech/Qt-4.2.2/src/corelib> cd ..
    teuniz@linux:/usr/local/Trolltech/Qt-4.2.2/src> ls -l
    total 55
    drwxr-xr-x 11 root root 312 2007-02-17 18:31 3rdparty
    drwxr-xr-x 12 root root 344 2007-02-17 18:30 corelib
    drwxr-xr-x 19 root root 536 2007-02-17 18:30 gui
    -rw-r--r-- 1 root root 270 2007-02-17 18:30 libqt.map
    -rw-r--r-- 1 root root 25779 2007-02-17 18:30 Makefile
    drwxr-xr-x 4 root root 1376 2007-02-17 18:31 network
    drwxr-xr-x 5 root root 736 2007-02-17 18:31 opengl
    drwxr-xr-x 10 root root 368 2007-02-17 18:31 plugins
    -rw-r--r-- 1 root root 4338 2007-02-17 18:31 qbase.pri
    drwxr-xr-x 14 root root 400 2007-02-17 18:31 qt3support
    -rw-r--r-- 1 root root 908 2007-02-17 18:31 qt_install.pri
    -rw-r--r-- 1 root root 193 2007-02-17 18:31 qt_targets.pri
    drwxr-xr-x 7 root root 248 2007-02-17 18:30 sql
    -rw-r--r-- 1 root root 3256 2007-02-17 18:30 src.pro
    drwxr-xr-x 4 root root 832 2007-02-17 18:30 svg
    drwxr-xr-x 6 root root 144 2007-02-17 18:30 tools
    drwxr-xr-x 4 root root 240 2007-02-17 18:30 xml
    teuniz@linux:/usr/local/Trolltech/Qt-4.2.2/src> cd ..
    teuniz@linux:/usr/local/Trolltech/Qt-4.2.2> ls -l
    total 3
    drwxr-xr-x 2 root root 192 2007-02-17 18:28 bin
    drwxr-xr-x 3 root root 72 2007-02-17 18:31 doc
    drwxr-xr-x 17 root root 448 2007-02-17 18:29 include
    drwxr-xr-x 2 root root 1368 2007-02-17 18:29 lib
    drwxr-xr-x 54 root root 1648 2007-02-17 18:30 mkspecs
    drwxr-xr-x 14 root root 520 2007-02-17 18:31 src
    sabrina@linux:/usr/local/Trolltech/Qt-4.2.2> cd ..
    sabrina@linux:/usr/local/Trolltech> ls -l
    total 0
    drwxr-xr-x 8 root root 192 2007-02-17 18:31 Qt-4.2.2
    teuniz@linux:/usr/local/Trolltech>

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.2.2 and SuSE Linux 9.3

    Directories look OK too. What about that /usr/local/Trolltech/Qt-4.2.2/include/QtCore/qconfig.h file?

  9. #9
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    64
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.2.2 and SuSE Linux 9.3

    I deleted all the Qt stuff and I did the whole procedure (downloading, unpacking, configuring and copying Qt) again like I did before.
    And now it works...

    I guess there was a glitch in the comp or I entered a cmd wrong...

    Tnx for the help and sorry for bothering.

  10. #10
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    64
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.2.2 and SuSE Linux 9.3

    I discovered what caused this problem. After I copied all the relevant files to /usr/local/Trolltech/Qt-4.2.2/ I deleted the directory where I unzipped, configured and
    compiled Qt. For some strange reason which only Trolltech knows, qmake has a hardcoded path to the local dir qt_src/src.
    Copying qt_src/src to /usr/local/Trolltech/Qt-4.2.2/src doesn't help. Obviously you can't delete the qt_src dir, at least you need to keep qt-src/src

    http://wiki.qtcentre.org/index.php?t...ic_Qt_on_Linux

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt 4.2.2 and SuSE Linux 9.3

    Quote Originally Posted by Teuniz View Post
    Obviously you can't delete the qt_src dir, at least you need to keep qt-src/src

    http://wiki.qtcentre.org/index.php?t...ic_Qt_on_Linux
    IMO you just need to set an appropriate prefix while recompiling Qt.
    Last edited by wysota; 22nd February 2007 at 11:35.

  12. #12
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    64
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.2.2 and SuSE Linux 9.3

    Quote Originally Posted by wysota View Post
    IMO you just need to set an appropriate prefix while recompiling Qt.
    You mean this one?

    Installation options:

    These are optional, but you may specify install directories.

    -prefix <dir> ...... This will install everything relative to <dir>
    (default /usr/local/Trolltech/Qt-4.2.2)

    * -prefix-install .... Force a sandboxed "local" installation of
    Qt. This will install into
    /usr/local/Trolltech/Qt-4.2.2, if this option is
    disabled then some platforms will attempt a
    "system" install by placing default values to
    be placed in a system location other than
    PREFIX.


    -prefix-install is enabled by default according to "configure -help".

    Any other suggestions?

  13. #13
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt 4.2.2 and SuSE Linux 9.3

    The point is to use a different prefix than your shared installation has and to call make install to install the static version there. You should end up with two distinct Qt trees, one shared and one static. You can then try to link the two trees together, for example by substituting the include directory with a link to the include directory of the other tree, etc. You should be able to do the same with the doc, mkspecs, translations and phrasebooks directories. And you can delete demos and examples as you probably won't need static versions of those. Note that I'm talking about full compilation here, not only about compiling sub-src. For sub-src you probably won't have some of the directories at all.

  14. #14
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    64
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.2.2 and SuSE Linux 9.3

    Quote Originally Posted by wysota View Post
    The point is to use a different prefix than your shared installation has and to call make install to install the static version there.
    That's the point, I don't have a shared installation, I don't use the command "make install".
    Look at the procedure I used in my first post. The reason is that compiling all the stuff takes more time, specially when you want to link static and I don't need need the shared libs anyway. My programs have to run on many distro's.

    According to AMan in his article http://wiki.qtcentre.org/index.php?t...ic_Qt_on_Linux you can not use "make install" when you need to link static.

  15. #15
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt 4.2.2 and SuSE Linux 9.3

    Quote Originally Posted by Teuniz View Post
    That's the point, I don't have a shared installation
    There is no problem then. But sub-src won't be enough, for example Designer and Assistant won't be built.

    According to AMan in his article http://wiki.qtcentre.org/index.php?t...ic_Qt_on_Linux you can not use "make install" when you need to link static.
    Have you tried?
    According to me it may only apply when having static and shared installations side by side to avoid overwriting one with the other.

  16. #16
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    64
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.2.2 and SuSE Linux 9.3

    Somebody from Trolltech was so kind to solve my problem.
    You can find the solution here: http://wiki.qtcentre.org/index.php?t...ic_Qt_on_Linux

    Regards.

  17. The following user says thank you to Teuniz for this useful post:

    jacek (26th February 2007)

Similar Threads

  1. Qt 4.1.4 & Mysql 5 on Linux x64
    By bothapn in forum Installation and Deployment
    Replies: 7
    Last Post: 4th August 2006, 13:23
  2. Replies: 4
    Last Post: 10th May 2006, 22:37
  3. KDevelop/Qt in SuSE 10.0
    By pandorazbox in forum Qt Programming
    Replies: 4
    Last Post: 14th February 2006, 02:21
  4. Replies: 4
    Last Post: 12th January 2006, 04:16
  5. Qt assistant under linux
    By jochen_r in forum Newbie
    Replies: 8
    Last Post: 10th January 2006, 08:39

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.