Gnome won't compile: cannot find -lpcre

Stephane Russell stephane.russell at
Fri Dec 7 21:13:31 PST 2007

I looked at glib2 after your post, and I could see that pcre is not a
dependecy of glib2 because glib2 provides it's own. But it's not
intalling it (it's not in it's PLIST), so it's not in it's buildlink
either. Mystery solved. ;-)

Thanks for the help.


walt a écrit :
> On Wed, 28 Nov 2007, Stephane Russell wrote:
>> You were right, pcre was not a dependency, so it wasn't added in the
>> buildlink process. pcre was included in the gtk2 link with a "-lpcre"
>> statement, for a reason I still don't understand. I could'nt find why
>> that flag is added, since nothing in gtk2 requires it, not even in the
>> gtk2 pkgsrc build files...
> The 'magic' is in the buildlink3 files, which are a fundamental  part of
> the pkgsrc build system.
> Look at x11/gtk2/, for example, and you will see
> .include "../../devel/glib2/", which make sense because
> glib2 is an important part of gtk2.
> Between the buildlink3 system and the universally beloved libtool, you
> eventually pull in /usr/pkg/lib/, which contains this:
> # Libraries that this one depends upon.
> dependency_libs='-L/usr/pkg/lib -lpcre -lintl'
> Trivial, really, once you've spent a decade bashing your head against
> the inevitability of it all :o)
> A quick and dirty way to investigate these dependencies is to do a
> 'bmake patch' for gtk2, which takes only a minute, and then poke
> around in the work/.buildlink directory to see if libpcre shows up.
> If not, you can try to work backwards from there.  The work/.work.log
> can also be very helpful.

More information about the Bugs mailing list