library infrastructure roundup

Alastair Reid
Tue, 17 Jun 2003 22:29:51 +0100

On Tuesday 17 June 2003 10:09 pm, John Meacham wrote:
> random question, I have not been paying too much attention to the
> conversation, but in the proposed schemes, are there ways to install
> libraries local to a user? I don't always have root access on machines
> which I need to compile programs. Just a thought.

Yes!  That has been a signifcant thread in our offline discussion.

Section 3.2.2 and 3.2.3 of 
talks about this.

Please feel free to edit the wiki.

btw I currently 'solve' this in my Makefiles by making up my own package.conf 
file which I put in:


(where libdir is the value generated by running configure).
I then use:

  HC_OPTS += -package-conf $(libdir)/package.conf

to make sure that GHC knows to use it.

Sadly, I also have to write:

  boot ::
	test -f $(libdir)/package.conf \
        || (install -m0755 -d $(libdir) ; echo "[]" > $(libdir)/package.conf)

because 'ghc-pkg --update' objects if the package.conf file doesn't exist.

This approach seems like a plausible workaround for any one author to use for 
their libraries.  Of course, it doesn't work so well if you want to use 
libraries written by me and libraries written by someone else since we're 
unlikely to hit on the same filename - which is why I want packagers to agree 
on a standard location for each platform and for compiler folk to provide a 
way that packagers can bake that location into the compiler frontend as they 
build the compiler package.

> [...] pkg-config [...]

Section 3.3 of the same page talks about these foo-config programs but I don;t 
think any of us have heard of pkg-config.  Can you edit the wiki with some 
info/pointers please?  (Also worth copying it to this list since mail works 
better than wiki for some purposes.)

Alastair Reid