Status of kdelibs
Adriaan de Groot <[email protected]>
| Newsgroups | gmane.comp.kde.solaris |
|---|---|
| Message-ID | <[email protected]> |
kdelibs compiles to 85% completion right now. It fails as described earlier
but the compiler team (who never sleep and only get two days off a year, it
seems) assures me this is already fixed. We'll just need to wait for a newer
version of the compiler.
Most of the fixes I have done are in KDE SVN. Some are not. Some of the fixes
are Cstd vs. stlport related, and I certainly don't feel comfortable
committing any more until that issue is resolved. So. Get KDE SVN trunk.
Patch explanations:
1) Workaround sizeof() in templates; fixed in upcoming compiler release.
2) Workaround missing parts of STL.
3) There's a hack to take cacheGlobalObject out of the KJS namespace, while
Studio demands that it be in there. Hack the hack.
4) Applying & to return value of a function; seems dodgy. Error in studio,
goes unnoticed in gcc. Correctness of this patch unknown.
5) Ambiguity in operators reduced.
6) I suspect Studio is being stupid here, but there must be some deep reason
why the ?: picks up the wrong types and if() gets the right ones.
After these bits, there is one optional patch:
7) Make automoc run one job only, not 10 -- may be needed to prevent timeouts.
and one bit of weird-ass shit:
8) A bug in qdbus-something-or-other means that gcc-isms have been introduced
into kioslave/http/kcookiejar/ . This patch removes the gcc-ism and
introduces a different ugly hack. However, the DBUS code which is generated
needs to have #include "qdeclareqlistint_hack.h" added at the top as well,
which I can't do with a patch -- add that line and re-run make.
With these 8 patches, you should be able to get through kdelibs to about 85%
before hitting the weird mangled asserts. There's not much to do after that;
I need to sort through the remaining error messages. There only seem to be 3
left.
--
These are your friends - Adem
GPG: FEA2 A3FE Adriaan de Groot
___________________________________________________
This message is from the kde-solaris mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde-solaris.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.
1-kjs-wtf-HashTraits.diff
(text/x-diff, 2.1 KB)
Index: kjs/wtf/HashTraits.h
===================================================================
--- kjs/wtf/HashTraits.h (revision 701955)
+++ kjs/wtf/HashTraits.h (working copy)
@@ -94,15 +94,22 @@
static unsigned long long deletedValue() { return static_cast<unsigned long long>(-1); }
};
+#if PLATFORM(SOLARIS_OS)
+# warning Assuming all pointers are sized like void *
+# define TEMPLATE_PTR_SIZEOF(P) sizeof(void *)
+#else
+# define TEMPLATE_PTR_SIZEOF(P) sizeof(P*)
+#endif
+
template<typename P> struct HashTraits<P*> : GenericHashTraits<P*> {
- typedef HashTraits<typename IntTypes<sizeof(P*)>::SignedType> StorageTraits;
+ typedef HashTraits<typename IntTypes<TEMPLATE_PTR_SIZEOF(P)>::SignedType> StorageTraits;
static const bool emptyValueIsZero = true;
static const bool needsDestruction = false;
static P* deletedValue() { return reinterpret_cast<P*>(-1); }
};
template<typename P> struct HashTraits<RefPtr<P> > : GenericHashTraits<RefPtr<P> > {
- typedef HashTraits<typename IntTypes<sizeof(P*)>::SignedType> StorageTraits;
+ typedef HashTraits<typename IntTypes<TEMPLATE_PTR_SIZEOF(P)>::SignedType> StorageTraits;
static const bool emptyValueIsZero = true;
static const bool needsRef = true;
static void ref(const RefPtr<P>& p) { if (p) p->ref(); }
@@ -186,12 +193,12 @@
typedef TraitsArg Traits;
};
template<typename P> struct HashKeyStorageTraits<PtrHash<P*>, HashTraits<P*> > {
- typedef typename IntTypes<sizeof(P*)>::SignedType IntType;
+ typedef typename IntTypes<TEMPLATE_PTR_SIZEOF(P)>::SignedType IntType;
typedef IntHash<IntType> Hash;
typedef HashTraits<IntType> Traits;
};
template<typename P> struct HashKeyStorageTraits<PtrHash<RefPtr<P> >, HashTraits<RefPtr<P> > > {
- typedef typename IntTypes<sizeof(P*)>::SignedType IntType;
+ typedef typename IntTypes<TEMPLATE_PTR_SIZEOF(P)>::SignedType IntType;
typedef IntHash<IntType> Hash;
typedef HashTraits<IntType> Traits;
};
3-kjs-lookup.diff
(text/x-diff, 2.1 KB)
Index: kjs/lookup.h
===================================================================
--- kjs/lookup.h (revision 701955)
+++ kjs/lookup.h (working copy)
@@ -273,6 +273,10 @@
* when a gcc with http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8355 is mainstream enough.
*/
+#if COMPILER(SUNPRO)
+namespace KJS {
+#endif
+
/**
* This template method retrieves or create an object that is unique
* (for a given interpreter) The first time this is called (for a given
@@ -294,6 +298,10 @@
return newObject;
}
+#if COMPILER(SUNPRO)
+} // namespace
+#endif
+
/**
* Helpers to define prototype objects (each of which simply implements
* the functions for a type of objects).
@@ -313,9 +321,16 @@
// Work around a bug in GCC 4.1
#if !COMPILER(GCC)
+#if COMPILER(SUNPRO)
+#define KJS_GCC_ROOT_NS_HACK KJS::
+#define KJS_CACHE_NS KJS
+#else
#define KJS_GCC_ROOT_NS_HACK ::
+#define KJS_CACHE_NS
+#endif
#else
#define KJS_GCC_ROOT_NS_HACK
+#define KJS_CACHE_NS
#endif
// These macros assume that a prototype's only properties are functions
@@ -357,7 +372,7 @@
Identifier* ClassProto::s_name = 0; \
JSObject *ClassProto::self(ExecState *exec) \
{ \
- return ::cacheGlobalObject<ClassProto>(exec, *name()); \
+ return KJS_CACHE_NS::cacheGlobalObject<ClassProto>(exec, *name()); \
} \
bool ClassProto::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot) \
{ \
Index: khtml/ecma/kjs_binding.h
===================================================================
--- khtml/ecma/kjs_binding.h (revision 701955)
+++ khtml/ecma/kjs_binding.h (working copy)
@@ -389,7 +389,7 @@
friend ObjectImp* KJS_GCC_ROOT_NS_HACK cacheGlobalObject<ClassProto>(ExecState *exec, const Identifier &propertyName); \
public: \
static ObjectImp* self(ExecState *exec) { \
- return ::cacheGlobalObject<ClassProto>(exec, *name()); \
+ return KJS_CACHE_NS::cacheGlobalObject<ClassProto>(exec, *name()); \
} \
virtual const ClassInfo *classInfo() const { return &info; } \
static const ClassInfo info; \
2-kjs-wtf.diff
(text/x-diff, 3.5 KB)
Index: kjs/wtf/HashSet.h
===================================================================
--- kjs/wtf/HashSet.h (revision 701955)
+++ kjs/wtf/HashSet.h (working copy)
@@ -265,7 +265,12 @@
{
const bool canReplaceDeletedValue = !ValueTraits::needsDestruction || StorageTraits::needsDestruction;
typedef HashSetTranslator<canReplaceDeletedValue, ValueType, StorageTraits, HashFunctions> Translator;
- return m_impl.template add<ValueType, ValueType, Translator>(value, value);
+#if COMPILER(SUNPRO)
+ std::pair<HashTableType::iterator,bool> p = m_impl.template add<ValueType, ValueType, Translator>(value, value);
+ return std::make_pair(iterator(p.first),p.second);
+#else
+ return m_impl.template add<ValueType, ValueType, Translator>(value, value);
+#endif
}
template<typename Value, typename HashFunctions, typename Traits>
@@ -275,7 +280,12 @@
{
const bool canReplaceDeletedValue = !ValueTraits::needsDestruction || StorageTraits::needsDestruction;
typedef HashSetTranslatorAdapter<canReplaceDeletedValue, ValueType, StorageTraits, T, Translator> Adapter;
+#if COMPILER(SUNPRO)
+ std::pair<HashTableType::iterator,bool> p = m_impl.template add<T, T, Adapter>(value, value);
+ return std::make_pair(iterator(p.first),p.second);
+#else
return m_impl.template add<T, T, Adapter>(value, value);
+#endif
}
template<typename T, typename U, typename V>
Index: kjs/wtf/HashTraits.h
===================================================================
--- kjs/wtf/HashTraits.h (revision 701955)
+++ kjs/wtf/HashTraits.h (working copy)
@@ -94,15 +94,22 @@
static unsigned long long deletedValue() { return static_cast<unsigned long long>(-1); }
};
+#if PLATFORM(SOLARIS_OS)
+# warning Assuming all pointers are sized like void *
+# define TEMPLATE_PTR_SIZEOF(P) sizeof(void *)
+#else
+# define TEMPLATE_PTR_SIZEOF(P) sizeof(P*)
+#endif
+
template<typename P> struct HashTraits<P*> : GenericHashTraits<P*> {
- typedef HashTraits<typename IntTypes<sizeof(P*)>::SignedType> StorageTraits;
+ typedef HashTraits<typename IntTypes<TEMPLATE_PTR_SIZEOF(P)>::SignedType> StorageTraits;
static const bool emptyValueIsZero = true;
static const bool needsDestruction = false;
static P* deletedValue() { return reinterpret_cast<P*>(-1); }
};
template<typename P> struct HashTraits<RefPtr<P> > : GenericHashTraits<RefPtr<P> > {
- typedef HashTraits<typename IntTypes<sizeof(P*)>::SignedType> StorageTraits;
+ typedef HashTraits<typename IntTypes<TEMPLATE_PTR_SIZEOF(P)>::SignedType> StorageTraits;
static const bool emptyValueIsZero = true;
static const bool needsRef = true;
static void ref(const RefPtr<P>& p) { if (p) p->ref(); }
@@ -186,12 +193,12 @@
typedef TraitsArg Traits;
};
template<typename P> struct HashKeyStorageTraits<PtrHash<P*>, HashTraits<P*> > {
- typedef typename IntTypes<sizeof(P*)>::SignedType IntType;
+ typedef typename IntTypes<TEMPLATE_PTR_SIZEOF(P)>::SignedType IntType;
typedef IntHash<IntType> Hash;
typedef HashTraits<IntType> Traits;
};
template<typename P> struct HashKeyStorageTraits<PtrHash<RefPtr<P> >, HashTraits<RefPtr<P> > > {
- typedef typename IntTypes<sizeof(P*)>::SignedType IntType;
+ typedef typename IntTypes<TEMPLATE_PTR_SIZEOF(P)>::SignedType IntType;
typedef IntHash<IntType> Hash;
typedef HashTraits<IntType> Traits;
};
4-khtml-misc-loader.diff
(text/x-diff, 522 B)
Index: khtml/misc/loader.cpp
===================================================================
--- khtml/misc/loader.cpp (revision 701955)
+++ khtml/misc/loader.cpp (working copy)
@@ -490,8 +490,10 @@
if (r.isNull()) return r;
//See whether we should scale
+ QPixmap dummy_scaled;
if (xWidth != s.width() || xHeight != s.height()) {
- src = &scaled_pixmap(xWidth, xHeight);
+ dummy_scaled = scaled_pixmap(xWidth, xHeight);
+ src = &dummy_scaled;
} else {
src = &r;
}
5-khtml-ecma-kjs_css.diff
(text/x-diff, 808 B)
Index: khtml/ecma/kjs_css.cpp
===================================================================
--- khtml/ecma/kjs_css.cpp (revision 701955)
+++ khtml/ecma/kjs_css.cpp (working copy)
@@ -247,10 +247,11 @@
styleDecl.removeProperty(pId);
else {
int important = propvalue.indexOf("!important", 0, Qt::CaseInsensitive);
+ int e = exception;
if (important == -1)
- styleDecl.setProperty(pId, DOM::DOMString(propvalue), "", exception);
+ styleDecl.setProperty(pId, DOM::DOMString(propvalue), "", e);
else
- styleDecl.setProperty(pId, DOM::DOMString(propvalue.left(important - 1)), "important", exception);
+ styleDecl.setProperty(pId, DOM::DOMString(propvalue.left(important - 1)), "important", e);
}
}
else
6-khtml-xml-dom_elementimpl.diff
(text/x-diff, 727 B)
Index: khtml/xml/dom_elementimpl.h
===================================================================
--- khtml/xml/dom_elementimpl.h (revision 701955)
+++ khtml/xml/dom_elementimpl.h (working copy)
@@ -112,7 +112,7 @@
struct AttributeImpl
{
NodeImpl::Id id() const { return m_attrId ? m_attrId : m_data.attr->id(); }
- DOMStringImpl *val() const { return m_attrId ? m_data.value : m_data.attr->val(); }
+ DOMStringImpl *val() const { if (m_attrId) return m_data.value; else return m_data.attr->val(); }
DOMString value() const { return val(); }
AttrImpl *attr() const { return m_attrId ? 0 : m_data.attr; }
DOMString namespaceURI() { return m_attrId ? DOMString() : m_data.attr->namespaceURI(); }
8-kioslave.diff
(text/x-diff, 1.6 KB)
Index: kioslave/http/kcookiejar/kcookieserver.cpp
===================================================================
--- kioslave/http/kcookiejar/kcookieserver.cpp (revision 701955)
+++ kioslave/http/kcookiejar/kcookieserver.cpp (working copy)
@@ -24,6 +24,10 @@
//
// KDE Cookie Server
+#ifdef NEED_QMETATYPE_QLIST_INT_HACK
+#include "qdeclareqlistint_hack.h"
+#endif
+
#include "kcookieserver.h"
#define SAVE_DELAY 3 // Save after 3 minutes
Index: kioslave/http/kcookiejar/main.cpp
===================================================================
--- kioslave/http/kcookiejar/main.cpp (revision 701955)
+++ kioslave/http/kcookiejar/main.cpp (working copy)
@@ -20,6 +20,9 @@
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#ifdef NEED_QMETATYPE_QLIST_INT_HACK
+#include "qdeclareqlistint_hack.h"
+#endif
#include <QtDBus/QtDBus>
#include <kcmdlineargs.h>
Index: kioslave/http/kcookiejar/CMakeLists.txt
===================================================================
--- kioslave/http/kcookiejar/CMakeLists.txt (revision 701955)
+++ kioslave/http/kcookiejar/CMakeLists.txt (working copy)
@@ -19,7 +19,7 @@
if(MSVC)
set_target_properties(kcookiejar4 PROPERTIES COMPILE_FLAGS "/FI${CMAKE_CURRENT_SOURCE_DIR}/qdeclareqlistint_hack.h" )
else(MSVC)
- set_target_properties(kcookiejar4 PROPERTIES COMPILE_FLAGS "-include \"${CMAKE_CURRENT_SOURCE_DIR}/qdeclareqlistint_hack.h\"" )
+ set_target_properties(kcookiejar4 PROPERTIES COMPILE_FLAGS "-DNEED_QMETATYPE_QLIST_INT_HACK" )
endif(MSVC)
target_link_libraries( kcookiejar4 ${KDE4_KDECORE_LIBS} )
7-cmake-automoc-kde4automoc.diff
(text/x-diff, 411 B)
Index: cmake/automoc/kde4automoc.cpp
===================================================================
--- cmake/automoc/kde4automoc.cpp (revision 701955)
+++ cmake/automoc/kde4automoc.cpp (working copy)
@@ -291,7 +291,7 @@
}
// we don't want too many child processes
- if (processes.size() > 10) {
+ if (processes.size() > 1) {
waitForProcesses();
}