./configure ... -prefix=$(pwd)/install-root make install I have found failures in the ocaml and python directories. There are probably others, but I stopped looking. In the ocaml directory, the issue is: $(OCAMLFIND) install \ -ldconf ignore -destdir $(DESTDIR)$(OCAMLLIB) \ guestfs \ META *.so *.a *.cma *.cmx *.cmxa *.cmi $(srcdir)/*.mli It tries to install to $(OCAMLLIB), which was obtained from 'ocamlc -where', and therefore points to the system location rather than a directory under $(prefix). Note that DESTDIR is orthoganal to this issue. Similarly, the issue in the python directory relates to the use of PYTHON_INSTALLDIR which was obtain from the system tool, and is therefore not a directory under $(prefix).
Yeah I suspect there are lots of issues with using a prefix. We have never tested this. (DESTDIR OTOH *does* work, since that's what we use to build RPMs). Anyhow, patches welcome! (In reply to comment #0) > In the ocaml directory, the issue is: > > $(OCAMLFIND) install \ > -ldconf ignore -destdir $(DESTDIR)$(OCAMLLIB) \ > guestfs \ > META *.so *.a *.cma *.cmx *.cmxa *.cmi $(srcdir)/*.mli > > It tries to install to $(OCAMLLIB), which was obtained from 'ocamlc -where', > and therefore points to the system location rather than a directory under > $(prefix). Note that DESTDIR is orthoganal to this issue. About this, I don't really think you would want this to obey $(prefix). The correct place to install OCaml libraries is in `ocamlc -where`. If you install them some other place then you end up having to set environment variables.
(In reply to comment #1) > > In the ocaml directory, the issue is: > > > > $(OCAMLFIND) install \ > > -ldconf ignore -destdir $(DESTDIR)$(OCAMLLIB) \ > > guestfs \ > > META *.so *.a *.cma *.cmx *.cmxa *.cmi $(srcdir)/*.mli > > > > It tries to install to $(OCAMLLIB), which was obtained from 'ocamlc -where', > > and therefore points to the system location rather than a directory under > > $(prefix). Note that DESTDIR is orthoganal to this issue. > > About this, I don't really think you would want this to > obey $(prefix). The correct place to install OCaml libraries > is in `ocamlc -where`. If you install them some other place > then you end up having to set environment variables. IMHO if you are trying to build into a non-standard prefix, then setting environment variables is to be expected. eg if you build into $HOME/libguestfs you'll already need to set $PATH, $LD_LIBRARY_PATH for the binaries/libraries. Setting other things like PERL5LIB, PYTHONPATH, and whatever for OCAML is totally reasonable.