[m-dev.] Proposal: Improve specifying Mercury install paths

Julien Fischer jfischer at opturion.com
Sun Mar 29 01:41:12 AEDT 2020


Hi Keri,

On Sat, 28 Mar 2020, Keri Harris wrote:

> I've run into a couple of issues with install paths in Mercury:
>
> 1. Mercury installed with --prefix=/usr may not respect any 32 bit vs
> 64 bit library separation on some hosts. For example on RedHat Linux or
> Gentoo Linux, 32 bit libraries are installed into /lib, /usr/lib while
> 64 bit libraries are installed into /lib64, /usr/lib64. 
> There doesn't appear to be any way to install Mercury into the
> following directory structure:
>
>   /usr/bin/mmc
>   /usr/lib64/mercury/lib/$grade/...
>                     /ints/...
>                     /...

I assume that what you are doing there is essentially:

    ./configure --prefix=/usr

?

Allowing that may have been the original intent when the library
installation directory was designed, however that was well before Linux
distributions started using /usr/lib64 etc.

At this point, I think it may be simpler to achieve something close to
what you want by making it possible to specify alternative installation
directories for the executables ({prefix}/bin) and documentation
({prefix}/share) instead.  (Autoconf already provides --bindir etc, we
just don't use them.)

In that case I would suggest setting the installation prefix for the
rest of the system to /usr/lib64/mercury or /usr/lib/mercury and living
with the fact that there will be a few extra layers of subdirectories
(i.e. lib/mercury) beneath that.

The library files being installed under $prefix/lib/mercury is hard
coded throughout a good part of the system and changing that would be a
reasonable chunk of work.  (For not much benefit IMO.)

Julien.


More information about the developers mailing list