From: "Marco Sinhoreli" Subject: Problem to compile ant to use the xenstat perl/python binding Date: Fri, 14 Sep 2007 21:19:04 -0300 Message-ID: <20fe3cf60709141719y370beed5g5979efb4a14b2a88@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline 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, xen-users@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hello all, I tried to compile the xenstat python binding and didn't work with 64bit machine: # output in a 64bit: barad-dur:/usr/src/xen-3.1.0-src/tools/xenstat/libxenstat# make all-bindings gcc -O2 -fomit-frame-pointer -m64 -DNDEBUG -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Isrc -I../../../tools/libxc -I../../../tools/xenstore -Lsrc -L../../../tools/xenstore/ -L../../../tools/libxc/ -Wl,-soname -Wl,libxenstat.so.0 -shared -o src/libxenstat.so.0.0 \ src/xenstat.o src/xenstat_linux.o -lxenstore -lxenctrl /usr/bin/ld: src/xenstat.o: relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC src/xenstat.o: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [src/libxenstat.so.0.0] Error 1 # end output In a 32bit instalation was compiled but didn't work: # output python: >>> import xenstat Traceback (most recent call last): File "", line 1, in ? File "xenstat.py", line 7, in ? import _xenstat ImportError: ./_xenstat.so: undefined symbol: xenstat_init # end output In both cases, I have changed the PYTHON_VERSION in tools/xenstat/libxenstat/Makefile. I want to use the python binding in my project. Anybody have idea? -- Marco Sinhoreli