Subject: Re: OS X pkgsrc fun
To: Dan Winship <>
From: Johnny C. Lam <>
List: tech-pkg
Date: 09/15/2003 01:15:54
On Sat, Sep 06, 2003 at 04:52:06PM +0000, Dan Winship wrote:
>       * _USE_RPATH=no: There are about a zillion places that need to be
>         checking _USE_RPATH that aren't. Fixing all of them would be a
>         lot of work, especially in packages like freetype2 that actually
>         patch RPATH_FLAG into files. Since Darwin is the only
>         _USE_RPATH=no platform, it would be a lot simpler to just kludge
>         around the problem by setting  _OPSYS_RPATH_NAME to "-L" on
>         Darwin and killing off _USE_RPATH. ?

We should be able to work around this.  Both buildlink2 and buildlink3
(hereafter "bl2" and "bl3") can strip -Wl,-R* or -R* from files before
they're installed, and we just need to identify which files those are.
By default, we do this on files matching *-config, *, and *.pc.

>       * "-lpthread" on Darwin is a no-op, and
>         while there is a libpthread.dylib, there's no
>         "libpthread.0.1.dylib" or whatever, so fake-la messes up when
>         trying to buildlink it. (PR 20516). I'm attaching a suggested
>         patch for this.

I believe I've fixed this in bl3.  When we eventually switch bl2
packages to use bl3, this problem should just go away, along with all
other cases where a package installs a .la file for a library that is
also in one of the system library paths.

>       * Darwin's gcc has a bug in it that makes
>         symlinked header files on UFS not work quite right. I filed a
>         bug on, maybe Apple will fix it for Panther.
>         Anyway, if we're not buildlinking /usr/include/pthread.h any
>         more, then in most cases we should be able to get away with
>         using "ln" rather than "ln -s" to populate the buildlink include
>         dirs. If not, or as a fallback, we'll have to cp them. Blah.
>         Either way, I'm not sure what the clean way to hack up
> to do that on just Darwin is. (Maybe a
>         Darwin-only post-buildlink rule?)

I just read your bug report there (for anyone else who's curious, it's
bug #851 on  I'll try to implement the ln/cp idea in
a way that lets us isolate its use.


	-- Johnny Lam <>