[mercury-users] Newbie questions

John Eikenberry jae at zhar.net
Mon Dec 11 21:26:21 AEDT 2000


Fergus Henderson wrote:

> To install the Posix library, do the following:
> 
> 	cd extras/posix
> 	mmake libposix.depend

This worked but it caused an error:

$ mmake libposix.depend
mmc --generate-dependencies     libposix
Error: can't read source file for module `libposix'.
For more information, try recompiling with `-E'.
make: *** [libposix.depend] Error 1


> 	mmake libposix.install INSTALL_PREFIX=/my/install/dir LIBGRADES=

I left out 'LIBGRADES=' and even though it errored out at the end it seemed
to work. I was able to compile and run the included extras/posix/hello.m
example fine (I did remove all the other files first, to make it use the
installed version).

In case you're curious, here's the error:

/bin/sh: -c: line 2: syntax error: unexpected end of file
make[1]: *** [libposix.install_grades] Error 2
make[1]: Leaving directory `/home/jae/Current/Mercury/posix'
make: *** [libposix.install] Error 1


> 	cp *.h /my/install/dir/lib/mercury/inc
> 
> If you want to install versions of the Posix library that are compiled
> with debugging, profiling, etc. then leave off the "LIBGRADES=".
> If you want to install in the same place as the other Mercury
> libraries, then leave off the "INSTALL_PREFIX=/my/install/dir".
> 
> Then in your application's Mmakefile put
> 
> 	EXTRA_LIBRARIES = posix
> 	EXTRA_LIB_DIRS = /whatever/lib/mercury

Yep... adding these to the top of the Mmakefile for hello.m did the trick.

Also firgured out I could also set them as env vars and use 'mmake -e'...
cool. 

> This is documented in the "Libraries" chapter of the Mercury user
> guide, in particular the last section.

Thanks again.

-- 

John Eikenberry
[jae at zhar.net - http://zhar.net]
______________________________________________________________
"A society that will trade a little liberty for a little order
 will deserve neither and lose both."
                                          --B. Franklin
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list