Re: [Libguestfs] Fwd: libguestfs-test-tool error, libcap.so - no such file
by Hilko Bengen
* Skippy VonDrake:
>>> I still don't understand why after installing it on the system the
>>> libraries aren't linked up properly.
>>>
>>> $ guestfish --version
>>> guestfish: error while loading shared libraries: libguestfs.so.0:
>>> cannot open shared object file: No such file or directory
>>
>> Is /usr/local/lib in the dynamic linker path? You might need
>> to add it to '/etc/ld.so.conf'.
>
> Hilko,
> Do you ever see the 'libguestfs.so.0' error?
No, but then I haven't installed libguestfs to /usr/local/.
On my Debian systems, /etc/ld.so.conf.d/libc.conf contains a single
line, /usr/local/lib -- this means that the dynamic linker will look
there (among other places) for shared libraries.
If the library is installed by hand, one still needs to run ldconfig (as
root), though because it uses some sort of caching mechanism. The
library packages built for Debian make sure that ldconfig is run
automatically on installation.
Cheers,
-Hilko
11 years, 11 months
Re: [Libguestfs] libguestfs-test-tool error, libcap.so - no such file
by Richard W.M. Jones
On Fri, Jan 18, 2013 at 12:02:35PM -0500, Skippy VonDrake wrote:
> > The febootstrap output indicates that libcap2 has not been included in
> > the appliance, which is ... a bug!
> >
> > Try this patch:
> >
> > https://github.com/libguestfs/libguestfs/commit/24c4178749817639ecf9ad61f...
> >
> > I guess that on Fedora libcap must be pulled in as an implicit dependency.
>
> The patch worked to complete the test of 'quickcheck' with "TEST FINISHED OK".
> Thank you!
>
> The 'make check' results have 1 failed test but it looks like that's
> from not having lvm2 configured.
>
> make quickcheck output: http://pastebin.com/qkjjAz6C
> make check output: http://pastebin.com/FRmLaeE3
>
> I still don't understand why after installing it on the system the
> libraries aren't linked up properly.
>
> $ guestfish --version
> guestfish: error while loading shared libraries: libguestfs.so.0:
> cannot open shared object file: No such file or directory
Is /usr/local/lib in the dynamic linker path? You might need
to add it to '/etc/ld.so.conf'.
> $ libguestfs-test-tool
> libguestfs-test-tool: error while loading shared libraries:
> libguestfs.so.0: cannot open shared object file: No such file or
> directory
>
> $ ldd `which libguestfs-test-tool`
> linux-vdso.so.1 => (0x00007fff325ff000)
> libguestfs.so.0 => not found
> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f12522a0000)
> /lib64/ld-linux-x86-64.so.2 (0x00007f125267e000)
>
>
> $ sudo find / -name 'libguestfs.so*' | xargs ls -l
> /usr/local/lib/libguestfs.so -> libguestfs.so.0.391.0
> /usr/local/lib/libguestfs.so.0 -> libguestfs.so.0.391.0
> /usr/local/lib/libguestfs.so.0.391.0
>
> For now I'll stick in symbolic links to "patch" the system.
> And look at your suggestions regarding a static appliance.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.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://people.redhat.com/~rjones/virt-df/
11 years, 11 months
[PATCH] daemon: copy entire lvm directory
by Olaf Hering
cp will fail if /etc/lvm is an empty directory. Copy the entire
directory and adjust environment variable.
Signed-off-by: Olaf Hering <olaf(a)aepfle.de>
---
daemon/lvm-filter.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/daemon/lvm-filter.c b/daemon/lvm-filter.c
index 52d6b3d..204e238 100644
--- a/daemon/lvm-filter.c
+++ b/daemon/lvm-filter.c
@@ -47,7 +47,7 @@ void
copy_lvm (void)
{
struct stat statbuf;
- char cmd[64];
+ char cmd[64], env[64];
int r;
/* If /etc/lvm directory doesn't exist (or isn't a directory) assume
@@ -68,8 +68,8 @@ copy_lvm (void)
exit (EXIT_FAILURE);
}
- /* Hopefully no dotfiles in there ... XXX */
- snprintf (cmd, sizeof cmd, "%s -a /etc/lvm/* %s", str_cp, lvm_system_dir);
+ /* Copy the entire directory */
+ snprintf (cmd, sizeof cmd, "%s -a /etc/lvm/ %s", str_cp, lvm_system_dir);
r = system (cmd);
if (r == -1) {
perror (cmd);
@@ -85,7 +85,8 @@ copy_lvm (void)
}
/* Set environment variable so we use the copy. */
- setenv ("LVM_SYSTEM_DIR", lvm_system_dir, 1);
+ snprintf(env, sizeof(env), "%s/lvm", lvm_system_dir);
+ setenv ("LVM_SYSTEM_DIR", env, 1);
/* Set a handler to remove the temporary directory at exit. */
atexit (rm_lvm_system_dir);
--
1.8.0.1
11 years, 11 months
error make guestfs: relocation libfuse.a Bad value
by Skippy VonDrake
Trying to setup guestfs on a coworkers system and am at a loss about
this error and doing 'make' on version 1.20:
/usr/bin/ld: /usr/lib/libfuse.a(fuse.o): relocation R_X86_64_32
against `.bss' can not be used when making a shared object; recompile
with -fPIC
/usr/lib/libfuse.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
Installed fuse via:
sudo apt-get install fuse
sudo apt-get install libfuse-dev
Tried this before configure:
export CFLAGS="-fPIC"
And
./configure --enable-shared
With and without "--enable-shared".
Never had this problem with my system...
Any suggestions?
11 years, 11 months
[PATCH] gobject: Add pkg-config for gobject bindings
by Matthew Booth
---
configure.ac | 1 +
gobject/.gitignore | 1 +
gobject/Makefile.am | 3 +++
gobject/libguestfs-gobject-1.0.pc.in | 11 +++++++++++
4 files changed, 16 insertions(+)
create mode 100644 gobject/libguestfs-gobject-1.0.pc.in
diff --git a/configure.ac b/configure.ac
index a1e761e..dc8d9bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1440,6 +1440,7 @@ AC_CONFIG_FILES([Makefile
generator/Makefile
gnulib/lib/Makefile
gnulib/tests/Makefile
+ gobject/libguestfs-gobject-1.0.pc
gobject/Makefile
gobject/docs/Makefile
gobject/docs/guestfs-docs.sgml
diff --git a/gobject/.gitignore b/gobject/.gitignore
index 9dbad7b..1afffa0 100644
--- a/gobject/.gitignore
+++ b/gobject/.gitignore
@@ -1,3 +1,4 @@
# Generated sources
/include
+/libguestfs-gobject-1.0.pc
/src
diff --git a/gobject/Makefile.am b/gobject/Makefile.am
index d949401..864b6b1 100644
--- a/gobject/Makefile.am
+++ b/gobject/Makefile.am
@@ -57,6 +57,9 @@ libguestfs_gobject_1_0_la_LIBS = $(GOBJECT_LIBS)
libguestfs_gobject_1_0_la_LDFLAGS = $(LDFLAGS) -L$(top_builddir)/src
libguestfs_gobject_1_0_la_LIBADD = -lguestfs
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libguestfs-gobject-1.0.pc
+
# All the headers except <guestfs-gobject.h> should be installed
# in the subdirectory.
install-data-hook:
diff --git a/gobject/libguestfs-gobject-1.0.pc.in b/gobject/libguestfs-gobject-1.0.pc.in
new file mode 100644
index 0000000..8effad7
--- /dev/null
+++ b/gobject/libguestfs-gobject-1.0.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libguestfs-gobject-1.0
+Version: @VERSION@
+Description: gobject bindings for the libguestfs library
+Requires: libguestfs,gobject-2.0,gio-2.0
+Cflags: -I${includedir}
+Libs: -L${libdir} -lguestfs-gobject-1.0
--
1.7.11.7
11 years, 11 months
rb_alloc_func_t undeclared in ruby 1.8
by Olaf Hering
ruby bindings fail to build with ruby 1.8.7 because rb_alloc_func_t does
not exist in this version of ruby. This happens due to commit
448a02373df95dafc0d4b3e4db0e77c96a09074d
Olaf
11 years, 11 months