Subject: Re: CVS commit: pkgsrc
To: Nick Hudson <nick@nthcliff.demon.co.uk>
From: Johnny C. Lam <lamj@stat.cmu.edu>
List: pkgsrc-changes
Date: 03/12/2001 13:28:00
Nick Hudson <nick@nthcliff.demon.co.uk> writes:
> 
> You're right if you specify the -rpath flag to libtool. If you don't get
> a library of the -fPIC objects.
> 
> $ libtool --mode=compile cc -c foo.c
> cc -c foo.c  -fPIC -DPIC -o .libs/foo.o
> cc -c foo.c -o foo.o >/dev/null 2>&1
> $
> $ libtool --mode=link cc -o libl1_pic.la foo.lo
> rm -fr  .libs/libl1_pic.a .libs/libl1_pic.la
> ar cru .libs/libl1_pic.a .libs/foo.o
> ranlib .libs/libl1_pic.a
> creating libl1_pic.la
> (cd .libs && rm -f libl1_pic.la && ln -s ../libl1_pic.la libl1_pic.la)

I didn't know you could do this; thanks for pointing this out!  So I
can use libtool itself to create the _pic.a libraries if I need to,
instead of groveling the .lo files to figure out how to manually do
it.  I'll go and modify the way the _pic.a libraries in pkgsrc are
created to do it in the way that you outline above.

> ps. Still don't understand why you can't use the shared library. I must
> read your email again...

For ncurses, I have no idea.  Maybe manu@netbsd.org could explain why
xerces-p needs _pic.a libraries?  I'm puzzled as to why the shared
libs are insufficient as well.

	Cheers,

     -- Johnny C. Lam <lamj@stat.cmu.edu>
        Department of Statistics, Carnegie Mellon University
        http://www.stat.cmu.edu/~lamj/