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

Ian MacLarty maclarty at cs.mu.OZ.AU
Sat Oct 30 10:41:10 AEST 2004


On 28 Oct 2004, at 19:02, Michael Wybrow wrote:

>
> 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.
>
I think you're right.

> 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.
>
The rules to build the dylibs is in the .dep files in /browser and 
/library.  These are automatically generated by the compiler and 
because the source distribution was generated on Linux, the 
-install_name option was not included.

I've posted a diff to fix these problems to mercury-reviews.

Ian.

--------------------------------------------------------------------------
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