From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Novotny Subject: Re: Xen-unstable-staging compilation error Date: Fri, 24 Sep 2010 12:41:05 +0200 Message-ID: <4C9C8041.5060708@redhat.com> References: <4C9A10E1.4060804@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4C9A10E1.4060804@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Well, I've been able to solve this one by adding "typedef int=20 Py_ssize_t;" since I was using Python 2.4.3 that doesn't support=20 Py_ssize_t natively. However, reinstalling the python was not the option=20 because of the system dependencies so I downloaded source code for=20 Python-2.7 and investigated this further. There was a definition of=20 Py_ssize_t as int so I did just add this definition in=20 /usr/include/python-2.4/Python.h file and the compilation was successful. Hope this helps to someone as well, Michal On 09/22/2010 04:21 PM, Michal Novotny wrote: > Hi, > I've been trying to compile latest Xen-unstable staging on the x86_64=20 > machine but I was getting following errors: > > creating build/temp.linux-x86_64-2.4/xen/lowlevel/flask > gcc -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall=20 > -Wp,-D_FORTIFY_SOURCE=3D2 -fexceptions -fstack-protector=20 > --param=3Dssp-buffer-size=3D4 -m64 -mtune=3Dgeneric -D_GNU_SOURCE -fPIC= -O1=20 > -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g=20 > -fno-strict-aliasing -std=3Dgnu99 -Wall -Wstrict-prototypes=20 > -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -MMD=20 > -MF .buildpy.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fPIC=20 > -I../../tools/libxc -I../../tools/xenstore -I../../tools/include=20 > -I../../tools/libxl -Ixen/lowlevel/flask -I../flask/libflask/include=20 > -I/usr/include/python2.4 -c xen/lowlevel/flask/flask.c -o=20 > build/temp.linux-x86_64-2.4/xen/lowlevel/flask/flask.o=20 > -fno-strict-aliasing -Werror > gcc -pthread -shared -O1 -fno-omit-frame-pointer=20 > -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=3Dgnu99=20 > -Wall -Wstrict-prototypes -Wno-unused-value=20 > -Wdeclaration-after-statement -D__XEN_TOOLS__ -MMD -MF .buildpy.d=20 > -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE=20 > build/temp.linux-x86_64-2.4/xen/lowlevel/flask/flask.o=20 > -L../../tools/libxc -L../../tools/xenstore -L../../tools/libxl=20 > -L../../tools/blktap2/control -L../flask/libflask -lxenctrl -lxenguest=20 > -lxenstore -lflask -o build/lib.linux-x86_64-2.4/xen/lowlevel/flask.so > building 'xl' extension > creating build/temp.linux-x86_64-2.4/xen/lowlevel/xl > gcc -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall=20 > -Wp,-D_FORTIFY_SOURCE=3D2 -fexceptions -fstack-protector=20 > --param=3Dssp-buffer-size=3D4 -m64 -mtune=3Dgeneric -D_GNU_SOURCE -fPIC= -O1=20 > -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g=20 > -fno-strict-aliasing -std=3Dgnu99 -Wall -Wstrict-prototypes=20 > -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -MMD=20 > -MF .buildpy.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fPIC=20 > -I../../tools/libxc -I../../tools/xenstore -I../../tools/include=20 > -I../../tools/libxl -Ixen/lowlevel/xl -I/usr/include/python2.4 -c=20 > xen/lowlevel/xl/xl.c -o=20 > build/temp.linux-x86_64-2.4/xen/lowlevel/xl/xl.o -fno-strict-aliasing=20 > -Werror > xen/lowlevel/xl/xl.c: In function =91genwrap__obj_init=92: > xen/lowlevel/xl/xl.c:59: error: =91Py_ssize_t=92 undeclared (first use = in=20 > this function) > xen/lowlevel/xl/xl.c:59: error: (Each undeclared identifier is=20 > reported only once > xen/lowlevel/xl/xl.c:59: error: for each function it appears in.) > xen/lowlevel/xl/xl.c:59: error: expected =91;=92 before =91pos=92 > xen/lowlevel/xl/xl.c:64: error: =91pos=92 undeclared (first use in this= =20 > function) > xen/lowlevel/xl/xl.c: In function =91fixed_bytearray_set=92: > xen/lowlevel/xl/xl.c:170: error: =91Py_ssize_t=92 undeclared (first use= in=20 > this function) > xen/lowlevel/xl/xl.c:170: error: expected =91;=92 before =91ssz=92 > xen/lowlevel/xl/xl.c:171: error: =91ssz=92 undeclared (first use in thi= s=20 > function) > error: command 'gcc' failed with exit status 1 > make[3]: *** [buildpy] Error 1 > make[3]: Leaving directory=20 > `/home2/shared/xen-unstable-staging/tools/python' > make[2]: *** [subdir-install-python] Error 2 > make[2]: Leaving directory `/home2/shared/xen-unstable-staging/tools' > make[1]: *** [subdirs-install] Error 2 > make[1]: Leaving directory `/home2/shared/xen-unstable-staging/tools' > > Any ideas? > > Michal > --=20 Michal Novotny, RHCE Virtualization Team (xen userspace), Red Hat