<div dir="ltr"><div>LIBRARY_PATH=~/.local/lib64 doesn't seem to work either unfortunately (still unable to find libmagic). Any other ideas (even if I need to edit a file and rerun autoconf or something)?<br></div><div><br></div><div>Thanks,</div><div>Lewis</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 1 May 2021 at 20:01, Richard W.M. Jones <<a href="mailto:rjones@redhat.com">rjones@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sat, May 01, 2021 at 06:04:44PM +0100, Lewis Gaul wrote:<br>
> Thanks Rich, that worked.<br>
> <br>
> I also had to compile augeas and specify 'AUGEAS_LIBS=~/.local/lib<br>
> AUGEAS_CFLAGS="-O3"' for it to be picked up.<br>
> <br>
> The problem I'm hitting now is:<br>
> configure: error: libmagic (part of the "file" command) is required.<br>
> Please install the file devel package<br>
> <br>
> I have manually installed the contents of the file-devel RPM and its dependency<br>
> file-libs into ~/.local/, so I now have libmagic.so under ~/.local/lib64/. Any<br>
> idea how I can get ./configure to pick this up? I tried LD_LIBRARY_PATH=~<br>
> /.local/lib64 but this didn't seem to work.<br>
<br>
I think maybe LIBRARY_PATH (not LD_*) might work.<br>
<br>
Unfortunately m4/guestfs-libraries.m4 is using AC_CHECK_LIB instead of<br>
PKG_CHECK_MODULES, so you cannot just set PKG_CONFIG_* environment<br>
variables to pick up the right libmagic.pc (which is a bug in<br>
libguestfs).<br>
<br>
Rich.<br>
<br>
> I'm hopeful this might be the last piece that's missing!<br>
> <br>
> Thanks for your help,<br>
> Lewis<br>
> <br>
> On Sat, 1 May 2021 at 17:07, Richard W.M. Jones <<a href="mailto:rjones@redhat.com" target="_blank">rjones@redhat.com</a>> wrote:<br>
> <br>
>     On Sat, May 01, 2021 at 02:26:37PM +0100, Lewis Gaul wrote:<br>
>     > Hello,<br>
>     ><br>
>     > I'm trying to build/install libguestfs (for virt-edit) on a RHEL7 server,<br>
>     where<br>
>     > I have no root access. I couldn't find any pre-built binaries online, so<br>
>     have<br>
>     > been trying to build from source (downloaded from https://<br>
>     > <a href="http://download.libguestfs.org/" rel="noreferrer" target="_blank">download.libguestfs.org/</a>). I'm using the latest stable version, 1.44.1.<br>
>     ><br>
>     > I have followed the instructions at <a href="https://libguestfs.org/" rel="noreferrer" target="_blank">https://libguestfs.org/</a><br>
>     > guestfs-building.1.html, but './configure' is failing with:<br>
>     > checking for gperf... no<br>
>     > configure: error: gperf must be installed<br>
>     ><br>
>     > Indeed, it seems gperf is not installed. I then built gperf from source<br>
>     and<br>
>     > symlinked the binary to '~/bin/gperf', which is on my PATH.<br>
>     ><br>
>     > The problem is that I can't work out how to get libguestfs's ./configure<br>
>     script<br>
>     > to pick up this manually-compiled copy of gperf (which I don't have<br>
>     permissions<br>
>     > to place in a standard location under /usr/).<br>
>     ><br>
>     > Can anyone suggest a solution/workaround?<br>
> <br>
>     I think you should be able to do:<br>
> <br>
>       ./configure GPERF=$HOME/bin/gperf<br>
> <br>
>     If not then try fiddling around with m4/guestfs-progs.m4 to see if you<br>
>     can come up with a workable patch.<br>
> <br>
>     Rich.<br>
> <br>
>     > (There may be a similar problem for some of the other external<br>
>     dependencies<br>
>     > that are checked after gperf - I couldn't see a way to get configure to<br>
>     > continue on failure or equivalent).<br>
>     ><br>
>     > Thanks in advance,<br>
>     > Lewis<br>
> <br>
>     --<br>
>     Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/" rel="noreferrer" target="_blank">http://people.redhat.com/</a><br>
>     ~rjones<br>
>     Read my programming and virtualization blog: <a href="http://rwmj.wordpress.com" rel="noreferrer" target="_blank">http://rwmj.wordpress.com</a><br>
>     Fedora Windows cross-compiler. Compile Windows programs, test, and<br>
>     build Windows installers. Over 100 libraries supported.<br>
>     <a href="http://fedoraproject.org/wiki/MinGW" rel="noreferrer" target="_blank">http://fedoraproject.org/wiki/MinGW</a><br>
> <br>
> <br>
<br>
-- <br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/~rjones" rel="noreferrer" target="_blank">http://people.redhat.com/~rjones</a><br>
Read my programming and virtualization blog: <a href="http://rwmj.wordpress.com" rel="noreferrer" target="_blank">http://rwmj.wordpress.com</a><br>
virt-df lists disk usage of guests without needing to install any<br>
software inside the virtual machine.  Supports Linux and Windows.<br>
<a href="http://people.redhat.com/~rjones/virt-df/" rel="noreferrer" target="_blank">http://people.redhat.com/~rjones/virt-df/</a><br>
<br>
</blockquote></div>