Trolls,

I'm trying to compile Qt4.4beta1 on Solaris10 with SunStudio12, and I have 
found (right now) 7 different errors, 6 of which I'm able to workaround by 
changing some code.  The 7th one really has me confused.  Honestly, I'm 
beginning to wonder if QtWebkit will compile on Solaris 10 with SunStudio12.  
I'm sure it works fine with gcc, but I can't use it.


1.  Compile error in webkit/WebCore/JavaScriptCore/pcre/pcre_compile.c.  It 
uses __inline, which is a gcc extension.  inline is the proper keyword here.

2.  Compile error in webkit/JavaScriptCore/wtf/HashMap.h (line 272), when used 
from npruntime.cpp.  It's complaining about "Cannot use 
std::pair<HashTableIterator, bool> to initialize 
std::pair<HashTableIteratorAdapter, bool>.  This is correct, because there is 
no templated assignment operator for std::pair in C++-98 or TR-1 to allow for 
the automatic conversion between the members of the std::pair.  I think it's in 
C++-0x, though.  The way to fix this is:

Instead of
    return m_impl.template add<KeyType, MappedType, TranslatorType>(key, 
mapped);
Use
    pair<typename HashTableType::iterator, bool> retval = m_impl.template 
add<KeyType, MappedType, TranslatorType>(key, mapped);
    return make_pair(iterator(retval.first), retval.second);

3.  Compile error in webkit/JavaScriptCore/wtf/HashSet.h (line 279 (& 289, both 
add functions)) when used from JavaScriptCore/bindings/runtime_root.cpp.  Same 
as #2, with similar solution.

4.  #include <stdbool.h>  is not allowed in C++ code, and doesn't need it since 
C++ has it's own bool datatype.  The easiest way around this is to guard the 
include as
#ifndef __cplusplus
#include <stdbool.h>
#endif

5.  On Solaris, munmap is only defined as   munmap(void *, size_t)  in POSIX 
mode or XPG4.2+ mode.  So, I added a
#define _XOPEN_VERSION 500
at the top of JavaScriptCore/kjs/collector.cpp

6.  On Solaris, JavaScriptCore/wtf/MathExtras.h assumes that on Solaris without 
GCC, you have isfinite.  However, isfinite is a C99 function, not a C++ 
function.  Therefore, it needs to redefine it's own.  Changing
#if PLATFORM(SOLARIS_OS) && COMPILER(GCC)
to
#if PLATFORM(SOLARIS_OS)
fixes the issue.

7.  While compiling WebCore/bindings/js/JSAttrCustom.cpp, I get the following 
error messages:
"/code2/Qt/qt-4.4.0-beta1/src/3rdparty/webkit/JavaScriptCore/wtf/PassRefPtr.h", 
line 37: Error: The type "WebCore::Event" is incomplete.
"/code2/Qt/qt-4.4.0-beta1/src/3rdparty/webkit/WebCore/dom/EventTargetNode.h", 
line 64:     Where: While instantiating 
"WTF::PassRefPtr<WebCore::Event>::PassRefPtr(WebCore::Event*)".
"/code2/Qt/qt-4.4.0-beta1/src/3rdparty/webkit/WebCore/dom/EventTargetNode.h", 
line 64:     Where: Instantiated from non-template code.
"/code2/Qt/qt-4.4.0-beta1/src/3rdparty/webkit/JavaScriptCore/wtf/PassRefPtr.h", 
line 45: Error: The type "WebCore::Event" is incomplete.
"/code2/Qt/qt-4.4.0-beta1/src/3rdparty/webkit/WebCore/dom/EventTargetNode.h", 
line 64:     Where: While instantiating 
"WTF::PassRefPtr<WebCore::Event>::~PassRefPtr()".
"/code2/Qt/qt-4.4.0-beta1/src/3rdparty/webkit/WebCore/dom/EventTargetNode.h", 
line 64:     Where: Instantiated from non-template code.
2 Error(s) detected.

I have no idea how this one is generated, as I can't follow the code.  Any help 
with this will be greatly appreciated.
 
Darin Broady
[EMAIL PROTECTED]

Reply via email to