[Libvir] The fist problem to compile libvirt in a Debian etch.

Hello list, I'm writing a how-to about libvirt compilation in Debian Etch. Well, I tried to compile version 0.1.11 in a Debian etch completly newly built from debootstrap. These are the steps that I took: ----- init commands apt-get install make gcc # cd /usr/src && wget http://libvirt.org/sources/libvirt-cvs-snapshot.tar.gz&& tar -xzvf libvirt-cvs-snapshot.tar.gz # cd libvirt-0.1.11 # ./configure checking build system type... i686-pc-linux-gnulibc1 checking host system type... i686-pc-linux-gnulibc1 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking for gcc... gcc checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. # tail config.log #define PACKAGE "libvirt" #define PACKAGE_BUGREPORT "" #define PACKAGE_NAME "" #define PACKAGE_STRING "" #define PACKAGE_TARNAME "" #define PACKAGE_VERSION "" #define VERSION "0.1.11" configure: exit 77 ----- finish commands I don't know what's the problem. Ideas please... thanks -- Marco Sinhoreli

On Fri, May 04, 2007 at 03:30:56PM -0300, Marco Sinhoreli wrote:
Hello list,
I'm writing a how-to about libvirt compilation in Debian Etch. Well, I tried to compile version 0.1.11 in a Debian etch completly newly built from debootstrap. These are the steps that I took: ----- init commands apt-get install make gcc # cd /usr/src && wget http://libvirt.org/sources/libvirt-cvs-snapshot.tar.gz&& tar -xzvf libvirt-cvs-snapshot.tar.gz # cd libvirt-0.1.11 # ./configure checking build system type... i686-pc-linux-gnulibc1 checking host system type... i686-pc-linux-gnulibc1 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking for gcc... gcc checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. # tail config.log #define PACKAGE "libvirt" #define PACKAGE_BUGREPORT "" #define PACKAGE_NAME "" #define PACKAGE_STRING "" #define PACKAGE_TARNAME "" #define PACKAGE_VERSION "" #define VERSION "0.1.11"
configure: exit 77 ----- finish commands
I don't know what's the problem. Ideas please...
Can you attach the complete config.log - the real error is normally quite a way further up in the file, so tail is not showing it. Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

Marco Sinhoreli wrote:
# cd /usr/src && wget http://libvirt.org/sources/libvirt-cvs- snapshot.tar.gz && tar -xzvf libvirt-cvs-snapshot.tar.gz # cd libvirt-0.1.11 # ./configure
Did you noticed that the snapshot contains a quite old version of libvirt -> libvirt-0.1.11. Latest stable version is as far as I know 0.2.2. Maybe there is a typo in the snapshot generation or you have really old source. Besides your problem I would take a newer version. Cheers, Jan

Marco Sinhoreli wrote:
Hello list,
I'm writing a how-to about libvirt compilation in Debian Etch. Well, I tried to compile version 0.1.11 in a Debian etch completly newly built from debootstrap. These are the steps that I took: ----- init commands apt-get install make gcc # cd /usr/src && wget http://libvirt.org/sources/libvirt-cvs-snapshot.tar.gz && tar -xzvf libvirt-cvs-snapshot.tar.gz # cd libvirt-0.1.11
It looks like CVS snapshots aren't being updated! The one on the site at the moment dates from 2007-02-14 and as you found out contains libvirt-0.1.11, which is ancient history. I'll ask Daniel Veillard about that one next week. I also tried building libvirt on Debian and didn't get very far either. But we're committed to making libvirt work on Debian (and Ubuntu, and other free OSes for that matter). So if you have the time can you try this to get the latest CVS version: # apt-get install cvs gcc make gettext automake1.9 $ cvs -d ':pserver:anoncvs@libvirt.org:2401/data/cvs' co login # at the prompt type anoncvs $ cvs -d ':pserver:anoncvs@libvirt.org:2401/data/cvs' co libvirt # the above will check out the source into a subdir called libvirt $ cd libvirt $ ./autogen.sh --prefix=$HOME/local --enable-compile-warnings=error --enable-debug=yes # you can change the --prefix to something more useful If the above succeeds -- and it didn't for me -- then: $ make If any of the steps fail then post the full output. I can look at why libvirt on Debian is failing next week. Thanks for helping with libvirt, Rich. -- Emerging Technologies, Red Hat http://et.redhat.com/~rjones/ 64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421 Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA) and David Owens (Ireland)

Hello Richard, I tried with debian do it. In command autogen.sh return it: $ ./autogen.sh --prefix=/usr/local --enable-compile-warnings=error --enable-debug=yes [...] ./configure: line 20698: syntax error near unexpected token `LIBXML,' ./configure: line 20698: ` PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_MIN_VERSION,' I read the 'configure' shell script code and in release 0.1.11 the libxml section is different. I know that if I comment this entry I run this scrtipt without errors but it isn't elegant :-) Thanks Richard, regards On 5/5/07, Richard W.M. Jones <rjones@redhat.com> wrote:
Marco Sinhoreli wrote:
Hello list,
I'm writing a how-to about libvirt compilation in Debian Etch. Well, I tried to compile version 0.1.11 in a Debian etch completly newly built from debootstrap. These are the steps that I took: ----- init commands apt-get install make gcc # cd /usr/src && wget http://libvirt.org/sources/libvirt-cvs-snapshot.tar.gz && tar -xzvf libvirt-cvs-snapshot.tar.gz # cd libvirt-0.1.11
It looks like CVS snapshots aren't being updated! The one on the site at the moment dates from 2007-02-14 and as you found out contains libvirt-0.1.11, which is ancient history. I'll ask Daniel Veillard about that one next week.
I also tried building libvirt on Debian and didn't get very far either. But we're committed to making libvirt work on Debian (and Ubuntu, and other free OSes for that matter).
So if you have the time can you try this to get the latest CVS version:
# apt-get install cvs gcc make gettext automake1.9
$ cvs -d ':pserver:anoncvs@libvirt.org:2401/data/cvs' co login # at the prompt type anoncvs
$ cvs -d ':pserver:anoncvs@libvirt.org:2401/data/cvs' co libvirt # the above will check out the source into a subdir called libvirt
$ cd libvirt
$ ./autogen.sh --prefix=$HOME/local --enable-compile-warnings=error --enable-debug=yes # you can change the --prefix to something more useful
If the above succeeds -- and it didn't for me -- then:
$ make
If any of the steps fail then post the full output. I can look at why libvirt on Debian is failing next week.
Thanks for helping with libvirt,
Rich.
-- Emerging Technologies, Red Hat http://et.redhat.com/~rjones/ 64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA) and David Owens (Ireland)
-- Marco Sinhoreli

Hello guys, To finish the libvirt compilation, I've commented: file: libvirt/configure: #elif test "z$with_libxml" = "z" -a "z$PKG_CONFIG_ENABLED" = "zyes" ; then # PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_MIN_VERSION, # LIBXML_FOUND=yes, # LIBXML_FOUND=no) I know that the libxml in my system is in correct version. the var LIBXML_MIN_VERSION in configure script is set to "2.5.0". This is the version in my system: # dpkg -l | grep libxml2 ii libxml2 2.6.27.dfsg-1 GNOME XML library ii libxml2-dev 2.6.27.dfsg-1 Development files for the GNOME XML library file: libvirt/tests/xencapstest.c /* if (!(actualxml = xenHypervisorMakeCapabilitiesXML(NULL, hostmachine, fp1, fp2))) goto fail;*/ In libvirt/tests/xencapstest.c, I don't know if comment it is correct. Any idea? I do it correctly? this test is important to libvirt? This is the return error if I not comment the conditional 'if' in libvirt/tests/xencapstest.c: gcc -fno-stack-protector -o xencapstest xencapstest.o testutils.o../src/.libs/libvirt_la- conf.o ../src/.libs/libvirt_la-hash.o ../src/.libs/libvirt_la-libvirt.o../src/.libs/libvirt_la-proxy_internal.o ../src/.libs/libvirt_la-qemu_internal.o ../src/.libs/libvirt_la-sexpr.o../src/.libs/libvirt_la- test.o ../src/.libs/libvirt_la-virterror.o../src/.libs/libvirt_la-xend_internal.o ../src/.libs/libvirt_la-xen_internal.o ../src/.libs/libvirt_la-xen_unified.o ../src/.libs/libvirt_la-xm_internal.o ../src/.libs/libvirt_la-xml.o../src/.libs/libvirt_la-xs_internal.o -L/usr/lib /usr/lib/libxml2.so xencapstest.o: In function `testCompareFiles': xencapstest.c:(.text+0xb4): undefined reference to `xenHypervisorMakeCapabilitiesXML' collect2: ld returned 1 exit status make[3]: ** [xencapstest] Erro 1 regards On 5/5/07, Marco Sinhoreli <msinhore@gmail.com> wrote:
Hello Richard,
I tried with debian do it. In command autogen.sh return it:
$ ./autogen.sh --prefix=/usr/local --enable-compile-warnings=error --enable-debug=yes [...] ./configure: line 20698: syntax error near unexpected token `LIBXML,' ./configure: line 20698: ` PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_MIN_VERSION,'
I read the 'configure' shell script code and in release 0.1.11 the libxml section is different. I know that if I comment this entry I run this scrtipt without errors but it isn't elegant :-)
Thanks Richard,
regards
On 5/5/07, Richard W.M. Jones <rjones@redhat.com> wrote:
Marco Sinhoreli wrote:
Hello list,
I'm writing a how-to about libvirt compilation in Debian Etch. Well, I tried to compile version 0.1.11 in a Debian etch completly newly built from debootstrap. These are the steps that I took: ----- init commands apt-get install make gcc # cd /usr/src && wget http://libvirt.org/sources/libvirt-cvs-snapshot.tar.gz && tar -xzvf libvirt-cvs-snapshot.tar.gz # cd libvirt-0.1.11
It looks like CVS snapshots aren't being updated! The one on the site at the moment dates from 2007-02-14 and as you found out contains libvirt-0.1.11, which is ancient history. I'll ask Daniel Veillard about that one next week.
I also tried building libvirt on Debian and didn't get very far either. But we're committed to making libvirt work on Debian (and Ubuntu, and other free OSes for that matter).
So if you have the time can you try this to get the latest CVS version:
# apt-get install cvs gcc make gettext automake1.9
$ cvs -d ': pserver:anoncvs@libvirt.org:2401/data/cvs' co login # at the prompt type anoncvs
$ cvs -d ':pserver:anoncvs@libvirt.org:2401/data/cvs ' co libvirt # the above will check out the source into a subdir called libvirt
$ cd libvirt
$ ./autogen.sh --prefix=$HOME/local --enable-compile-warnings=error --enable-debug=yes # you can change the --prefix to something more useful
If the above succeeds -- and it didn't for me -- then:
$ make
If any of the steps fail then post the full output. I can look at why libvirt on Debian is failing next week.
Thanks for helping with libvirt,
Rich.
-- Emerging Technologies, Red Hat http://et.redhat.com/~rjones/<http://et.redhat.com/%7Erjones/> 64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA) and David Owens (Ireland)
-- Marco Sinhoreli

Attached the commands result for CFLAGS="-fno-stack-protector" ./configure 2>&1 | tee configure.log and make 2>&1 | tee make.log. Is possible run the make only if I comment the libxml test in configure script. regards On 5/7/07, Marco Sinhoreli <msinhore@gmail.com> wrote:
Hello guys,
To finish the libvirt compilation, I've commented:
file: libvirt/configure: #elif test "z$with_libxml" = "z" -a "z$PKG_CONFIG_ENABLED" = "zyes" ; then
# PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_MIN_VERSION, # LIBXML_FOUND=yes, # LIBXML_FOUND=no)
I know that the libxml in my system is in correct version. the var LIBXML_MIN_VERSION in configure script is set to "2.5.0". This is the version in my system: # dpkg -l | grep libxml2 ii libxml2 2.6.27.dfsg-1 GNOME XML library ii libxml2-dev 2.6.27.dfsg-1 Development files for the GNOME XML library
file: libvirt/tests/xencapstest.c /* if (!(actualxml = xenHypervisorMakeCapabilitiesXML(NULL, hostmachine, fp1, fp2))) goto fail;*/
In libvirt/tests/xencapstest.c, I don't know if comment it is correct. Any idea? I do it correctly? this test is important to libvirt?
This is the return error if I not comment the conditional 'if' in libvirt/tests/xencapstest.c:
gcc -fno-stack-protector -o xencapstest xencapstest.o testutils.o../src/.libs/libvirt_la- conf.o ../src/.libs/libvirt_la-hash.o ../src/.libs/libvirt_la-libvirt.o../src/.libs/libvirt_la-proxy_internal.o ../src/.libs/libvirt_la-qemu_internal.o ../src/.libs/libvirt_la- sexpr.o../src/.libs/libvirt_la- test.o ../src/.libs/libvirt_la-virterror.o../src/.libs/libvirt_la-xend_internal.o ../src/.libs/libvirt_la-xen_internal.o ../src/.libs/libvirt_la-xen_unified.o ../src/.libs/libvirt_la-xm_internal.o ../src/.libs/libvirt_la- xml.o../src/.libs/libvirt_la-xs_internal.o -L/usr/lib /usr/lib/libxml2.so xencapstest.o: In function `testCompareFiles': xencapstest.c:(.text+0xb4): undefined reference to `xenHypervisorMakeCapabilitiesXML' collect2: ld returned 1 exit status make[3]: ** [xencapstest] Erro 1
regards
On 5/5/07, Marco Sinhoreli < msinhore@gmail.com> wrote:
Hello Richard,
I tried with debian do it. In command autogen.sh return it:
$ ./autogen.sh --prefix=/usr/local --enable-compile-warnings=error --enable-debug=yes [...] ./configure: line 20698: syntax error near unexpected token `LIBXML,' ./configure: line 20698: ` PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_MIN_VERSION,'
I read the 'configure' shell script code and in release 0.1.11 the libxml section is different. I know that if I comment this entry I run this scrtipt without errors but it isn't elegant :-)
Thanks Richard,
regards
On 5/5/07, Richard W.M. Jones < rjones@redhat.com> wrote:
Marco Sinhoreli wrote:
Hello list,
I'm writing a how-to about libvirt compilation in Debian Etch. Well, I tried to compile version 0.1.11 in a Debian etch completly newly built from debootstrap. These are the steps that I took: ----- init commands apt-get install make gcc # cd /usr/src && wget http://libvirt.org/sources/libvirt-cvs-snapshot.tar.gz && tar -xzvf libvirt-cvs-snapshot.tar.gz # cd libvirt-0.1.11
It looks like CVS snapshots aren't being updated! The one on the site at the moment dates from 2007-02-14 and as you found out contains libvirt-0.1.11, which is ancient history. I'll ask Daniel Veillard about that one next week.
I also tried building libvirt on Debian and didn't get very far either. But we're committed to making libvirt work on Debian (and Ubuntu, and other free OSes for that matter).
So if you have the time can you try this to get the latest CVS version:
# apt-get install cvs gcc make gettext automake1.9
$ cvs -d ': pserver:anoncvs@libvirt.org:2401/data/cvs' co login # at the prompt type anoncvs
$ cvs -d ': pserver:anoncvs@libvirt.org:2401/data/cvs ' co libvirt # the above will check out the source into a subdir called libvirt
$ cd libvirt
$ ./autogen.sh --prefix=$HOME/local --enable-compile-warnings=error --enable-debug=yes # you can change the --prefix to something more useful
If the above succeeds -- and it didn't for me -- then:
$ make
If any of the steps fail then post the full output. I can look at why libvirt on Debian is failing next week.
Thanks for helping with libvirt,
Rich.
-- Emerging Technologies, Red Hat http://et.redhat.com/~rjones/<http://et.redhat.com/%7Erjones/> 64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA) and David Owens (Ireland)
-- Marco Sinhoreli
-- Marco Sinhoreli

On Mon, May 07, 2007 at 11:24:12AM -0300, Marco Sinhoreli wrote:
Attached the commands result for CFLAGS="-fno-stack-protector" ./configure 2>&1 | tee configure.log and make 2>&1 | tee make.log.
Is possible run the make only if I comment the libxml test in configure script.
regards
On 5/7/07, Marco Sinhoreli <msinhore@gmail.com> wrote:
Hello guys,
To finish the libvirt compilation, I've commented:
file: libvirt/configure: #elif test "z$with_libxml" = "z" -a "z$PKG_CONFIG_ENABLED" = "zyes" ; then
# PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_MIN_VERSION, # LIBXML_FOUND=yes, # LIBXML_FOUND=no)
I know that the libxml in my system is in correct version. the var LIBXML_MIN_VERSION in configure script is set to "2.5.0". This is the version in my system: # dpkg -l | grep libxml2 ii libxml2 2.6.27.dfsg-1 GNOME XML library ii libxml2-dev 2.6.27.dfsg-1 Development files for the GNOME XML library
file: libvirt/tests/xencapstest.c /* if (!(actualxml = xenHypervisorMakeCapabilitiesXML(NULL, hostmachine, fp1, fp2))) goto fail;*/
In libvirt/tests/xencapstest.c, I don't know if comment it is correct. Any idea? I do it correctly? this test is important to libvirt?
This is the return error if I not comment the conditional 'if' in libvirt/tests/xencapstest.c:
gcc -fno-stack-protector -o xencapstest xencapstest.o testutils.o../src/.libs/libvirt_la- conf.o ../src/.libs/libvirt_la-hash.o ../src/.libs/libvirt_la-libvirt.o../src/.libs/libvirt_la-proxy_internal.o ../src/.libs/libvirt_la-qemu_internal.o ../src/.libs/libvirt_la- sexpr.o../src/.libs/libvirt_la- test.o ../src/.libs/libvirt_la-virterror.o../src/.libs/libvirt_la-xend_internal.o ../src/.libs/libvirt_la-xen_internal.o ../src/.libs/libvirt_la-xen_unified.o ../src/.libs/libvirt_la-xm_internal.o ../src/.libs/libvirt_la- xml.o../src/.libs/libvirt_la-xs_internal.o -L/usr/lib /usr/lib/libxml2.so xencapstest.o: In function `testCompareFiles': xencapstest.c:(.text+0xb4): undefined reference to `xenHypervisorMakeCapabilitiesXML' collect2: ld returned 1 exit status make[3]: ** [xencapstest] Erro 1
So, the only reason I can think that this would happen is if #if WITH_XEN evaluated false. This can be for two reasons, either you asked for --without-xen, or the configure script was not able to find the Xen development libs/headers. The configure.log you supplied shows it was the latter: checking for library containing xs_read... no Xen store library not found Make sure you have libxen-dev (or whatever debian calls it) - basically you need to make sure you have /usr/include/xs.h /usr/lib/libxenstore.so Available NB, the compile error is also a bug in the build system - we should not be building xen-specific tests, if the Xen support in the main library is not being compiled. Dan., -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
participants (4)
-
Daniel P. Berrange
-
Jan Michael
-
Marco Sinhoreli
-
Richard W.M. Jones