Compiling qwt on Opensolaris
Hi qwt folks,
maybe this would be more adequate to post to the qwt mailing-list, I'll report here first anyway:
compiling 5.0.x or 5.2.x on Opensolaris 6/09 with Sun cc breaks at:
Code:
slow@os:~/qwt-5.0.2/src$ make
CC -c -O2 -mt -KPIC -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/opt/csw/mkspecs/solaris-cc -I. -I/opt/csw//include -Imoc/ -o obj/qwt_plot_layout.o qwt_plot_layout.cpp
"qwt_plot_layout.cpp", line 815: Error: QMIN is not defined.
Huh? Whats happening? There's not QMIN in qwt_plot_layout.cpp:
Code:
$ grep QMIN qwt_plot_layout.cpp
$
So probably some prepoccessing going foobar?
Code:
slow@os:~/qwt-5.0.2/src$ grep QMIN *
qwt_math.h:#define qwtMin QMIN
Ah! Line 815 is indeed calling qwtMin. But where's QMIN ?
slow@os:~/qwt-5.0.2/src$ grep QMIN /opt/csw/include/*.h
Code:
/opt/csw/include/qglobal.h:#define QMIN(a, b) ((a) < (b) ? (a) : (b))
It's another macro. Hm. Let's see what the preprocessor is doing for us:
Code:
slow@os:~/qwt-5.0.2/src$ CC -E -O2 -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/opt/csw/mkspecs/solaris-cc -I. -I/opt/csw//include -Imoc/ qwt_plot_layout.cpp > qwt_plot_layout.i
slow@os:~/qwt-5.0.2/src$ grep QMIN *.i
qwt_plot_layout.i:length += QMIN
qwt_plot_layout.i:length += QMIN
Ouch! It didn't get expanded twice! gcc does a better job:
Code:
slow@os:~/qwt-5.0.2/src$ g++ -E -O2 -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/opt/csw/mkspecs/solaris-cc -I. -I/opt/csw//include -Imoc/ qwt_plot_layout.cpp > qwt_plot_layout.i
slow@os:~/qwt-5.0.2/src$ grep QMIN *.i
I'm currently also reading my way through the specs and documentation in order to get a clue.
Anybody?
-slow
Re: Compiling qwt on Opensolaris
QMIN is a macro from Qt3, with Qt4 qwtMin is a define for qMin. Is it intended, that you build for Qt3 ?
Uwe
Re: Compiling qwt on Opensolaris
Quote:
QMIN is a macro from Qt3, with Qt4 qwtMin is a define for qMin. Is it intended, that you build for Qt3 ?
No. That's the only binary version available via Opensolaris package manager ips from the Blastwave.org repository. I'll spare the ugly details, but the Blastwave.org repo is also accessible via it's own package manager pkgutil where more up2date packages are available (i.e. Qt4) so I'll try that next.
Thanks for the hint!! I'll post an update.
-slow
Re: Compiling qwt on Opensolaris
Ok, I have Qt 4.4.3 installed in /opt/csw. Now I get this error:
Code:
slow@os:~/qwt-5.0.2$ qmake
Project LOAD(): Feature qt_config cannot be found.
I've set these env vars:
Code:
slow@os:~/qwt-5.0.2$ env | grep Q
QTDIR=/opt/csw
QMAKESPEC=/opt/csw/mkspecs/solaris-g++
slow@os:~/qwt-5.0.2$ echo $PATH
/usr/local/bin:/opt/csw/bin:/opt/csw/sbin:/usr/bin:/usr/sbin:/sbin
QMAKESPEC=solaris-g++ also gives the same error. Google doesn't give me a working clue.
Anybody?
Thanks!
Re: Compiling qwt on Opensolaris
As it seems my installed version of Qt does not include the developer stuff. As there doesn't exits any Qt-dev package for Opensolaris, I'll try again to compile Qt from source.
-slow