[m-dev.] Re: mercury: should this package be removed?

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Feb 20 16:31:54 AEDT 2008


On Wed, 20 Feb 2008, Peter Moulder wrote:

> One thing to take care of that you might not think of is handling the
> caveat mentioned in mercury's INSTALL file:
>
>  # Step 3.  Run `make install'.
>  #          This step will also take a long time.
>  #
>  #	BEWARE: if something goes wrong in this step, e.g. running
>  #	out of disk space, and the installation has already gotten
>  #	past installing the documentation, and started installing
>  #	the different grades of the libraries then in general it is
>  #	NOT sufficient to simply rerun `make install'.  Instead you
>  #	may need to start from scratch again.
>
> Does ÿÿstart from scratch againÿÿ require doing ÿÿmake cleanÿÿ, or does it
> suffice to re-run make?  If the latter, then I think this can be
> achieved by having debian/rules' install target start by removing the
> build-stamp file.

That caveat is unnecessary in some respects (or perhaps it would be better
described as very conservative)  since the installation target now makes a
copy of the relevant source directories and builds the different library
grades from them rather than the original directories.  If building the grades
does go wrong, it is probably sufficient to just re-run make install_grades,
rather than make install.

> Whereas if a ÿÿmake cleanÿÿ is required, then I can't think how to handle
> this exactly right.  Having the build (or build-stamp) target start with
> ÿÿmake cleanÿÿ almost works, except that it will presumably fail if the
> install (or binary etc.) target is run as real root instead of under
> fakeroot (and the build target is run as non-root).  Having
> debian/rules' install target do ÿÿ...  || { rc=$?; make clean; exit $rc;
> } will usually work, but may be brittle, and may be rather surprising to
> a user trying to debug a compile failure.  (Having ÿÿmake cleanÿÿ in the
> build target has the same problem to a lesser extent.)  OTOH, I believe
> Mercury's install target more or less does ÿÿmake cleanÿÿ at the start of
> each grade anyway.
>
> Maybe the best thing if ÿÿmake cleanÿÿ is required is to ignore this
> problem except to document it as an upstream bug.
>
>
> Another non-obvious thing to check is to make sure that either mercury
> allows being compiled & installed with ÿÿmake -j3ÿÿ, or that the recursive
> make is never parallel.  E.g. (for the latter) make sure that
> debian/rules ignores parallel=n option in DEB_BUILD_OPTIONS (and instead
> documents that it's deliberately ignored).

In theory, it is possible to compile Mercury in parallel.  In practice it
works fine with -j2 but I've encountered problems at -j4 on some machines.

Also, building the library grades in parallel doesn't work at the moment,
which is the part that really does need to be done in parallel.

Cheers,
Julien.


More information about the developers mailing list