Compile Qt 4.8.5 on RHEL 3.9



  • Hello,

    I had to compile a project on RHEL 3.9, using gcc 3.2.3. If someone has to do the same (I don't wish it to anyone...), here's some modifications I made :

    @cd $HOME
    tar xvzf qt-everywhere-opensource-src-4.8.5.tar.gz
    cd qt-everywhere-opensource-src-4.8.5
    ./configure --prefix=$HOME/Qt-4.8.5 -no-dbus -release -nomake examples -nomake demos -opensource -confirm-license -no-declarative -no-script -no-javascript-jit -noscripttools -no-webkit
    patch -p0 < patch_Qt-4.8.5_RHEL-3.9.txt
    export CPLUS_INCLUDE_PATH=/usr/kerberos/include
    make
    make install@

    The patch file :
    @diff -r orig/src/corelib/kernel/qobject.h patched/src/corelib/kernel/qobject.h
    356c356
    < { return o->findChild<T>(name); }

    { return o->template findChild<T>(name); }
    361c361
    < return o->findChildren<T>(name);


    return o->template findChildren<T>(name);
    

    368c368
    < return o->findChildren<T>(re);

    return o->template findChildren<T>(re);
    

    diff -r orig/src/corelib/thread/qthread_unix.cpp patched/src/corelib/thread/qthread_unix.cpp
    118c118
    < #define HAVE_TLS

    //#define HAVE_TLS
    288c288
    < prctl(PR_SET_NAME, (unsigned long)name, 0, 0, 0);


    //prctl(PR_SET_NAME, (unsigned long)name, 0, 0, 0);
    

    diff -r orig/src/corelib/tools/qchar.cpp patched/src/corelib/tools/qchar.cpp
    922c922
    < enum {

    enum namedEnum {
    diff -r orig/src/corelib/tools/qmap.h patched/src/corelib/tools/qmap.h
    67c67
    < enum { LastLevel = 11, Sparseness = 3 };


    enum namedEnum { LastLevel = 11, Sparseness = 3 };
    

    diff -r orig/src/gui/dialogs/qcolordialog.cpp patched/src/gui/dialogs/qcolordialog.cpp
    684c684
    < enum { foff = 3, coff = 4 }; //frame and contents offset

    enum namedEnum { foff = 3, coff = 4 }; //frame and contents offset
    

    diff -r orig/src/gui/itemviews/qlistview.cpp patched/src/gui/itemviews/qlistview.cpp
    2924c2924
    < QRect rect(QPoint(), topLeft);

    QRect rect ; rect.setBottomRight(topLeft);
    

    diff -r orig/src/gui/painting/qtessellator.cpp patched/src/gui/painting/qtessellator.cpp
    172c172
    < enum { default_alloc = 32 };

        enum namedEnum { default_alloc = 32 };
    

    diff -r orig/src/gui/widgets/qcalendarwidget.cpp patched/src/gui/widgets/qcalendarwidget.cpp
    67c67
    < enum {

    enum namedEnum {
    diff -r orig/src/gui/widgets/qsplashscreen.cpp patched/src/gui/widgets/qsplashscreen.cpp
    244c244
    < QRect r(QPoint(), d->pixmap.size());


    QRect r(0,0,d->pixmap.size().width(),d->pixmap.size().height());
    

    diff -r orig/src/network/socket/qnativesocketengine.cpp patched/src/network/socket/qnativesocketengine.cpp
    133c133
    < return (returnValue); \

        return returnValue; \
    

    138c138
    < return (returnValue); \

        return returnValue; \
    

    144c144
    < return (returnValue); \

        return returnValue; \
    

    150c150
    < return (returnValue); \

        return returnValue; \
    

    diff -r orig/src/network/socket/qudpsocket.cpp patched/src/network/socket/qudpsocket.cpp
    168c168
    < return (a); \

        return a; \
    

    diff -r orig/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp patched/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp
    82c82,83
    < QFile outputFile(QString(QLatin1String("qtgraphics-%0.trace")).arg(winId));

        QLatin1String tmpLatin1String("qtgraphics-%0.trace");
        QFile outputFile&#40;QString(tmpLatin1String&#41;.arg(winId));
    

    diff -r orig/src/sql/drivers/psql/qsql_psql.cpp patched/src/sql/drivers/psql/qsql_psql.cpp
    211,212c211
    < const char *sCode = PQresultErrorField(result, PG_DIAG_SQLSTATE);
    < msg += QString::fromLatin1("(%1)").arg(QString::fromLatin1(sCode));

      msg += QString::fromLatin1("(%1)").arg(QString::number(PQresultStatus(result)));
    

    diff -r orig/tools/assistant/tools/assistant/helpenginewrapper.cpp patched/tools/assistant/tools/assistant/helpenginewrapper.cpp
    74c74,75
    < const QString VersionKey(QString(QLatin1String("qtVersion%1$$$%2")).

    QLatin1String tmpLatin1String("qtVersion%1$$$%2");
    const QString VersionKey(QString(tmpLatin1String).
    

    diff -r orig/tools/assistant/tools/assistant/helpviewer_qtb.cpp patched/tools/assistant/tools/assistant/helpviewer_qtb.cpp
    61c61
    < , d(new HelpViewerPrivate(zoom))

    , d(new HelpViewerPrivate(int(zoom)))
    

    350c350
    < QMenu menu(QString(), 0);

    QMenu menu;
    

    diff -r orig/tools/linguist/lupdate/qdeclarative.cpp patched/tools/linguist/lupdate/qdeclarative.cpp
    229,232c229
    < TranslatorMessage msg(QString(), sourcetext,
    < QString(), QString(), m_fileName,
    < node->firstSourceLocation().startLine, QStringList(),
    < TranslatorMessage::Unfinished, plural);

                    TranslatorMessage msg;
    

    diff -r orig/tools/linguist/shared/ioutils.cpp patched/tools/linguist/shared/ioutils.cpp
    66c66
    < struct ::stat st;

    struct stat st;
    

    @

    Mathieu


  • Moderators

    Poor you... congrats for getting it to compile on such an old system.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.