[PyKDE] SIP build with Python2.3b1?

Vic Kelson vic at wittmanhydro.com
Wed Apr 30 18:49:01 BST 2003


Phil Thompson wrote:

>On Tuesday 29 April 2003 8:19 pm, Vic Kelson wrote:
>  
>
>>Are there build instructions for SIP/PyQt/PyKDE with python2.3b1?
>>    
>>
>
>Exactly the same as any other version of Python.
>
>Phil
>  
>
'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.

First, I find a problem in build.py (shown below):

[vic at limberlost sip-x11-gpl-3.5]$ export QTDIR=/opt/qt-x11-free-3.1.1
[vic at limberlost sip-x11-gpl-3.5]$ export KDEDIR=/opt/kde3.1
[vic at limberlost sip-x11-gpl-3.5]$ python build.py -h
An internal error occured.  Please report all the output from the program,
including the following traceback, to phil at riverbankcomputing.co.uk.

Traceback (most recent call last):
  File "build.py", line 948, in ?
    main(sys.argv)
  File "build.py", line 847, in main
    initGlobals()
  File "build.py", line 143, in initGlobals
    pyVersNr = int(vl[0]) * 10 + int(vl[1])
ValueError: invalid literal for int(): 3b1
[vic at limberlost sip-x11-gpl-3.5]$

Alas, the value of vl[1] is the string '3b1' (on my system, sys.version 
is '2.3b1'), so KABLOOEY. I change this line to read:

    pyVersNr = int(vl[0]) * 10 + int(vl[1][0])

(that is, chop off the minor version number, without the 'b1' 
appendage), and...

[vic at limberlost sip-x11-gpl-3.5]$ python build.py -h
Usage:
    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]
where:
    -h             display this help message
    -b dir         where the SIP code generator will be installed 
[default /usr/local/bin]
    -d dir         where the SIP module will be installed [default 
/opt/lib/python2.3b1/site-packages]
    -e dir         where the SIP header files will be installed [default 
/opt/include/python2.3b1]
    -f gccflag     additional GCC flag, eg. -fno-exceptions
    -g prog        the name of the Makefile generator
    -i dir         the directory containing the Qt header files [default 
$QTDIR/include]
    -l Qt-library  explicitly specify the type of Qt library, either qt, 
qt-mt or qte
    -m prog        the name of the Make program [default make]
    -q dir         the Qt base directory [default $QTDIR]
    -u             build with debugging symbols
    -w             enable the use of Python 1.5.x under Windows
    -x             disable Qt support
[vic at limberlost sip-x11-gpl-3.5]$ python build.py -b /opt/bin -d 
/opt/lib/python2.3/site-packages -e /opt/include/python2.3
python2.3    python2.3b1
[vic at limberlost sip-x11-gpl-3.5]$ python build.py -b /opt/bin -d 
/opt/lib/python2.3/site-packages -e /opt/include/python2.3
This is the GPL version of SIP and is licensed under the GNU General Public
License.

Type 'L' to view the license.
Type 'yes' to accept the terms of the license.
Type 'no' to decline the terms of the license.

Do you accept the terms of the license? yes
******************************************************************************
Building the GPL version of SIP 3.5 for Python 2.3b1 on linux2.
******************************************************************************
******************************************************************************
/opt/lib/python2.3/site-packages is the SIP module installation directory.
******************************************************************************
******************************************************************************
/opt/include/python2.3b1 contains Python.h.
******************************************************************************
******************************************************************************
/opt/qt-x11-free-3.1.1 is the Qt base directory.
******************************************************************************
******************************************************************************
/opt/qt-x11-free-3.1.1/include contains qglobal.h.
******************************************************************************
******************************************************************************
Qt 3.1.1 free edition is being used.
******************************************************************************
******************************************************************************
/opt/qt-x11-free-3.1.1/bin/qmake will be used to generate Makefiles.
******************************************************************************
******************************************************************************
The qt-mt Qt library was found.
******************************************************************************
******************************************************************************
Qt thread support is enabled.
******************************************************************************
******************************************************************************
/usr/bin/make will be used as the make program.
******************************************************************************
******************************************************************************
Creating SIP code generator Makefile.
******************************************************************************
******************************************************************************
Creating SIP module Makefile.
******************************************************************************
******************************************************************************
Creating top level Makefile.
******************************************************************************
******************************************************************************
The configuration of SIP for your system is now complete. To compile and
install SIP run "make" and "make install" with appropriate user privileges.
******************************************************************************
[vic at limberlost sip-x11-gpl-3.5]$ make
cd sipgen && /usr/bin/make -f Makefile
make[1]: Entering directory `/opt/src/python2.3/pyqt/sip-x11-gpl-3.5/sipgen'
gcc -c -pipe -w -O2   -I/opt/qt-x11-free-3.1.1/mkspecs/default -I. -I. 
-o main.o main.c
gcc -c -pipe -w -O2   -I/opt/qt-x11-free-3.1.1/mkspecs/default -I. -I. 
-o transform.o transform.c
gcc -c -pipe -w -O2   -I/opt/qt-x11-free-3.1.1/mkspecs/default -I. -I. 
-o gencode.o gencode.c
gcc -c -pipe -w -O2   -I/opt/qt-x11-free-3.1.1/mkspecs/default -I. -I. 
-o heap.o heap.c
gcc -c -pipe -w -O2   -I/opt/qt-x11-free-3.1.1/mkspecs/default -I. -I. 
-o parser.o parser.c
gcc -c -pipe -w -O2   -I/opt/qt-x11-free-3.1.1/mkspecs/default -I. -I. 
-o lexer.o lexer.c
test -d ../../../../../bin/ || mkdir -p ../../../../../bin/
g++  -o ../../../../../bin/sip main.o transform.o gencode.o heap.o 
parser.o lexer.o
make[1]: Leaving directory `/opt/src/python2.3/pyqt/sip-x11-gpl-3.5/sipgen'
cd siplib && /usr/bin/make -f Makefile
make[1]: Entering directory `/opt/src/python2.3/pyqt/sip-x11-gpl-3.5/siplib'
gcc -c -pipe -w -O2 -D_REENTRANT -fPIC  -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
In file included from objmap.c:26:
sip.h:324: parse error before `*'
sip.h:325: parse error before `*'
objmap.c: In function `sipOMFinalise':
objmap.c:70: `ANY' undeclared (first use in this function)
objmap.c:70: (Each undeclared identifier is reported only once
objmap.c:70: for each function it appears in.)
objmap.c:70: parse error before `)'
objmap.c: In function `clearValList':
objmap.c:180: `ANY' undeclared (first use in this function)
objmap.c:180: parse error before `)'
objmap.c: In function `sipOMAddObject':
objmap.c:358: `ANY' undeclared (first use in this function)
objmap.c:358: parse error before `)'
objmap.c: In function `sipOMRemoveObject':
objmap.c:398: `ANY' undeclared (first use in this function)
objmap.c:398: parse error before `)'
objmap.c:415: parse error before `)'
make[1]: *** [objmap.o] Error 1
make[1]: Leaving directory `/opt/src/python2.3/pyqt/sip-x11-gpl-3.5/siplib'
make: *** [sub-siplib] Error 2
[vic at limberlost sip-x11-gpl-3.5]$

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 ANY is not defined in a header...

I appreciate any help you can offer.
Have a great day!
Vic

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20030430/8160233a/attachment.html


More information about the PyQt mailing list