Niranjan M.R | 11 Aug 08:02
Favicon

Error compiling virt-mem-2.8

Hi all,

I am using FC9 x86_64 and trying to install virt-mem-0.2.8, But i get 
below error when trying to do "make"

[root <at> dhcp7-90 virt-mem-0.2.8]# make
for d in lib uname dmesg ps mem extract/fedora-koji extract/codegen po; 
do \
         make -C $d all; \
         if [ $? -ne 0 ]; then exit 1; fi; \
       done
make[1]: Entering directory `/opt/virt-mem-0.2.8/lib'
ocamlfind ocamlc -dtypes -g -syntax bitstring.syntax -package 
unix,bigarray,extlib,libvirt,xml-light,bitstring.syntax -c 
virt_mem_gettext.ml
ocamlfind ocamlc -dtypes -g -syntax bitstring.syntax -package 
unix,bigarray,extlib,libvirt,xml-light,bitstring.syntax -c 
virt_mem_version.ml
ocamlfind ocamlc -dtypes -g -syntax bitstring.syntax -package 
unix,bigarray,extlib,libvirt,xml-light,bitstring.syntax -c 
virt_mem_utils.ml
gcc -g -O2 -Wall -Werror -I/usr/lib64/ocaml -I..   -c -o 
virt_mem_mmap_c.o virt_mem_mmap_c.c
ocamlfind ocamlc -dtypes -g -syntax bitstring.syntax -package 
unix,bigarray,extlib,libvirt,xml-light,bitstring.syntax -c virt_mem_mmap.ml
File "virt_mem_mmap.ml", line 1, characters 0-1:
Could not find the .cmi file for interface virt_mem_mmap.mli.
make[1]: *** [virt_mem_mmap.cmo] Error 2
make[1]: Leaving directory `/opt/virt-mem-0.2.8/lib'
make: *** [all] Error 1
(Continue reading)

Richard W.M. Jones | 14 Aug 11:28
Favicon

Re: Error compiling virt-mem-2.8

On Mon, Aug 11, 2008 at 11:32:44AM +0530,  Niranjan M.R wrote:
> File "virt_mem_mmap.ml", line 1, characters 0-1:
> Could not find the .cmi file for interface virt_mem_mmap.mli.

Sorry, only just seen this email.

These errors are always caused because the .depend file hasn't been
rebuilt.  Just doing 'make depend' should fix it.  It's probably a bug
in the .depend file we distribute with the tarball ...

Rich.

--

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
M.R Niranjan | 14 Aug 12:36
Favicon

Re: Error compiling virt-mem-2.8

Richard W.M. Jones wrote:
> On Mon, Aug 11, 2008 at 11:32:44AM +0530,  Niranjan M.R wrote:
>   
>> File "virt_mem_mmap.ml", line 1, characters 0-1:
>> Could not find the .cmi file for interface virt_mem_mmap.mli.
>>     
>
> Sorry, only just seen this email.
>
> These errors are always caused because the .depend file hasn't been
> rebuilt.  Just doing 'make depend' should fix it.  It's probably a bug
> in the .depend file we distribute with the tarball ...
>
> Rich.
>
>   
You mean, before i run make , i should type "make depend" and then run 
"make" and "make install" ?

Regards
Niranjan
Richard W.M. Jones | 14 Aug 12:44
Favicon

Re: Error compiling virt-mem-2.8

On Thu, Aug 14, 2008 at 04:06:14PM +0530, M.R Niranjan  wrote:
> You mean, before i run make , i should type "make depend" and then run  
> "make" and "make install" ?

Yes, exactly.

You might also want to try out version 0.3.0 which I (quietly)
put out yesterday.

I'm currently rewriting the parsing code again so it can load all
kernel structures automatically -- this turned out to be necessary for
virt-ifconfig because things like the network interface addresses are
stored in multiple, indirect, linked lists of structures/
sub-structures/ sub-sub-..., and writing code to navigate through
those manually was getting very tedious.  Should have something to
show for this by the weekend.

Rich.

--

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
M.R Niranjan | 14 Aug 13:15
Favicon

Re: Error compiling virt-mem-2.8

Richard W.M. Jones wrote:
> On Thu, Aug 14, 2008 at 04:06:14PM +0530, M.R Niranjan  wrote:
>   
>> You mean, before i run make , i should type "make depend" and then run  
>> "make" and "make install" ?
>>     
>
> Yes, exactly.
>
>   
I tried this, and i still got the error

I did first ./configure --prefix=/usr/local/virt-mem

then i ran make depend and i got the same error

<snip for virt-mem-0.2.8>
make depend
for d in lib uname dmesg ps mem extract/fedora-koji extract/codegen; do \
make -C $d depend; \
if [ $? -ne 0 ]; then exit 1; fi; \
done
make[1]: Entering directory `/opt/virt-mem-0.2.8/lib'
rm -f .depend
ocamlfind ocamldep -package 
unix,bigarray,extlib,libvirt,xml-light,bitstring.syntax -syntax 
bitstring.syntax kernel_net_device.mli kernel_task_struct.mli 
virt_mem_kallsyms.mli virt_mem_ksyms.mli virt_mem.mli virt_mem_mmap.mli 
virt_mem_types.mli virt_mem_utsname.mli kernel_net_device.ml 
kernel_task_struct.ml test_mmap.ml virt_mem_capture.ml 
(Continue reading)

Richard W.M. Jones | 14 Aug 13:35
Favicon

Re: Error compiling virt-mem-2.8

On Thu, Aug 14, 2008 at 04:45:17PM +0530, M.R Niranjan  wrote:
> File "virt_mem_types.ml", line 78, characters 6-19:
> Unbound value D.memory_peek

OK, so now you're getting a different error.

This is because you need a newer ocaml-libvirt (try 0.4.4.2).  The one
you have doesn't support the libvirt virDomainMemoryPeek call, which
was only added to libvirt quite recently.

I will add a check into the configure file for that, and also a better
error message.

Rich.

--

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
M.R Niranjan | 14 Aug 16:12
Favicon

Re: Error compiling virt-mem-2.8

Richard W.M. Jones wrote:
> On Thu, Aug 14, 2008 at 04:45:17PM +0530, M.R Niranjan  wrote:
>   
>> File "virt_mem_types.ml", line 78, characters 6-19:
>> Unbound value D.memory_peek
>>     
>
>   
Hi,  i updated my ocaml-libvirt to 0.4.4.2-1 and issue "make" command, i 
get the below error

<snip>
[root <at> dhcp7-90 virt-mem-0.3.0]# make
for d in lib uname dmesg ps ifconfig mem extract/fedora-koji 
extract/codegen; do \
          make -C $d all; \
          if [ $? -ne 0 ]; then exit 1; fi; \
        done
make[1]: Entering directory `/opt/virt-mem-0.3.0/lib'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/virt-mem-0.3.0/lib'
make[1]: Entering directory `/opt/virt-mem-0.3.0/uname'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/virt-mem-0.3.0/uname'
make[1]: Entering directory `/opt/virt-mem-0.3.0/dmesg'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/virt-mem-0.3.0/dmesg'
make[1]: Entering directory `/opt/virt-mem-0.3.0/ps'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/virt-mem-0.3.0/ps'
(Continue reading)

Richard W.M. Jones | 14 Aug 18:02
Favicon

Re: Error compiling virt-mem-2.8

On Thu, Aug 14, 2008 at 07:42:33PM +0530, M.R Niranjan  wrote:
> /usr/bin/ld: cannot find -lvirt
> collect2: ld returned 1 exit status
> Error during linking

You have got libvirt installed, right?  If you installed libvirt on
some non-standard path then you may need to tell configure where it
is.  I think you need to do:

  LIBS="/some/nonstandard/path" ./configure

If that doesn't work try LIBRARY_PATH instead of LIBS.

Rich.

--

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
M.R Niranjan | 14 Aug 19:48
Favicon

Re: Error compiling virt-mem-2.8

Richard W.M. Jones wrote:
> On Thu, Aug 14, 2008 at 07:42:33PM +0530, M.R Niranjan  wrote:
>   
>> /usr/bin/ld: cannot find -lvirt
>> collect2: ld returned 1 exit status
>> Error during linking
>>     
>
> You have got libvirt installed, right?  If you installed libvirt on
> some non-standard path then you may need to tell configure where it
> is.  I think you need to do:
>   
Yes, libvirt is already installed,

[root <at> dhcp7-90 virt-mem-0.3.0]# rpm -q libvirt
libvirt-0.4.4-3.fc10.x86_64
libvirt-0.4.4-3.fc10.i386

>   LIBS="/some/nonstandard/path" ./configure
>
> If that doesn't work try LIBRARY_PATH instead of LIBS
>   
which path should i specify as LIBS or LIBRARY_PATH , as the libvirt rpm 
installs libraries of libvirt in /usr/lib64.

> Rich.
>
>   
Richard W.M. Jones | 14 Aug 21:38
Favicon

Re: Error compiling virt-mem-2.8

On Thu, Aug 14, 2008 at 11:18:21PM +0530, M.R Niranjan  wrote:
> Richard W.M. Jones wrote:
>> On Thu, Aug 14, 2008 at 07:42:33PM +0530, M.R Niranjan  wrote:
>>   
>>> /usr/bin/ld: cannot find -lvirt
>>> collect2: ld returned 1 exit status
>>> Error during linking
>>
>> You have got libvirt installed, right?  If you installed libvirt on
>> some non-standard path then you may need to tell configure where it
>> is.  I think you need to do:
>>   
> Yes, libvirt is already installed,
>
> [root <at> dhcp7-90 virt-mem-0.3.0]# rpm -q libvirt
> libvirt-0.4.4-3.fc10.x86_64
> libvirt-0.4.4-3.fc10.i386
>
>
>>   LIBS="/some/nonstandard/path" ./configure
>>
>> If that doesn't work try LIBRARY_PATH instead of LIBS
>>   
> which path should i specify as LIBS or LIBRARY_PATH , as the libvirt rpm  
> installs libraries of libvirt in /usr/lib64.

You should give /usr/lib64 as the path.

As for why it doesn't work, though, I'm really very confused.
Obviously I don't get the error you're seeing, and I don't understand
(Continue reading)

M.R Niranjan | 16 Aug 07:04
Favicon

Re: Error compiling virt-mem-2.8

Richard W.M. Jones wrote:
> On Thu, Aug 14, 2008 at 11:18:21PM +0530, M.R Niranjan  wrote:
>   
>> Richard W.M. Jones wrote:
>>     
>>> On Thu, Aug 14, 2008 at 07:42:33PM +0530, M.R Niranjan  wrote:
>>>   
>>>       
>>>> /usr/bin/ld: cannot find -lvirt
>>>> collect2: ld returned 1 exit status
>>>> Error during linking
>>>>         
>>> You have got libvirt installed, right?  If you installed libvirt on
>>> some non-standard path then you may need to tell configure where it
>>> is.  I think you need to do:
>>>   
>>>       
>> Yes, libvirt is already installed,
>>
>> [root <at> dhcp7-90 virt-mem-0.3.0]# rpm -q libvirt
>> libvirt-0.4.4-3.fc10.x86_64
>> libvirt-0.4.4-3.fc10.i386
>>
>>
>>     
>>>   LIBS="/some/nonstandard/path" ./configure
>>>
>>> If that doesn't work try LIBRARY_PATH instead of LIBS
>>>   
>>>       
(Continue reading)

Richard W.M. Jones | 17 Aug 22:32
Favicon

Re: Error compiling virt-mem-2.8

On Sat, Aug 16, 2008 at 10:34:06AM +0530, M.R Niranjan  wrote:
> I will wait for some more time, till you release the updated version, is 
> it possible to have a binary RPM ?

Sure ... I'll be building binaries for 0.3.1 on Tuesday, or whenever
the Fedora infrastructure comes back to life.

Rich.

--

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
Richard W.M. Jones | 25 Aug 16:41
Favicon

Re: Error compiling virt-mem-2.8

Here's a build of 0.3.1:

  http://koji.fedoraproject.org/koji/taskinfo?taskID=784664

It failed on ppc64, I think simply because the compiler ran out of
memory compiling one of the biggest source files (kernel.ml which
corresponds to the kernel database).

But it should be OK to use the i686 RPM on 32 bit guests.

You should read the FAQ:

  http://et.redhat.com/~rjones/virt-mem/faq.html

Rich.

--

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top

Gmane