[Libvir] Libvirt Build problems

Hi, I am trying to build libvirt on SL4 (kernal = 2.6.12.6-xen3_12.1_rhel4.1). I tried both snapshot tar ball and the cvs checked out version. With the tar ball, after running the ./configure script, make file is created. But make file fails and complains the following: libvirt.c:24:16: xs.h: No such file or directory In file included from libvirt.c:28: xen_internal.h:15:26: xen/dom0_ops.h: No such file or directory make[2]: *** [libvirt.lo] Error 1 make[2]: Leaving directory `/root/virtualization/libvirt2/libvirt-0.1.9/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/virtualization/libvirt2/libvirt-0.1.9' make: *** [all] Error 2 While with the cvs version, the script ./autogen.sh fails to create a make file. I am running Python 2.3.4 and gcc version 3.4.6 20060404 (Red Hat 3.4.6-3). Any help would be much appreciated. Best Regards Omer -- --------------------------------------------------------------- CERN – European Organization for Nuclear Research Information Technology Department CH-1211 Geneva 23 Phone: +41 (0) 22 767 7996 Fax: +41 (0) 22 767 4900 E-mail : Omer.Khalid@cern.ch

On Wed, Dec 06, 2006 at 02:55:30AM +0100, Omer Khalid wrote:
Hi,
I am trying to build libvirt on SL4 (kernal = 2.6.12.6-xen3_12.1_rhel4.1). I tried both snapshot tar ball and the cvs checked out version. With the tar ball, after running the ./configure script, make file is created. But make file fails and complains the following:
libvirt.c:24:16: xs.h: No such file or directory In file included from libvirt.c:28: xen_internal.h:15:26: xen/dom0_ops.h: No such file or directory
I'm not sure what you mean by SL4, but it seems you lack the xen-3.0.x development support, which shows up by missing header files. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Hi, I am trying to build libvirt on *SL4 (kernal = 2.6.12.6-xen3_12.1_rhel4.1). I tried both snapshot tar ball and the cvs checked out version. With the tar ball, after running the ./configure script, make file is created. But make file fails and complains the following: libvirt.c:24:16: xs.h: No such file or directory In file included from libvirt.c:28: xen_internal.h:15:26: xen/dom0_ops.h: No such file or directory make[2]: *** [libvirt.lo] Error 1 make[2]: Leaving directory `/root/virtualization/libvirt2/libvirt-0.1.9/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/virtualization/libvirt2/libvirt-0.1.9' make: *** [all] Error 2 While with the cvs version, the script ./autogen.sh fails to create a make file. I am running Python 2.3.4 and gcc version 3.4.6 20060404 (Red Hat 3.4.6-3). Any help would be much appreciated. Omer * SL4 is Scientific Linux 4 based on Redhat Enterprise 4, and is produced by https://www.scientificlinux.org/ . We are running Cern customised version, with some added tools, which we call SLC4 (C for Cern). -- --------------------------------------------------------------- CERN – European Organization for Nuclear Research Information Technology Department CH-1211 Geneva 23 Phone: +41 (0) 22 767 7996 Fax: +41 (0) 22 767 4900 E-mail : Omer.Khalid@cern.ch

On Mon, Dec 11, 2006 at 05:22:41PM +0100, Omer Khalid wrote:
Hi,
I am trying to build libvirt on *SL4 (kernal = 2.6.12.6-xen3_12.1_rhel4.1). I tried both snapshot tar ball and the cvs checked out version. With the tar ball, after running the ./configure script, make file is created. But make file fails and complains the following:
libvirt.c:24:16: xs.h: No such file or directory In file included from libvirt.c:28: xen_internal.h:15:26: xen/dom0_ops.h: No such file or directory
You don't have the include files for development against Xen installed. Ask your sysadmin to install them (or whoever maintains your SL4 version). I already answered something similar last week, reposting the same bits won't help. Check with the system administrator to get the development files for Xen installed on your system. That system is specific to CERN, apparently, that's why you should ask for support locally ! We can't debug that ! Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Hello Daniel, Thanks for you help. I installed xen-devel rpms and manage to make, make check and make install libvirt. Then I tried to test it by trying the simple python script given on the libvirt site. http://libvirt.org/python.html It failed and complained about not finding libvirt module. I guess Python was unable to locate it. I thought "make install" for libvirt would have taken care of it, but seems not to. How could I make Python aware of my libvirt module? Do I need to create an envoirnmental variable or else? ==== Error: Traceback (most recent call last): File "testLibvirt.py", line 1, in ? import libvirt ImportError: No module named libvirt ==== Any help would be much appreciated! Cheers Omer On 12/11/06, Daniel Veillard <veillard@redhat.com> wrote:
On Mon, Dec 11, 2006 at 05:22:41PM +0100, Omer Khalid wrote:
Hi,
I am trying to build libvirt on *SL4 (kernal = 2.6.12.6-xen3_12.1_rhel4.1). I tried both snapshot tar ball and the cvs checked out version. With the tar ball, after running the ./configure script, make file is created. But make file fails and complains the following:
libvirt.c:24:16: xs.h: No such file or directory In file included from libvirt.c:28: xen_internal.h:15:26: xen/dom0_ops.h: No such file or directory
You don't have the include files for development against Xen installed. Ask your sysadmin to install them (or whoever maintains your SL4 version). I already answered something similar last week, reposting the same bits won't help. Check with the system administrator to get the development files for Xen installed on your system. That system is specific to CERN, apparently, that's why you should ask for support locally ! We can't debug that !
Daniel
-- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
-- --------------------------------------------------------------- CERN – European Organization for Nuclear Research Information Technology Department CH-1211 Geneva 23 Phone: +41 (0) 22 767 7996 Fax: +41 (0) 22 767 4900 E-mail : Omer.Khalid@cern.ch Homepage: http://cern.ch/Omer.Khalid

On Tue, Dec 12, 2006 at 06:42:01PM +0100, Omer Khalid wrote:
Hello Daniel,
Thanks for you help. I installed xen-devel rpms and manage to make, make check and make install libvirt.
install RPMs for libvirt too Rebuild them from the libvirt-0.1.9-1.src.rpm available from the download area of http://libvirt.org/ Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

I tried to build libvirt from the source. The autogen.sh complained and finished with the following output, and message saying "make" to make but there is not make file created. I also tried to install libvirt-0.1.9.1.src.rpm but it complained too.. === src rpm output === rpm -ivh libvirt-0.1.9-1.src.rpm warning: libvirt-0.1.9-1.src.rpm: V3 DSA signature: NOKEY, key ID de95bc1f 1:libvirt warning: user veillard does not exist - using root ########################################### [100%] warning: user veillard does not exist - using root === End src rpm output === === Output using cvs sources === I am going to run ./configure with no arguments - if you wish to pass any to it, please specify them on the ./autogen.sh command line. /usr/bin/autopoint: line 342: /usr/share/gettext/archive.tar.gz: No such file or directory cvs checkout: cannot find module `archive' - ignored find: archive: No such file or directory find: archive: No such file or directory autopoint: *** infrastructure files for version 0.14.1 not found; this is autopoint from GNU gettext-tools 0.14.1 autopoint: *** Stop. aclocal:configure.in:249: warning: macro `AM_GNU_GETTEXT_VERSION' not found in library aclocal:configure.in:250: warning: macro `AM_GNU_GETTEXT' not found in library checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu extra=301 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for a BSD-compatible install... /usr/bin/install -c checking how to run the C preprocessor... gcc -E checking for rm... /bin/rm checking for mv... /bin/mv checking for tar... /bin/tar checking for xmllint... /usr/bin/xmllint checking for xsltproc... /usr/bin/xsltproc checking for function prototypes... yes checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for string.h... (cached) yes checking for a sed that does not truncate output... /bin/sed checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking for library containing xs_read... -lxenstore checking libxml2 no ... checking for libxml2 libraries >= 2.5.0... checking libxml2 xml2-config ... yes ('') checking for initscr in -lcurses... yes checking for main in -lreadline... yes checking for python... /usr/bin/python Found Python version 2.3 ./configure: line 20295: syntax error near unexpected token `0.14.1' ./configure: line 20295: `AM_GNU_GETTEXT_VERSION(0.14.1)' === End === On 12/13/06, Daniel Veillard <veillard@redhat.com> wrote:
On Tue, Dec 12, 2006 at 06:42:01PM +0100, Omer Khalid wrote:
Hello Daniel,
Thanks for you help. I installed xen-devel rpms and manage to make, make check and make install libvirt.
install RPMs for libvirt too Rebuild them from the libvirt-0.1.9-1.src.rpm available from the download area of http://libvirt.org/
Daniel
-- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
-- --------------------------------------------------------------- CERN – European Organization for Nuclear Research Information Technology Department CH-1211 Geneva 23 Phone: +41 (0) 22 767 7996 Fax: +41 (0) 22 767 4900 E-mail : Omer.Khalid@cern.ch Homepage: http://cern.ch/Omer.Khalid

On Wed, Dec 13, 2006 at 05:19:24PM +0100, Omer Khalid wrote:
I tried to build libvirt from the source. The autogen.sh complained and finished with the following output, and message saying "make" to make but there is not make file created.
Check with your sysadmins, most of this really isn't related to libvirt, but how to use RPM. In general you seems to try to do relatively advanced sysadmin operations (virtualization) without much experience about it. Using xen-3.0.1 is risky, it's old code. Using RHEL-4 derivative for this is risky too, RHEL-4 doesn't yet have virtualization support. You need minimal knowledge on compilation and possibly package maintainance. So please listen to me, and check with the people who maintain that special version of the system you are using, most of this really isn't related to libvirt itself, and there is no garantee that even after weeks of trying to help you over mail you would get something working. That said ...
I also tried to install libvirt-0.1.9.1.src.rpm but it complained too.. rpm -ivh libvirt-0.1.9-1.src.rpm warning: libvirt-0.1.9-1.src.rpm: V3 DSA signature: NOKEY, key ID de95bc1f 1:libvirt warning: user veillard does not exist - using root ########################################### [100%] warning: user veillard does not exist - using root
it's a warning, harmless, but rebuild means running rpmbuild --rebuild libvirt-0.1.9-1.src.rpm
=== Output using cvs sources === ./configure: line 20295: syntax error near unexpected token `0.14.1' ./configure: line 20295: `AM_GNU_GETTEXT_VERSION(0.14.1)'
You lack getext-devel. But again ... check with your system administrator ! Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Hello Daniel, Thankyou very much for your advice, I really appreciate it. Yes, I do lack sys-admin experience for Linux, but hey how I will learn unless I try it by myself. But after rebuilding the libvirt src rpms, as you advised I managed to install libvirt. So my simple python script no longer complains about not finding libvirt. Many thanks, and best regards Omer On 12/13/06, Daniel Veillard <veillard@redhat.com> wrote:
On Wed, Dec 13, 2006 at 05:19:24PM +0100, Omer Khalid wrote:
I tried to build libvirt from the source. The autogen.sh complained and finished with the following output, and message saying "make" to make but there is not make file created.
Check with your sysadmins, most of this really isn't related to libvirt, but how to use RPM. In general you seems to try to do relatively advanced sysadmin operations (virtualization) without much experience about it. Using xen-3.0.1 is risky, it's old code. Using RHEL-4 derivative for this is risky too, RHEL-4 doesn't yet have virtualization support. You need minimal knowledge on compilation and possibly package maintainance. So please listen to me, and check with the people who maintain that special version of the system you are using, most of this really isn't related to libvirt itself, and there is no garantee that even after weeks of trying to help you over mail you would get something working. That said ...
I also tried to install libvirt-0.1.9.1.src.rpm but it complained too.. rpm -ivh libvirt-0.1.9-1.src.rpm warning: libvirt-0.1.9-1.src.rpm: V3 DSA signature: NOKEY, key ID de95bc1f 1:libvirt warning: user veillard does not exist - using root ########################################### [100%] warning: user veillard does not exist - using root
it's a warning, harmless, but rebuild means running rpmbuild --rebuild libvirt-0.1.9-1.src.rpm
=== Output using cvs sources === ./configure: line 20295: syntax error near unexpected token `0.14.1' ./configure: line 20295: `AM_GNU_GETTEXT_VERSION(0.14.1)'
You lack getext-devel. But again ... check with your system administrator !
Daniel
participants (2)
-
Daniel Veillard
-
Omer Khalid