[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] SIP build with Python2.3b1?
From:       Vic Kelson <vic () wittmanhydro ! com>
Date:       2003-04-30 16:42:11
[Download RAW message or body]

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@limberlost sip-x11-gpl-3.5]$ export QTDIR=/opt/qt-x11-free-3.1.1
[vic@limberlost sip-x11-gpl-3.5]$ export KDEDIR=/opt/kde3.1
[vic@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@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@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@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@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@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@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@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


[Attachment #3 (text/html)]

<!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>


_______________________________________________
PyKDE mailing list    PyKDE@mats.gmd.de
http://mats.gmd.de/mailman/listinfo/pykde

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic