<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title></title>
</head>
<body>
Phil Thompson wrote:<br>
<blockquote type="cite"
 cite="mid200304292053.40593.phil@riverbankcomputing.co.uk">
  <pre wrap="">On Tuesday 29 April 2003 8:19 pm, Vic Kelson wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Are there build instructions for SIP/PyQt/PyKDE with python2.3b1?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Exactly the same as any other version of Python.

Phil
  </pre>
</blockquote>
't a'int workin' on my RedHat 7.3 system, with KDE3.1 built from
sources on /opt. I have Qt in /opt/qt-x11-free-3.1.1, and KDE in
/opt/kde3.1.<br>
<br>
First, I find a problem in build.py (shown below):<br>
<br>
<tt>[vic@limberlost sip-x11-gpl-3.5]$ export
QTDIR=/opt/qt-x11-free-3.1.1<br>
[vic@limberlost sip-x11-gpl-3.5]$ export KDEDIR=/opt/kde3.1<br>
[vic@limberlost sip-x11-gpl-3.5]$ python build.py -h<br>
An internal error occured.&nbsp; Please report all the output from the
program,<br>
including the following traceback, to <a class="moz-txt-link-abbreviated" href="mailto:phil@riverbankcomputing.co.uk">phil@riverbankcomputing.co.uk</a>.<br>
<br>
Traceback (most recent call last):<br>
&nbsp; File "build.py", line 948, in ?<br>
&nbsp;&nbsp;&nbsp; main(sys.argv)<br>
&nbsp; File "build.py", line 847, in main<br>
&nbsp;&nbsp;&nbsp; initGlobals()<br>
&nbsp; File "build.py", line 143, in initGlobals<br>
&nbsp;&nbsp;&nbsp; pyVersNr = int(vl[0]) * 10 + int(vl[1])<br>
ValueError: invalid literal for int(): 3b1<br>
[vic@limberlost sip-x11-gpl-3.5]$<br>
</tt><br>
Alas, the value of vl[1] is the string '3b1' (on my system, <tt>sys.version</tt>
is '2.3b1'), so KABLOOEY. I change this line to read:<br>
<br>
<tt>&nbsp;&nbsp;&nbsp; pyVersNr = int(vl[0]) * 10 + int(vl[1][0])</tt><br>
<br>
(that is, chop off the minor version number, without the 'b1'
appendage), and...<br>
<br>
<tt>[vic@limberlost sip-x11-gpl-3.5]$ python build.py -h<br>
Usage:<br>
&nbsp;&nbsp;&nbsp; build.py [-h] [-b dir] [-d dir] [-e dir] [-f gccflag] [-g prog] [-i
dir] [-l Qt-library] [-m prog] [-p dir] [-q dir] [-u] [-w] [-x]<br>
where:<br>
&nbsp;&nbsp;&nbsp; -h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; display this help message<br>
&nbsp;&nbsp;&nbsp; -b dir&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where the SIP code generator will be installed
[default /usr/local/bin]<br>
&nbsp;&nbsp;&nbsp; -d dir&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where the SIP module will be installed [default
/opt/lib/python2.3b1/site-packages]<br>
&nbsp;&nbsp;&nbsp; -e dir&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where the SIP header files will be installed
[default /opt/include/python2.3b1]<br>
&nbsp;&nbsp;&nbsp; -f gccflag&nbsp;&nbsp;&nbsp;&nbsp; additional GCC flag, eg. -fno-exceptions<br>
&nbsp;&nbsp;&nbsp; -g prog&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the name of the Makefile generator<br>
&nbsp;&nbsp;&nbsp; -i dir&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the directory containing the Qt header files
[default $QTDIR/include]<br>
&nbsp;&nbsp;&nbsp; -l Qt-library&nbsp; explicitly specify the type of Qt library, either
qt, qt-mt or qte<br>
&nbsp;&nbsp;&nbsp; -m prog&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the name of the Make program [default make]<br>
&nbsp;&nbsp;&nbsp; -q dir&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the Qt base directory [default $QTDIR]<br>
&nbsp;&nbsp;&nbsp; -u&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; build with debugging symbols<br>
&nbsp;&nbsp;&nbsp; -w&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enable the use of Python 1.5.x under Windows<br>
&nbsp;&nbsp;&nbsp; -x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; disable Qt support<br>
[vic@limberlost sip-x11-gpl-3.5]$ python build.py -b /opt/bin -d
/opt/lib/python2.3/site-packages -e /opt/include/python2.3<br>
python2.3&nbsp;&nbsp;&nbsp; python2.3b1<br>
[vic@limberlost sip-x11-gpl-3.5]$ python build.py -b /opt/bin -d
/opt/lib/python2.3/site-packages -e /opt/include/python2.3<br>
This is the GPL version of SIP and is licensed under the GNU General
Public<br>
License.<br>
<br>
Type 'L' to view the license.<br>
Type 'yes' to accept the terms of the license.<br>
Type 'no' to decline the terms of the license.<br>
<br>
Do you accept the terms of the license? yes<br>
******************************************************************************<br>
Building the GPL version of SIP 3.5 for Python 2.3b1 on linux2.<br>
******************************************************************************<br>
******************************************************************************<br>
/opt/lib/python2.3/site-packages is the SIP module installation
directory.<br>
******************************************************************************<br>
******************************************************************************<br>
/opt/include/python2.3b1 contains Python.h.<br>
******************************************************************************<br>
******************************************************************************<br>
/opt/qt-x11-free-3.1.1 is the Qt base directory.<br>
******************************************************************************<br>
******************************************************************************<br>
/opt/qt-x11-free-3.1.1/include contains qglobal.h.<br>
******************************************************************************<br>
******************************************************************************<br>
Qt 3.1.1 free edition is being used.<br>
******************************************************************************<br>
******************************************************************************<br>
/opt/qt-x11-free-3.1.1/bin/qmake will be used to generate Makefiles.<br>
******************************************************************************<br>
******************************************************************************<br>
The qt-mt Qt library was found.<br>
******************************************************************************<br>
******************************************************************************<br>
Qt thread support is enabled.<br>
******************************************************************************<br>
******************************************************************************<br>
/usr/bin/make will be used as the make program.<br>
******************************************************************************<br>
******************************************************************************<br>
Creating SIP code generator Makefile.<br>
******************************************************************************<br>
******************************************************************************<br>
Creating SIP module Makefile.<br>
******************************************************************************<br>
******************************************************************************<br>
Creating top level Makefile.<br>
******************************************************************************<br>
******************************************************************************<br>
The configuration of SIP for your system is now complete. To compile and<br>
install SIP run "make" and "make install" with appropriate user
privileges.<br>
******************************************************************************<br>
[vic@limberlost sip-x11-gpl-3.5]$ make<br>
cd sipgen &amp;&amp; /usr/bin/make -f Makefile<br>
make[1]: Entering directory
`/opt/src/python2.3/pyqt/sip-x11-gpl-3.5/sipgen'<br>
gcc -c -pipe -w -O2&nbsp;&nbsp; -I/opt/qt-x11-free-3.1.1/mkspecs/default -I. -I.
-o main.o main.c<br>
gcc -c -pipe -w -O2&nbsp;&nbsp; -I/opt/qt-x11-free-3.1.1/mkspecs/default -I. -I.
-o transform.o transform.c<br>
gcc -c -pipe -w -O2&nbsp;&nbsp; -I/opt/qt-x11-free-3.1.1/mkspecs/default -I. -I.
-o gencode.o gencode.c<br>
gcc -c -pipe -w -O2&nbsp;&nbsp; -I/opt/qt-x11-free-3.1.1/mkspecs/default -I. -I.
-o heap.o heap.c<br>
gcc -c -pipe -w -O2&nbsp;&nbsp; -I/opt/qt-x11-free-3.1.1/mkspecs/default -I. -I.
-o parser.o parser.c<br>
gcc -c -pipe -w -O2&nbsp;&nbsp; -I/opt/qt-x11-free-3.1.1/mkspecs/default -I. -I.
-o lexer.o lexer.c<br>
test -d ../../../../../bin/ || mkdir -p ../../../../../bin/<br>
<font color="#ff0000"><font color="#000000">g++&nbsp; -o
../../../../../bin/sip main.o transform.o gencode.o heap.o parser.o
lexer.o<br>
make[1]: Leaving directory
`/opt/src/python2.3/pyqt/sip-x11-gpl-3.5/sipgen'<br>
cd siplib &amp;&amp; /usr/bin/make -f Makefile<br>
make[1]: Entering directory
`/opt/src/python2.3/pyqt/sip-x11-gpl-3.5/siplib'<br>
</font>gcc -c -pipe -w -O2 -D_REENTRANT -fPIC&nbsp; -DSIP_MAKE_DLL
-DSIP_QT_SUPPORT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
-I/opt/qt-x11-free-3.1.1/mkspecs/default -I. -I.
-I../../../../../include/python2.3b1 -I/opt/qt-x11-free-3.1.1/include
-o objmap.o objmap.c<br>
In file included from objmap.c:26:<br>
sip.h:324: parse error before `*'<br>
sip.h:325: parse error before `*'<br>
objmap.c: In function `sipOMFinalise':<br>
objmap.c:70: `ANY' undeclared (first use in this function)<br>
objmap.c:70: (Each undeclared identifier is reported only once<br>
objmap.c:70: for each function it appears in.)<br>
objmap.c:70: parse error before `)'<br>
objmap.c: In function `clearValList':<br>
objmap.c:180: `ANY' undeclared (first use in this function)<br>
objmap.c:180: parse error before `)'<br>
objmap.c: In function `sipOMAddObject':<br>
objmap.c:358: `ANY' undeclared (first use in this function)<br>
objmap.c:358: parse error before `)'<br>
objmap.c: In function `sipOMRemoveObject':<br>
objmap.c:398: `ANY' undeclared (first use in this function)<br>
objmap.c:398: parse error before `)'<br>
objmap.c:415: parse error before `)'<br>
make[1]: *** [objmap.o] Error 1<br>
make[1]: Leaving directory
`/opt/src/python2.3/pyqt/sip-x11-gpl-3.5/siplib'<br>
make: *** [sub-siplib] Error 2</font><br>
[vic@limberlost sip-x11-gpl-3.5]$<br>
</tt><br>
KABLOOEY! Ugh. What am I doing wrong? Incidentally, I have ownership
privilages on /opt; the same error occurs if I compile as root.
Apparently, the symbol <tt>ANY</tt> is not defined in a header...<br>
<br>
I appreciate any help you can offer. <br>
Have a great day!<br>
Vic<br>
<br>
</body>
</html>