Hi Thiago > You need to pass the "-library=stlport4" option to your compiler. You can do > that by setting CXXFLAGS and LDFLAGS before running configure: > > CXXFLAGS=-library=stlport4 LDFLAGS=-library=stlport4 ./configure .... > > If you're building 64-bit, remember that CXXFLAGS overrides the mkspec, so > you > need to add the appropriate -xarch= option or -m64. E.g.: > > CXXFLAGS="-library=stlport4 -m64" LDFLAGS="-library=stlport4 -m64" > ./configure > > Or, another possibility, is to edit your mkspecs/*/qmake.conf file and add > the > option there.
I usually go the latter route - less work later when running qmake. I've being doing it that way for quite a few years. > The change is in config.tests/unix/stl. See change > f120b5e4b63cbc30874fa21947b75d352f18d7df. It basically amounts to these > changes: > > + DummyIterator<int> it1, it2; > + int n = std::distance(it1, it2); > + std::advance(it1, 3); > > The Cstd STL supplied with Sun Studio cannot compile std::distance and > std::advance properly (it requires an extra argument). I added the stricter > testing because Qt Concurrent needs these two functions. OK. Not that I can imagine coding without STL. >>"../JavaScriptCore/wtf/Vector.h", line 48: Error, usererror: #error >>WTF_ALIGN macros need alignment control.. > > Hmm... This was fixed in the src/3rdparty/javascriptcore/wtf/Vector.h file, > but > not in src/3rdparty/webkit/wtf/Vector.h. > > The changes are being upstreamed to webkit, so they should land there soon. > See also https://bugs.webkit.org/show_bug.cgi?id=24932. Good. I've bookmarked the web page. Some of the workarounds are not necessary if you change the compiler flags. I use QMAKE_CFLAGS = -errtags=yes -xc99 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ QMAKE_CXXFLAGS = -library=stlport4 -errtags=yes -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ For instance, for this one https://bug-24932-attachments.webkit.org/attachment.cgi?id=33639 will then go away. (I use C99 since Qt 4.4 or 4.5 needed it, haven't gone back to trying C90). And while I'm at it ... QMAKE_CFLAGS_WARN_ON = -v QMAKE_CFLAGS_WARN_OFF = -w QMAKE_CXXFLAGS_WARN_ON = +w2 # but beware causes >10^5 warnings I think that these are safe and more correct even for old versions of CC. QMAKE_CXXFLAGS_DEBUG = -g0 Can't remember when this became available, at least CC 5.8. QMAKE_CFLAGS_RELEASE = -O # -fast if you're daring Currently qmake.conf uses -O2, which is less than the default -O optimization which is the same as -O3 -fast causes a lot of CC core dumps for me, both on sparc and amd64, CC 5.10. I also removed QMAKE_CLEAN = -r $(OBJECTS_DIR)Templates.DB $(OBJECTS_DIR)SunWS_cache Templates.DB goes with back to the mists of time, my guess Workshop 3 or 4 (that's 12 or 13 versions ago). SunWS_cache went out with Workshop 6u2 (that's CC 5.3, 7 versions ago). Leaving it is harmless. Last thing that I modify is to use my own versions of fontconfig and freetype. The /usr/sfw versions on Solaris result in a Qt with terrible jagged and badly rendered fonts. >>(Compilation failure due to the use of non-standard extensions. Don't >>tell me "compiler not supported because it isn't non-standard enough"). > > Interestingly, I think Sun CC supports the extension. But I'm not sure about > the other two compilers we need to support (IBM xlC and HP aCC), so I kept > the > Vector workaround for all compilers. The Solaris machines build a lot more > often than the AIX and HP-UX machines in the office, so we can catch the > issue > sooner. "../JavaScriptCore/wtf/Vector.h", line 60: Warning, attrskipunsup: attribute __aligned__ is unsupported and will be skipped.. I get this even if I use -features=extensions. > In contrast to Sun CC, xlC 7 is a worse compiler. It has a lot more issues > with compilation requiring workarounds. aCC 6 is a good compiler, but I > didn't > have much experience with WebKit on it. But both of those come with a > *standard* STL, which Sun CC doesn't. For Solaris, it isn't a compiler issue, but an OS issue. libCstd is part of Solaris, and for better or for worse, Sun has decided to never break backwards compatibility. This means that Solaris is stuck with a fairly ancient and broken C++ std lib forever. You can, as you realize, use stlport4 or a 3rd party C++ std lib (Apache, which I've tried, and I guess that the Dinkum version would work as well; I don't know of any others). > A couple of months ago, I managed to compile and link QtWebKit in debug mode > with CC 5.9 on a Solaris 10 machine. I could even browse the web without a > problem. So far I've only tried launching designer and assistant of Qt 4.6. A+ Paul -- Paul Floyd http://paulf.free.fr _______________________________________________ Qt4-preview-feedback mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback
