Results 1 to 7 of 7

Thread: 4.1.0 qmake compiler error - Solaris

  1. #1
    Join Date
    Jan 2006
    Posts
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default 4.1.0 qmake compiler error - Solaris

    I am trying to build Qt 4.1.0 X11/commercial version on Solaris 7/Forte 7. I am using "configure -plugin-sql-tds -release -fast". I get an error while qmake is building.

    /../src/corelib/io/qdebug.h", line 120: Error: Overloading ambiguity between "op
    erator<<(QDebug, const QVariant&)" and "QDebug:perator<<(bool)".
    1 Error(s) detected.
    make: *** [qvariant.o] Error 1

    I have installed all of the patches required for Sun Studio 7 as mentioned on the trollech website.

    Any thoughts?

    TIA.

  2. #2
    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: 4.1.0 qmake compiler error - Solaris

    Do you use a recent and supported compiler?

  3. #3
    Join Date
    Jan 2006
    Posts
    109
    Thanks
    2
    Thanked 5 Times in 5 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: 4.1.0 qmake compiler error - Solaris

    You still seem to be missing some patch. Have you installed the latest revisions of these patches. Especially the C++ compiler patch:
    Patch for Forte Developer 7 C++ compiler

  4. #4
    Join Date
    Jan 2006
    Posts
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: 4.1.0 qmake compiler error - Solaris

    Yeah I have. CC -V returns

    CC: Forte Developer 7 C++ 5.4 Patch 111715-17 2005/10/13

  5. #5
    Join Date
    Jan 2006
    Posts
    109
    Thanks
    2
    Thanked 5 Times in 5 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: 4.1.0 qmake compiler error - Solaris

    Mmmh... I may be mistaken, but I think one of the latest patches has introduced a compiler bug.

    If possible downgrade to a previous release of the patch and see if it helps.

    Otherwise contact Sun to have this fixed or use a newer compiler instead, Sun have already released Sun Studio 11.

  6. #6
    Join Date
    Apr 2007
    Posts
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: 4.1.0 qmake compiler error - Solaris

    There are two parts to fixing this problem.

    The first part, which must be performed before running configure, is to edit src/corelib/io/qdebug.h and change

    debug<<"("<<it.key()<<","<<it.value()<<")";

    to

    debug<<"("<<it.key()<<", UNAVAILABLE DUE TO SUN FORTE BUG)";

    The second part is to add '-DQ_BROKEN_DEBUG_STREAM' to the configure command line. This prevents the same error message from showing up during the building of the library.

    By the way, at the end of the configure step it says to run 'gmake'. This is futile. Run 'make' instead.

    This worked with Sun Workshop 6 update 2.

  7. #7
    Join Date
    Apr 2007
    Posts
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: 4.1.0 qmake compiler error - Solaris

    I spoke too soon. The following steps were also needed (first 6 are for compilation, and the last is for linking):

    1. Debug lines had to be stripped or commented out in several more files: qshortcutmap.cpp, qdnd_x11.cpp, qregion.cpp, qmainwindowlayout.cpp, qspinbox.cpp, qgraphicsitem.cpp, qsocks5socketengine.cpp, q3mainwindow.cpp
    2. Remove 'typename' from line 56 of qcache.h
    3. Change static_cast to reinterpret_cast in line 753 of qpixmap.cpp, and in line 1129 of q3action.cpp
    4. Change 'cc' to 'CC' in src/gui/Makefile
    5. Change 'png_structp p=png_ptr' to 'png_structp p=(png_structp) png_ptr', and 'png_ptr' to '(png_struct_def*) pngptr' in png.c
    6. Change 'char* tmp' to 'const char* tmp' i ftrfork.c
    7. Search through the *.cpp files in src/gui/text and change 'static bool operator<' to 'bool operator <' everywhere


    After all these steps I had no problems building two different example applications in the $QTDIR/examples directory.

  8. The following user says thank you to mmc1919 for this useful post:

    jacek (19th April 2007)

Similar Threads

  1. qmake sux a lot
    By singermornings in forum Qt Programming
    Replies: 6
    Last Post: 29th January 2009, 08:33
  2. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57
  3. Define compiler in qmake
    By philski in forum Newbie
    Replies: 3
    Last Post: 24th April 2006, 21:47

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.