I compile qt 3.3.8 and qt 4.3.2 using PGI 7.12 on redhat AS 3.5 x86-64, but not successful.
Can you give us a pointer where to download the source?
Qt is the standard framework for developing high-performance cross-platform applications. Qt provides single-source portability across Microsoft Windows, Mac OS X, Linux, all major commercial Unix variants, and embedded Linux.
There is two version: 3.3.8 and 4.3.2
Windows: 3.3.8 is not free
X11(Linux/Unix): qt-x11-free-3.3.8.tar.gz qt-x11-opensource-src-4.3.2.tar.gz
I have downloaded 4.3.2 version. It does not look like they port for PGI. There are a quite few issues, including no C99 support with PGI C++. We will investigate and let you know as soon as possible.
Here is what I did to compile on X86_64 Qt 4.3.2 with 64-bit PGI compilers:
- Edit File: src/corelib/arch/qatomic_x86_64.h
#if defined(Q_CC_GNU) || defined(Q_CC_INTEL)
#if defined(Q_CC_GNU) || defined(Q_CC_INTEL) || defined(Q_CC_PGI)
2) Edit file: src/script/qscriptlexer.cpp
#if defined(Q_WS_WIN) || defined(Q_OS_SOLARIS) || defined(Q_OS_IRIX) || defined(Q_CC_HPACC) || defined(Q_OS_AIX) || defined(Q_OS_OPENBSD)
dval = strtod(buffer8,0L)
#if defined(Q_WS_WIN) || defined(Q_OS_SOLARIS) || defined(Q_OS_IRIX) || defined(Q_CC_HPACC) || defined(Q_OS_AIX) || defined(Q_OS_OPENBSD) || defined(Q_CC_PGI)
dval = strtod(buffer8,0L)
Note:strtold is C99 and PGI does not yet support C99 and have no plan in the near future. strtod should be sufficient.
- Edit file: src/corelib/kernel/qeventdispatcher_unix_p.h
Another workaround: If you don’t want to update a source,
you can add -I/usr/include to compiler include flags to include system time.h instead of PGI time.h but we don’t know what would be the side effects.
- make new platform for 64-bit PGI,
- cp -rf mkspecs/linux-pgcc mkspecs/linux-pgcc-64
- cp -f mkspecs/linux-g+±64/qplatformdefs.h mkspecs/linux-pgcc-64
- Edit file mkspecs/linux-pgcc-64/qmake.conf
QMAKE_LIBDIR_X11 = /usr/X11R6/lib
QMAKE_LIBDIR_X11 = /usr/X11R6/lib64
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib64
5) configure with -no-stl.
% ./configure -prefix /your/install/dir -platform linux-pgcc-64 -no-stl
The reason to do this because if src/corelib/tools/qhash.cpp uses STL and there will be a clash in a name “hash”, which is also function names in that file. For Redhat, I would add -no-openssl if you don’t have its source.
I have not tried to run it. Hopefully, it will be OK.
I compile qt 4.3.2 successfully. I try compile qt 3.3.8. Two file need fixed:
src/tools/qdatastream.cpp, line 518
src/tools/qdir_unix.cpp, line 216
compile qt lib is ok. but when compile designer, uic( qt tool ) is run segment fault! Could you try qt 3.3.8, thanks!
I have compiled qt 3.3.8 on Rhel 4 with following configuration:
% ./configure -prefix /your/location -platform linux-pgcc-64 -no-stl -thread --disable-largefile -static -system-libpng -system-libjpeg
I am not familiar with qt and I run a few binaries in examples/* directories and it seems to run just fine.
You need to create linux-pgcc-64 the same/similar way as mentioned above in 4.3.2 version.
Update linux-pgcc-64, change -fast to -O2. I don’t think it will make any difference as I also compile with -fast and it seems to run fine too but to be on the safe side as -fast contains many optimization and could cause an error.
Change src/tools/qdatastream.cpp , line 518 as you mentioned.
No change for qdir_unix.cpp, line 216. I decided to use --disable-largefile instead as we don’t know the side effect for source change and -D_FILE_OFFSET_BITS=64.
I used system libpng and libjpeg as we don’t know if qt ported their source for PGI or not. libmng is not available on the machine I compile.
Additional info on strtold:
- strtold is string to long double.
- gcc long double is an 80-bit FP number format.
pgcc, pgCC long double is a 64-bit FP number format.
- We do not see adding support for > 64-bit long doubles for some time.