| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 2 | |
I've been working through building qt 4.3 (from rsync) using the Sun Studio compiler on Linux. I'm planning on providing this to TT when it is OK. It builds fine (-platform linux-suncc) with the attached patch, and the Qt examples/demos run, but they segfault on exit: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 3471056 (LWP 6321)] 0x06fe0000 in ?? () (gdb) bt #0 0x06fe0000 in ?? () #1 0x0057601f in __1cVqt_call_post_routines6F_v_ () from /usr/local/Trolltech/Qt-4.3.0-snapshot-20070504/lib/libQtCore.so.4 #2 0x00fe6730 in __1cMQdDApplication2T6M_v_ () from /usr/local/Trolltech/Qt-4.3.0-snapshot-20070504/lib/libQtGui.so.4 #3 0x0804e264 in main () I'm going to try a few different compiler options and a debug build, but if anyone else has any ideas, please let me know. Brad
diff -Naur qt-x11-rsync/mkspecs/linux-suncc/qmake.conf qt-x11-rsync-suncc/mkspecs/linux-suncc/qmake.conf
diff -Naur qt-x11-rsync/mkspecs/linux-suncc/qmake.conf qt-x11-rsync-suncc/mkspecs/linux-suncc/qmake.conf
--- qt-x11-rsync/mkspecs/linux-suncc/qmake.conf 1970-01-01 10:00:00.000000000 +1000
+++ qt-x11-rsync-suncc/mkspecs/linux-suncc/qmake.conf 2007-05-04 17:47:05.000000000 +1000
@@ -0,0 +1,85 @@
+#
+# qmake configuration for linux-suncc
+#
+# Written for the Sun Studio C Compiler
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = c99
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -Xc -erroff=%all -errshort=full -errfmt=error -errwarn=%none -xipo=0 -features=extinl -s -xjobs=2 -xregs=no%frameptr -dalign -xprefetch=auto -xprefetch_auto_type=indirect_array_access -xprefetch_level=3 -xbuiltin=%all -xcsi -xinline=%auto -xustr=ascii_utf16_ushort -z now -z nodefaultlib -z combreloc -z redlocsym -z rescan -z absexec -xildoff -xldscope=symbolic -xF=%none -xalias_level=std -xsafe=mem -xthreadvar -lc -lpthread -lrt -D__EXTENSIONS__ -DXORG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_XPG4 -D_XPG4_2 -D_XPG6 -D_POSIX_PTHREAD_SEMANTICS -DQT_QLOCALE_NEEDS_VOLATILE -UUSE_X11R6_XIM -DQ_NO_PACKED_REFERENCE -DQT_THREAD_SUPPORT -DGTK_COMPILATION -UGTK_DISABLE_DEPRECATED -DLIBXML_THREAD_ALLOC_ENABLED -DQT_THREAD_SUPPORT -DNDEBUG -DNO_DEBUG -KPIC -DPIC -xtarget=pentium4 -xarch=sse2 -xchip=pentium4 -xcache=8/64/4:256/128/8
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -xO3
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -KPIC -DPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_THREAD = -mt -D_REENTRANT
+
+QMAKE_CXX = CC
+QMAKE_CXXFLAGS = -features=%all,extensions -instances=global -template=geninlinefuncs -xipo=0 -s -xregs=no%frameptr -xbuiltin=%all -xinline=%auto -xjobs=2 -xlibmil -xustr=ascii_utf16_ushort -xlibmopt -z now -z nodefaultlib -z combreloc -z redlocsym -z rescan -z absexec -xldscope=symbolic -xalias_level=compatible -xildoff -lc -lpthread -lrt -DNDEBUG -DNO_DEBUG -xF=%none -xthreadvar -D__EXTENSIONS__ -DXORG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_XPG4 -D_XPG4_2 -D_XPG6 -D_POSIX_PTHREAD_SEMANTICS -DQT_QLOCALE_NEEDS_VOLATILE -UUSE_X11R6_XIM -DQ_NO_PACKED_REFERENCE -DQT_THREAD_SUPPORT -DGTK_COMPILATION -UGTK_DISABLE_DEPRECATED -DLIBXML_THREAD_ALLOC_ENABLED -DQT_THREAD_SUPPORT -xtarget=pentium4 -xarch=sse2 -xchip=pentium4 -xcache=8/64/4:256/128/8
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG = -g
+QMAKE_LFLAGS_SHLIB = -G
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE
+QMAKE_LFLAGS_THREAD = -lc -lpthread -lrt -mt
+QMAKE_RPATH = -R
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_NIS = -lnsl
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff -Naur qt-x11-rsync/mkspecs/linux-suncc/qplatformdefs.h qt-x11-rsync-suncc/mkspecs/linux-suncc/qplatformdefs.h
--- qt-x11-rsync/mkspecs/linux-suncc/qplatformdefs.h 1970-01-01 10:00:00.000000000 +1000
+++ qt-x11-rsync-suncc/mkspecs/linux-suncc/qplatformdefs.h 2007-05-04 17:47:05.000000000 +1000
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License version 2.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of
+** this file. Please review the following information to ensure GNU
+** General Public Licensing requirements will be met:
+** http://www.trolltech.com/products/qt/opensource.html
+**
+** If you are unsure which license is appropriate for your use, please
+** review the following information:
+** http://www.trolltech.com/products/qt/licensing.html or contact the
+** sales department at sales@xxxxxxxxxxxxxx
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+****************************************************************************/
+#define _ISOC99_SOURCE 1
+#define _XOPEN_SOURCE 600
+#define _BSD_SOURCE 1
+
+#include "../linux-g++/qplatformdefs.h"
+
+#ifdef __i386
+#define __i386__
+#endif
+
+#ifdef __amd64
+#define __x86_64__
+#endif
+
+#ifdef truncate
+#undef truncate
+#endif
+
+#ifdef open
+#undef open
+#endif
+
+#define __builtin_expect(x,y) (x)
+
+typedef unsigned char u_char;
+typedef unsigned short u_short;
+typedef unsigned int u_int;
+typedef unsigned long u_long;
+
diff -Naur qt-x11-rsync/src/3rdparty/sqlite/sqlite3.c qt-x11-rsync-suncc/src/3rdparty/sqlite/sqlite3.c
--- qt-x11-rsync/src/3rdparty/sqlite/sqlite3.c 2007-05-04 09:20:37.000000000 +1000
+++ qt-x11-rsync-suncc/src/3rdparty/sqlite/sqlite3.c 2007-05-04 17:44:56.000000000 +1000
@@ -20,6 +20,7 @@
** This amalgamation was generated on 2007-04-18 15:18:29 UTC.
*/
#define SQLITE_AMALGAMATION 1
+#include "qplatformdefs.h"
/************** Begin file sqlite3.h *****************************************/
/*
** 2001 September 15
@@ -14603,9 +14604,18 @@
#ifdef SQLITE_UNIX_THREADS
static pthread_t mutexOwner; /* Thread holding mutexMain */
static int mutexOwnerValid = 0; /* True if mutexOwner is valid */
+#if defined(Q_CC_SUN) && defined(Q_OS_LINUX)
+/* the linux pthreads headers use an unnamed union, which is a C++ feature.
+ * However the Sun C compiler (used here) doesn't support that.
+ * So we hack around it
+ */
+static pthread_mutex_t mutexMain = {0,0,0,0,0}; /* The mutex */
+static pthread_mutex_t mutexAux = {0,0,0,0,0}; /* Aux mutex */
+#else
static pthread_mutex_t mutexMain = PTHREAD_MUTEX_INITIALIZER; /* The mutex */
static pthread_mutex_t mutexAux = PTHREAD_MUTEX_INITIALIZER; /* Aux mutex */
#endif
+#endif
/*
** The following pair of routine implement mutual exclusion for
diff -Naur qt-x11-rsync/src/network/qsslcertificate.cpp qt-x11-rsync-suncc/src/network/qsslcertificate.cpp
--- qt-x11-rsync/src/network/qsslcertificate.cpp 2007-05-04 09:20:52.000000000 +1000
+++ qt-x11-rsync-suncc/src/network/qsslcertificate.cpp 2007-05-04 17:44:56.000000000 +1000
@@ -98,6 +98,8 @@
\value StateOrProvinceName "ST" The state or province.
*/
+#include "qplatformdefs.h"
+
#include "qsslsocket_openssl_symbols_p.h"
#include "qsslcertificate.h"
#include "qsslcertificate_p.h"
diff -Naur qt-x11-rsync/src/network/qsslkey.cpp qt-x11-rsync-suncc/src/network/qsslkey.cpp
--- qt-x11-rsync/src/network/qsslkey.cpp 2007-05-04 09:20:52.000000000 +1000
+++ qt-x11-rsync-suncc/src/network/qsslkey.cpp 2007-05-04 17:44:56.000000000 +1000
@@ -50,6 +50,8 @@
\sa QSslSocket, QSslCertificate, QSslCipher
*/
+#include "qplatformdefs.h"
+
#include "qsslsocket_openssl_symbols_p.h"
#include "qsslkey.h"
#include "qsslkey_p.h"
diff -Naur qt-x11-rsync/src/network/qsslsocket.cpp qt-x11-rsync-suncc/src/network/qsslsocket.cpp
--- qt-x11-rsync/src/network/qsslsocket.cpp 2007-05-04 09:20:52.000000000 +1000
+++ qt-x11-rsync-suncc/src/network/qsslsocket.cpp 2007-05-04 17:44:56.000000000 +1000
@@ -228,6 +228,8 @@
or calling QSslSocket::ignoreErrors() will have no effect.
*/
+#include "qplatformdefs.h"
+
#include "qsslcipher.h"
#include "qsslsocket.h"
#include "qsslsocket_openssl_p.h"
diff -Naur qt-x11-rsync/src/network/qsslsocket_openssl.cpp qt-x11-rsync-suncc/src/network/qsslsocket_openssl.cpp
--- qt-x11-rsync/src/network/qsslsocket_openssl.cpp 2007-05-04 09:20:52.000000000 +1000
+++ qt-x11-rsync-suncc/src/network/qsslsocket_openssl.cpp 2007-05-04 17:44:56.000000000 +1000
@@ -36,6 +36,8 @@
**
****************************************************************************/
+#include "qplatformdefs.h"
+
#include "qsslsocket_openssl_p.h"
#include "qsslsocket_openssl_symbols_p.h"
#include "qsslsocket.h"
diff -Naur qt-x11-rsync/src/network/qsslsocket_openssl_symbols.cpp qt-x11-rsync-suncc/src/network/qsslsocket_openssl_symbols.cpp
--- qt-x11-rsync/src/network/qsslsocket_openssl_symbols.cpp 2007-05-04 09:20:52.000000000 +1000
+++ qt-x11-rsync-suncc/src/network/qsslsocket_openssl_symbols.cpp 2007-05-04 17:44:56.000000000 +1000
@@ -36,6 +36,8 @@
**
****************************************************************************/
+#include "qplatformdefs.h"
+
#include "qsslsocket_openssl_symbols_p.h"
#include <QtCore/qlibrary.h>
diff -Naur qt-x11-rsync/src/script/qscriptlexer.cpp qt-x11-rsync-suncc/src/script/qscriptlexer.cpp
--- qt-x11-rsync/src/script/qscriptlexer.cpp 2007-05-04 09:20:44.000000000 +1000
+++ qt-x11-rsync-suncc/src/script/qscriptlexer.cpp 2007-05-04 17:44:56.000000000 +1000
@@ -21,6 +21,8 @@
**
****************************************************************************/
+#include "qplatformdefs.h"
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
Attachment:
Attachment:
pgp11w38XiJhN.pgp
Description: PGP signature
Message 2 in thread
Brad Hards <bradh@xxxxxxxxxxxxx> wrote on 05/04/2007 08:23:59 PM:
# I've been working through building qt 4.3 (from rsync) using the Sun
Studio
# compiler on Linux. I'm planning on providing this to TT when it is OK.
FYI don't hold your breath for them to accept it; TT is not at all big
on accepting outside code. :-(
--
[ signature omitted ]