[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] 回复: guestfs_mount_loca l* api undefined symbols



On Fri, May 11, 2012 at 01:03:26AM +0800, Nok wrote:
> I checked the version and found that it printed an old 1.17.17
> version which was deployed before.  But I remembered i did check the
> version in guestfish shell and it said 1.17.40 before that,then i
> totally ignored the fact i had another version involved.

Local builds act a bit differently because they contain a hidden
'RPATH' ELF entry:

  $ eu-readelf -d ./fish/.libs/lt-guestfish | grep RPATH
  RPATH             Library rpath: [/home/rjones/d/libguestfs/src/.libs:/usr/local/lib]

This RPATH entry overrides LD_LIBRARY_PATH:

  $ LD_LIBRARY_PATH=/usr/lib64 ./fish/.libs/lt-guestfish --version
  guestfish 1.17.40

For the builds that we provide in Fedora and RHEL, we strip out RPATH:

  $ eu-readelf -d /usr/bin/guestfish | grep RPATH
  $ /usr/bin/guestfish --version
  /usr/bin/guestfish 1.17.36fedora=17,release=2.fc17

> I`ve changed the LD_LIBRARY_PATH and the "undefined symbol" error
> disappeared.But some "inspection API not available because of
> compiled without hivex library" pops up.I`ll check this out later.

Install the 'hivex-devel' and 'libvirt-devel' packages (from RHEL)
before ./configure && make.

You may be able to do 'yum-builddep libguestfs' to install all the
dependencies; or else read the libguestfs.spec file (BuildRequire lines).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]