Run ldconfig early in the init script, so libraries outside standard library paths but with a proper ld.so configuration file pointing at them can be found. --- appliance/init | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/appliance/init b/appliance/init index b407bf9..94e77cf 100755 --- a/appliance/init +++ b/appliance/init @@ -10,6 +10,10 @@ RUNLEVEL=S PREVLEVEL=N export RUNLEVEL PREVLEVEL +# Make sure to find all the libraries, also those in non-standard place +# but with a proper ld.so configuration pointing at them +ldconfig || : + # Try to print a stack trace for segfaults inside the appliance. for d in /lib64 /lib; do f=$d/libSegFault.so -- 1.9.3
Richard W.M. Jones
2014-Jul-15 08:50 UTC
Re: [Libguestfs] [PATCH] appliance: init: run ldconfig
On Mon, Jul 14, 2014 at 11:29:52AM +0200, Pino Toscano wrote:> Run ldconfig early in the init script, so libraries outside standard > library paths but with a proper ld.so configuration file pointing at > them can be found.[...] Yes, I have hit a problem where ldconfig was needed.> +# Make sure to find all the libraries, also those in non-standard place > +# but with a proper ld.so configuration pointing at them > +ldconfig || :You don't need ||: in this script. How much time does this add to the start of the appliance? ie. if you run time ./run guestfish -a /dev/null run before and after what is the difference? ACK in principle. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com 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/
On Tuesday 15 July 2014 09:50:24 Richard W.M. Jones wrote:> On Mon, Jul 14, 2014 at 11:29:52AM +0200, Pino Toscano wrote: > > Run ldconfig early in the init script, so libraries outside standard > > library paths but with a proper ld.so configuration file pointing at > > them can be found. > > [...] > > Yes, I have hit a problem where ldconfig was needed. > > > +# Make sure to find all the libraries, also those in non-standard > > place +# but with a proper ld.so configuration pointing at them > > > +ldconfig || : > You don't need ||: in this script.Removed, thanks.> How much time does this add to the start of the appliance? ie. > if you run > > time ./run guestfish -a /dev/null run > > before and after what is the difference?I didn't find any slowdowns since I started using it locally for the last couple of weeks; with the command above I get more or less the same time, i.e. ~2.5s on my machine (I get times between ~2.52 and ~2.57 both before and after). -- Pino Toscano