Discussion:
[m-dev.] Version of Mercury to Compile Mercury
Charles Shuller
2015-06-22 14:47:04 UTC
Permalink
Hello all,

What version of mercury do I need to have installed to build the current
development branch. I've currently got 14.01.1 installed.

I think that isn't recent enough because when I try to configure the code
in git it finds mmc just fine, but still errors out:

looking for an already installed Mercury compiler to bootstrap with...
checking for mmc... /usr/local/bin/mmc
checking whether the above mmc works and is sufficiently recent... no
configure: error: You need a working Mercury compiler to bootstrap with


***@jarvis:~/src/mercury_fork$ mmc --version
Mercury Compiler, version 14.01.1, configured for x86_64-unknown-linux-gnu
Copyright (C) 1993-2014 The University of Melbourne
***@jarvis:~/src/mercury_fork$



Thanks!

Charles
Julien Fischer
2015-06-22 15:00:03 UTC
Permalink
Hi Charles,
Post by Charles Shuller
Hello all,
What version of mercury do I need to have installed to build the
current development branch.   I've currently got 14.01.1 installed.
You'll require a recent rotd -- 14.01.X is too old. I suggest using the
current rotd, 2015-06-22.

Cheers,
Julien.
Mark Brown
2015-06-22 15:01:52 UTC
Permalink
On Tue, Jun 23, 2015 at 12:47 AM, Charles Shuller
Post by Charles Shuller
Hello all,
What version of mercury do I need to have installed to build the current
development branch. I've currently got 14.01.1 installed.
Use a release-of-the-day to bootstrap a git workspace. On the ROTDs
part of the downloads page there are notes about how recent it needs
to be, but if you don't already have one just get the latest.
Post by Charles Shuller
I think that isn't recent enough because when I try to configure the code in
looking for an already installed Mercury compiler to bootstrap with...
checking for mmc... /usr/local/bin/mmc
checking whether the above mmc works and is sufficiently recent... no
configure: error: You need a working Mercury compiler to bootstrap with
Make sure this one isn't in the part when you compile the ROTD.

Also, check the documentation for `--enable-minimal-install' in the
INSTALL file.

Cheers,
Mark.
Zoltan Somogyi
2015-06-22 18:50:15 UTC
Permalink
Post by Mark Brown
On Tue, Jun 23, 2015 at 12:47 AM, Charles Shuller
Post by Charles Shuller
I think that isn't recent enough because when I try to configure the code in
looking for an already installed Mercury compiler to bootstrap with...
checking for mmc... /usr/local/bin/mmc
checking whether the above mmc works and is sufficiently recent... no
configure: error: You need a working Mercury compiler to bootstrap with
Make sure this one isn't in the part when you compile the ROTD.
He meant to write "make sure the out-of-date mmc is not in the PATH ...".

I have been thinking of a way to set things up that would make this simpler.
We could put a zero-size file into the source distribution (named something
like ".this_is_a_src_dist" or similar) to act as a flag. The configure script would
detect this, and ignore any installed mmc, out-of-date or not, to make sure
that the .c files supplied by the source distribution are not accidentally overwritten.
The last action of "make install" could be then to delete this file, if it exists.

What do people think?

Zoltan.
Mark Brown
2015-06-28 15:07:38 UTC
Permalink
On Tue, Jun 23, 2015 at 4:50 AM, Zoltan Somogyi
Post by Zoltan Somogyi
Post by Mark Brown
On Tue, Jun 23, 2015 at 12:47 AM, Charles Shuller
Post by Charles Shuller
I think that isn't recent enough because when I try to configure the code in
looking for an already installed Mercury compiler to bootstrap with...
checking for mmc... /usr/local/bin/mmc
checking whether the above mmc works and is sufficiently recent... no
configure: error: You need a working Mercury compiler to bootstrap with
Make sure this one isn't in the part when you compile the ROTD.
He meant to write "make sure the out-of-date mmc is not in the PATH ...".
Yes. Hopeless spall chucker.
Post by Zoltan Somogyi
I have been thinking of a way to set things up that would make this simpler.
We could put a zero-size file into the source distribution (named something
like ".this_is_a_src_dist" or similar) to act as a flag. The configure script would
detect this, and ignore any installed mmc, out-of-date or not, to make sure
that the .c files supplied by the source distribution are not accidentally overwritten.
The last action of "make install" could be then to delete this file, if it exists.
What do people think?
I agree. Few users would actually benefit from bootstrapping source
distributions from existing installs, and even then they would need to
override that behaviour from time to time.

If you call the file DO_NOT_USE_EXISTING_MMC then it should be easy to
remember which file to remove if the rare case that someone wants to
override the new behaviour.

Cheers,
Mark.
Paul Bone
2015-06-28 23:18:17 UTC
Permalink
Post by Mark Brown
On Tue, Jun 23, 2015 at 4:50 AM, Zoltan Somogyi
Post by Zoltan Somogyi
I have been thinking of a way to set things up that would make this simpler.
We could put a zero-size file into the source distribution (named something
like ".this_is_a_src_dist" or similar) to act as a flag. The configure script would
detect this, and ignore any installed mmc, out-of-date or not, to make sure
that the .c files supplied by the source distribution are not accidentally overwritten.
The last action of "make install" could be then to delete this file, if it exists.
What do people think?
I agree. Few users would actually benefit from bootstrapping source
distributions from existing installs, and even then they would need to
override that behaviour from time to time.
I also agree, however sometimes I do want to do this. On a 64bit machine,
which is all of them, I will install Mercury once, then bootstrap the same
version using the installed version. Doing this gives me 3 tag bits for the
compiler. It no-longer affects applications since we started using
hlc.gc.pregen for source distributions, however it will still give me a
slightly faster compiler.

Whichever "make clean" removes the .c files should also remove this file.
Post by Mark Brown
If you call the file DO_NOT_USE_EXISTING_MMC then it should be easy to
remember which file to remove if the rare case that someone wants to
override the new behaviour.
I also agree.
--
Paul Bone
http://www.bone.id.au
Mark Brown
2015-06-29 01:12:14 UTC
Permalink
Post by Paul Bone
Post by Mark Brown
On Tue, Jun 23, 2015 at 4:50 AM, Zoltan Somogyi
Post by Zoltan Somogyi
I have been thinking of a way to set things up that would make this simpler.
We could put a zero-size file into the source distribution (named something
like ".this_is_a_src_dist" or similar) to act as a flag. The configure script would
detect this, and ignore any installed mmc, out-of-date or not, to make sure
that the .c files supplied by the source distribution are not accidentally overwritten.
The last action of "make install" could be then to delete this file, if it exists.
What do people think?
I agree. Few users would actually benefit from bootstrapping source
distributions from existing installs, and even then they would need to
override that behaviour from time to time.
I also agree, however sometimes I do want to do this. On a 64bit machine,
which is all of them, I will install Mercury once, then bootstrap the same
version using the installed version.
That will occur after "make install", so this will work as intended.

The users who would lose out are those who are regularly installing a
new compiler by downloading lots of RsOTD, rather than using git. You
probably don't want to encourage those users anyway.
Post by Paul Bone
Whichever "make clean" removes the .c files should also remove this file.
That would also get people who are merely cleaning up after an
interrupted install.

Cheers,
Mark.
Paul Bone
2015-06-29 06:00:19 UTC
Permalink
Post by Mark Brown
Post by Paul Bone
Post by Mark Brown
On Tue, Jun 23, 2015 at 4:50 AM, Zoltan Somogyi
Post by Zoltan Somogyi
I have been thinking of a way to set things up that would make this simpler.
We could put a zero-size file into the source distribution (named something
like ".this_is_a_src_dist" or similar) to act as a flag. The configure script would
detect this, and ignore any installed mmc, out-of-date or not, to make sure
that the .c files supplied by the source distribution are not accidentally overwritten.
The last action of "make install" could be then to delete this file, if it exists.
What do people think?
I agree. Few users would actually benefit from bootstrapping source
distributions from existing installs, and even then they would need to
override that behaviour from time to time.
I also agree, however sometimes I do want to do this. On a 64bit machine,
which is all of them, I will install Mercury once, then bootstrap the same
version using the installed version.
That will occur after "make install", so this will work as intended.
The users who would lose out are those who are regularly installing a
new compiler by downloading lots of RsOTD, rather than using git. You
probably don't want to encourage those users anyway.
Post by Paul Bone
Whichever "make clean" removes the .c files should also remove this file.
That would also get people who are merely cleaning up after an
interrupted install.
As would removing the C files at that point.

At the risk of overcomplicating this, which bad also because it can make
things difficult to understand. One option is that "make clean" shouldn't
remove the C files if this special file is present, but make distclean
should remove the special file and the C files in all cases.
--
Paul Bone
http://www.bone.id.au
Loading...