View Full Version : 4.1.0 qmake compiler error - Solaris

11th January 2006, 17:42
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::operator<<(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?


12th January 2006, 02:02
Do you use a recent and supported compiler?

14th January 2006, 15:33
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 (http://sunsolve.sun.com/pub-cgi/getpatch.pl?documentId=111715)

16th January 2006, 20:02
Yeah I have. CC -V returns

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

16th January 2006, 21:48
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 (http://developers.sun.com/prodtech/cc/products/).

19th April 2007, 06:02
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()<<", 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.

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

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

Remove 'typename' from line 56 of qcache.h

Change static_cast to reinterpret_cast in line 753 of qpixmap.cpp, and in line 1129 of q3action.cpp

Change 'cc' to 'CC' in src/gui/Makefile

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

Change 'char* tmp' to 'const char* tmp' i ftrfork.c

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.