Results 1 to 5 of 5

Thread: Is it possible to compile Qt 4.7.1 on Linux using gcc 3.3.3?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Is it possible to compile Qt 4.7.1 on Linux using gcc 3.3.3?

    Reading the compiler website of Qt, I thought I might give compilation of Qt on my ancient Linux system a try. The gcc version is 3.3.3. After disabling QtConcurrent and WebKit in the `configure' script by setting

    Qt Code:
    1. canBuildWebKit="no"
    2. canBuildQtConcurrent="no"
    To copy to clipboard, switch view to plain text mode 

    I ran

    Qt Code:
    1. ./configure -prefix /opt/qt-embedded-lgpl-4.7.1 -prefix-install -embedded x86 -nomake examples -nomake demos && make
    To copy to clipboard, switch view to plain text mode 

    and got the following errors:

    Qt Code:
    1. g++ -c -pipe -fno-exceptions -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -O2 -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DELF_INTERPRETER=\"/lib/ld-linux.so.2\" -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -DQT_HAVE_MMX -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/qws/linux-x86-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared-emb-x86 -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared-emb-x86 -o .obj/release-shared-emb-x86/qregexp.o tools/qregexp.cpp
    2. ../../src/corelib/tools/qmap.h: In member function `QMap<Key, T>::iterator
    3. QMap<Key, T>::insert(const Key&, const T&) [with Key = int, T = int]':
    4. tools/qregexp.cpp:1547: instantiated from here
    5. ../../src/corelib/tools/qmap.h:561: error: template-argument `
    6. QMapData::<anonymous enum>' uses anonymous type
    7. ../../src/corelib/tools/qmap.h: In member function `QMap<Key, T>::iterator
    8. QMap<Key, T>::insertMulti(const Key&, const T&) [with Key = int, T = int]':
    9. tools/qregexp.cpp:629: instantiated from here
    10. ../../src/corelib/tools/qmap.h:597: error: template-argument `
    11. QMapData::<anonymous enum>' uses anonymous type
    12. ../../src/corelib/tools/qmap.h: In member function `void QMap<Key,
    13. T>::detach_helper() [with Key = int, T = int]':
    14. ../../src/corelib/tools/qmap.h:202: instantiated from `void QMap<Key, T>::detach() [with Key = int, T = int]'
    15. tools/qregexp.cpp:559: instantiated from here
    16. ../../src/corelib/tools/qmap.h:754: error: template-argument `
    17. QMapData::<anonymous enum>' uses anonymous type
    18. ../../src/corelib/tools/qmap.h: In member function `QMap<Key, T>::iterator
    19. QMap<Key, T>::erase(QMap<Key, T>::iterator) [with Key = int, T = int]':
    20. tools/qregexp.cpp:3454: instantiated from here
    21. ../../src/corelib/tools/qmap.h:715: error: template-argument `
    22. QMapData::<anonymous enum>' uses anonymous type
    23. make[1]: *** [.obj/release-shared-emb-x86/qregexp.o] Error 1
    24. make[1]: Leaving directory `/src/qt/free/qt-everywhere-opensource-src-4.7.1/src/corelib'
    25. make: *** [sub-corelib-make_default-ordered] Error 2
    To copy to clipboard, switch view to plain text mode 

    Can anyone please tell me how I can successfully compile using gcc 3.3.3? Specifically I need to link against libstdc++.so.5 because of other system components, and a newer version like gcc 3.4.6 does already ship with libstdc++.so.6. (it works with 3.4.6, but I then get the warning

    Qt Code:
    1. /usr/bin/ld: warning: libstdc++.so.6, needed by /opt/qt-embedded-lgpl-4.7.1/lib/libQtGui.so, may conflict with libstdc++.so.5
    To copy to clipboard, switch view to plain text mode 

    --tst.

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Is it possible to compile Qt 4.7.1 on Linux using gcc 3.3.3?

    You can try falling back to a much earlier version of Qt; version 3x might work with such an old compiler. But I have my doubts.

    A much, much better approach would be to upgrade your system and compiler.

  3. #3
    Join Date
    Sep 2009
    Posts
    72
    Thanked 10 Times in 10 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi
    Platforms
    Unix/X11 Windows

    Default Re: Is it possible to compile Qt 4.7.1 on Linux using gcc 3.3.3?

    I think it should work, do let us know the result and need of it

  4. #4
    Join Date
    Nov 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Is it possible to compile Qt 4.7.1 on Linux using gcc 3.3.3?

    Thanks for the helpful remark Other suggestions?

  5. #5
    Join Date
    Apr 2011
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Is it possible to compile Qt 4.7.1 on Linux using gcc 3.3.3?

    I'm running into this too since I'm building Qt for a QNX system where I only have gcc 3.3 available. You can fix this in the source by making sure the enumerations referenced by the compiler error are named types. For QMap I changed

    'enum { LastLevel = 11, Sparseness = 3 };'

    to

    'enum StupidGCC3 { LastLevel = 11, Sparseness = 3 };'

    in qmap.h to get it to compile. There'll probably be other occurrences of the same problem - I just found one in qchar.cpp for the enumeration containing Hangul_SBase and so on, for example.

Similar Threads

  1. My first Linux QT program wont compile
    By GrahamLabdon in forum Newbie
    Replies: 1
    Last Post: 27th October 2010, 15:49
  2. Can't Compile on Ubuntu Linux
    By mpauley in forum Newbie
    Replies: 6
    Last Post: 9th April 2010, 22:00
  3. How do I compile for linux on windows?
    By waitingforzion in forum Newbie
    Replies: 4
    Last Post: 28th December 2009, 07:51
  4. how to corss compile for windows in Linux
    By safknw in forum Qt Programming
    Replies: 24
    Last Post: 13th May 2006, 05:23
  5. Replies: 4
    Last Post: 12th January 2006, 04:16

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
  •  
Qt is a trademark of The Qt Company.