PDA

View Full Version : The problem of compiling QT on solaris 10



terminator3
1st April 2012, 02:38
i am compiling Qt4.8.0 on solaris 10,when i am compile Qt with g++,it can success,configure as follows:
./configure -debug -platform solaris-g++-64 -no-webkit -no-script
gmake
gmake install

but,now i wanna compile Qt with CC ,but i get some errors ,the process is as follows:
export CC=cc
export CXX=CC
export CXXFLAGS="-m64 -library=stlport4"
export CFLAGS="-m64 -library=stlport4"
export LDFLAGS="-m64 -library=stlport4"
./configure -debug -platform solaris-cc-64 -no-webkit -no-script

this step is successful
but when i gmake,i get these errors:
Wrong IR type: 27

gmake[1]: *** [.obj/debug-shared/qpaintbuffer.o] Error 2
gmake[1]: Leaving directory `/export/home/tools/QT/install/qt-everywhere-opensource-src-4.8.0/src/gui'
gmake: *** [sub-gui-make_default-ordered] Error 2

i dont what the reason is ,so it is very kind of you to tell me how can i do to solve this problem and can compile Qt on solaris 10 successfully.
thank you very much

d_stranz
1st April 2012, 03:30
Did you clean out everything from the g++ build? Looks to me like it might be trying to link incompatible object files, so maybe there was something left over from the g++ compile.

terminator3
1st April 2012, 03:45
infact,i compile Qt with CC firstly,but unsuccessfully,so i turn to use g++.
that is to say,before i use g++,these errors occur when i use CC firstly.

terminator3
5th April 2012, 02:55
could anyone help me?

terminator3
6th April 2012, 02:28
could anyone help me?

ChrisW67
6th April 2012, 10:22
I guess not. If you have a working build with GCC why bother with the Solaris compiler?

terminator3
9th April 2012, 04:44
I guess not. If you have a working build with GCC why bother with the Solaris compiler?

because my executable file is compiled by CC(because of limitation,i cant compile this executable file with GCC),if i invoke Qt lib using this executable file ,there is someting wrong.Maybe it is caused by mismatching between CC and GCC.so i have to compile Qt with CC.

julio77it
22nd May 2012, 23:53
Hi,

I'm trying to compile and install Qt 4.8 and the last QtCreator (please forgive me but I don't remember the release). I've catched some error on Qt compilation and I've got to modify some files to let it compile (one or two implicit cast not accepted by Sun CC and a big issue about a enum declaration like "enum { <varname> = <boolean expression> }")

I have big big problems on QtCreator, too much warnings and some errors with I'm trying to fight, but for now they still win.

Does a solaris-cc patch exist for Qt / QtCreator ?

Thanx,
Giulio

julio77it
23rd May 2012, 10:57
I've built again Qt 4.8.1 tracking all the changes I've done: I'm not sure of my choices, every advice will be welcome.


System Info :
SunOS 5.10 sun4u sparc SUNW,SPARC-Enterprise Solaris
Sun Studio 12: C++ Compiler

Package :
qt-everywhere-opensource-src-4.8.1.tar.gz

First I ran this configuration script

./configure -no-stl \
-opensource \
-no-qt3support \
-no-multimedia \
-no-phonon \
-no-webkit \
-no-svg \
-no-javascript-jit \
-no-declarative \
-no-openvg \
-no-gtkstyle \
-xmlpatterns \
-no-glib \
-nomake examples \
-nomake demos \
-prefix <my install path> \
-prefix-install

Then I ran gmake

1. "src/corelib/tools/qstringbuilder.h", line 396: Error: An integer constant expression is required here.

original:
src/corelib/tools/qstringbuilder.h:396 enum { ExactSize = QConcatenable<A>::ExactSize && QConcatenable<B>::ExactSize };

changed in:
#ifdef Q_OS_SOLARIS
enum { ExactSize = false };
#else
enum { ExactSize = QConcatenable<A>::ExactSize && QConcatenable<B>::ExactSize };
#endif
(enum declaration requires constants)


2. "src/network/ssl/qsslcertificate.cpp", line 433: Error: Using reinterpret_cast to convert from void(stack_st*) to void(*)(void*) not allowed.

original:
q_sk_pop_free((STACK*)altNames, reinterpret_cast<void(*)(void*)>(q_sk_free));

changed in:
#ifdef Q_OS_SOLARIS
q_sk_pop_free((STACK*)altNames, (void(*)(void*))(q_sk_free));
#else
q_sk_pop_free((STACK*)altNames, reinterpret_cast<void(*)(void*)>(q_sk_free));
#endif
(old-style cast, sorry)

3. "src/gui/kernel/qdnd_x11.cpp", line 1468: Error: ShapeInput is not defined.

original:
windowContainsMouse = windowInteractsWithPosition(pos, w, ShapeInput) && windowInteractsWithPosition(pos, w, ShapeBounding);
changed in:
#ifdef Q_OS_SOLARIS
windowContainsMouse = windowInteractsWithPosition(pos, w, ShapeBounding);
#else
windowContainsMouse = windowInteractsWithPosition(pos, w, ShapeInput) && windowInteractsWithPosition(pos, w, ShapeBounding);
#endif
(I've searched unsuccessfully the definition of "ShapeInput" with shell commands)


It seems to work ...

Giulio