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

Re: [Libguestfs] "make distcheck" failure

Richard W.M. Jones wrote:
> On Tue, Aug 28, 2012 at 05:46:49PM +0200, Jim Meyering wrote:
>> In Makefile.am files, installation-related rules
>> must honor the $(prefix) Makefile variable.  For example,
>> in many Makefiles you'll find files being installed to
>> $(DESTDIR)$(bindir), with these definitions:
>>     bindir = ${exec_prefix}/bin
>>     exec_prefix = ${prefix}
>> Currently, $(OCAMLLIB) (set from m4/ocaml.m4 by running $OCAMLC) is set
>> to /usr/lib64/ocaml for me.  If we could make it include $(exec_prefix),
>> that would solve this problem.
> I see.  Not an easy one to solve however.  The OCaml library path
> comes from running:
>   $OCAMLC -where

A slightly kludgey (pragmatic?) fix would be to transform the
current $OCAMLLIB by these in ocaml.m4:


However, that would work only if ocamlc is installed in the normal
system-wide location.  It would not work if you are using a version of
ocamlc that you installed using --prefix=$HOME/ocaml.  For cases like that
(where the above substitutions make no change), the easiest/safest would be
to abort the configure script.  Perhaps easier still, but not safe, would
be to allow the configure/build to proceed, but then "make distcheck"
could end up modifying files under $HOME/ocaml for those whose ocamlc
has a writable OCAMLLIB directory.

Currently, if root runs "make distcheck", I suspect it would put things in
$OCAMLLIB.  That would be rather antisocial, but maybe you have something
to abort a "make distcheck" when it's run by root?  I haven't tried that.

> This is not an (especially) peculiar OCaml thing.  For example we
> detect the Python library path using:
>   $PYTHON -c "import distutils.sysconfig; \
>               print (distutils.sysconfig.get_python_inc ());"
> This allows multiple parallel Python installations to get along on
> Debian.  The user just specifies the $PYTHON binary and everything
> works off that.  So I'm fairly sure the same bug exists in some
> Python, Perl and Ruby code in libguestfs too.
> Rich.

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