Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
4.5.2
-
None
-
7a3c595421b98087da638a5e706320d0d936d828
Description
Hello,
I tried to compile Qt 4.5.2 on an old HP-UX 11.11 in 64-bit mode and I faced some issues.
$ uname -a
HP-UX lima B.11.11 U 9000/800 2286771896 unlimited-user licence
To achieve this compilation here is the environment I'm using:
Gnu Tools:
export PATH=/usr/local/tools/32bits/make/3.80/bin:/usr/local/tools/32bits/gzip/1.2.4/bin:/usr/local/tools/32bits/tar/1.14/bin:$PATH
GCC / BinUtils:
export PATH=/usr/local/tools/64bits/gcc/4.2.2/bin:$PATH
export SHLIB_PATH=/usr/local/tools/64bits/gcc/4.2.2/lib:$SHLIB_PATH
export COMPILER_PATH=/usr/local/tools/64bits/binutils/2.15/bin
$ gcc -v
Using built-in specs.
Target: hppa64-hp-hpux11.11
Configured with: ../gcc-4.2.2/configure --prefix=/usr/local/tools/64bits/gcc/4.2.2 --with-ld=/usr/bin/ld --disable-nls --enable-languages=c,c++ --enable-threads --host=hppa64-hp-hpux11.11 --with-gnu-as
Thread model: posix
gcc version 4.2.2
If you wonder why I use this gcc with this version of binutils, it's very simple: I tried several combinaisons between gcc and binutils, and gcc 4.2.2 / binutils 2.15 is the only one able to achieve the compilation (especially without dozens of assembly compilation errors).
And finally, the configure command I used:
./configure -platform hpux-g++-64 -prefix /usr/local/tools/64bits/qt/4.5.2/dynamic -no-separate-debug-info -no-openssl -no-largefile -release -no-qt3support -shared -no-svg -no-webkit -no-nis -no-cups -no-dbus -no-opengl -no-sm -no-xshape -no-xinerama -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-fontconfig -no-xkb -no-glib -qt-zlib -fast -nomake examples -nomake demos -nomake doc
After a few minutes, I've got the first compilation error on an assembly file:
gcc -c -g -Wall -W -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -fPIC -DQT_SHARED -DQT_EDITION=QT_EDITION_DESKTOP -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DHB_EXPORT=Q_CORE_EXPORT -I../../mkspecs/hpux-g++-64 -I. -I../../include -I../../include/QtCore -I.rcc/debug-shared -Iglobal -I../3rdparty/zlib -I../3rdparty/harfbuzz/src -I.moc/debug-shared -o .obj/debug-shared/q_ldcw.o arch/parisc/q_ldcw.s
arch/parisc/q_ldcw.s: Assembler messages:
arch/parisc/q_ldcw.s:2: Error: unknown pseudo-op: `.subspa'
arch/parisc/q_ldcw.s:3: Error: unknown pseudo-op: `.subspa'
arch/parisc/q_ldcw.s:5: Error: unknown pseudo-op: `.subspa'
arch/parisc/q_ldcw.s:6: Error: unknown pseudo-op: `.subspa'
arch/parisc/q_ldcw.s:10: Error: unknown pseudo-op: `.subspa'
I have no special skill on PA-RISC assembly, but I found a workaround with native cc compiler:
cc +DS2.0 +DA2.0W -c ./src/corelib/arch/parisc/q_ldcw.s -o ./src/corelib/.obj/release-shared/q_ldcw.o
It works, and I can achieve the complete complation.
Now the runtime part:
Even the compilation ended with success, when I try to use a program using tcpSocket I've got the following error:
QNativeSocketEngine::listen() was called by a socket other than QabstractSocket::TcpSocket
After a few researches in Qt sources, I found that the problem seems to be located in the
src/network/socket/qnativesocketengine.cpp file inside the QnativeSocketEngine::listen() method.
In fact, and I don't know why, but d->socketType = -1 on hp parisc. The correct value should be « QAbstractSocket::TcpSocket ».
If you want to reproduce this issue, you will find a sample (testQt.tgz) attached to this report.
Second attachment (patch-qt-4.5.2-h641111-sended.diff): it includes all modifications needed to compile qt 4.5.2 on such HP system.
Feel free to request for more information or testing!