2011-10-28, 17:27
glst0rm Wrote:Jimmer: thank you, that got me past my error.
Now I'm hitting another error, which I think may be related to the version of Python I use. I've tried both Python 2.5 (installed with Hardy) and Python 2.6.2 installed from source.
Using Python 2.5:
Code:pyrendercapture.cpp: In function ‘PyObject* PYXBMC::RenderCapture_GetImage(PYXBMC::RenderCapture*, PyObject*)’:
pyrendercapture.cpp:126: error: ‘PyByteArray_FromStringAndSize’ was not declared in this scope
/home/settop/temp/tsp-xbmc/tsp-xbmc-98a6f0f/xbmc/guilib/GraphicContext.h: At global scope:
/home/settop/temp/tsp-xbmc/tsp-xbmc-98a6f0f/xbmc/guilib/GraphicContext.h:245: warning: ‘g_graphicsContext’ defined but not used
make[1]: *** [pyrendercapture.o] Error 1
make: *** [xbmc/interfaces/python/xbmcmodule/xbmcmodule.a] Error 2
Using Python 2.6:
Code:/usr/local/lib/python2.6/config/libpython2.6.a(posixmodule.o): In function `posix_tmpnam':
/home/settop/Desktop/Python-2.6/./Modules/posixmodule.c:7074: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/local/lib/python2.6/config/libpython2.6.a(posixmodule.o): In function `posix_tempnam':
/home/settop/Desktop/Python-2.6/./Modules/posixmodule.c:7029: warning: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/local/lib/python2.6/config/libpython2.6.a(posixmodule.o): In function `posix_forkpty':
posixmodule.c:(.text+0x32cd): undefined reference to `forkpty'
/usr/local/lib/python2.6/config/libpython2.6.a(posixmodule.o): In function `posix_openpty':
posixmodule.c:(.text+0x334c): undefined reference to `openpty'
collect2: ld returned 1 exit status
make: *** [xbmc.bin] Error 1
When you built 2.6.2 from source did you get module errors at compile time? I did originally and eventually grabbed python2.6 like this:
Code:
PYTHON2.6:
sudo nano /etc/apt/sources.list
add:
deb http://ppa.launchpad.net/python-dev/ppa/ubuntu hardy main
deb-src http://ppa.launchpad.net/python-dev/ppa/ubuntu hardy main
then:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D81367B9
sudo apt-get update
sudo apt-get install python2.6
sudo apt-get install python2.6-dev
then I made a symlink from /usr/bin/python2.6 /usr/bin/python
I'm not sure if this breaks something else in the system. If you don't want to do this, you can export your python version at config time ie:
PYTHON_VERSION=2.6 ./configure --blah --blah --enable-external-python
Hope this helps!