[m-dev.] A couple of problems with Shared Mercury libraries on Mac OS X

Michael Wybrow mjwybrow at cs.mu.OZ.AU
Thu Oct 28 19:02:59 AEST 2004


Ian and Julien,

In building a fink package for mercury I've noticed a couple of problems 
with the Mercury Shared library changes.

1) The value of 'shlib_linker_install_name_path' in compiler/options.m
should be 'FINAL_INSTALL_MERC_LIB_DIR' instead of 'INSTALL_MERC_LIB_DIR'

Most of the time these would be the same directory, but for fink I install 
to a seperate install prefix 'INSTALL' to use to build the package.
'FINAL_INSTALL' is the place where the libraries end up getting installed, 
so their install_name needs to be set to this.

2) When building the compiler from the C source tarball without the 
presence of an existing mercury compiler, three dynamic libraries in the 
base grade, rec.gc, are never given an install_name.  These are: 
libmer_std.dylib (from compiler/), libmer_browser.dylib and 
libmer_mdbcomp.dylib (from browser/).  Other ones such as the runtime and 
trace libraries are fine, due to the fact their Mmakefiles have an 
explicit rule for building those dylibs (see comment "For darwin:" in each 
Mmakefile) that passes the option '-install_name'.  Also, versions of 
these three install_name-less libraries are okay in the other grades that 
are built as they are linked with 'ml' instead of the bad 'gcc' rule.

It looks like this one will break the installation of the current rotds 
for new Mac users unless they disable shared libraries, or use one of the 
secondary grades once installed.

This should also be fairly trivial to fix but I just can't figure out 
where the linking rule for dylibs, built from c files, is coming from.


Cheers,
Michael

BTW, I have a 'mercury.info' that describes a fink package for mercury. 
There are a couple of issues with it that I'm working to figure out. Apart 
from the ease of installation ('fink install mercury') because everything 
from fink ends up in /sw/{bin,lib,etc} Mac users are a lot more willing to 
try unixy software because it doesn't have to get installed in with 
Apple's tools and therefore seems a lot safer.  It would probably be 
really good to have this package description submitted to fink in time for 
the release.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list