Subject: pkgsrc/x11/gtk2 failing to build under normal NetBSD
To: None <>
From: Jeremy C. Reed <>
List: tech-pkg
Date: 02/05/2004 08:58:15
pkgsrc/x11/gtk2 is failing to build on standard NetBSD/i386 1.6.1_STABLE
with standard LOCALBASE (/usr/pkg). (This system was always standard.)

configure failed with:

checking for freetype-config...
checking For sufficiently new FreeType (at least 2.0.1)... yes
configure: error: *** libX11 not found. Check 'config.log' for more

This is from config.log:

configure:26360: checking for XOpenDisplay in -lX11
configure:26391: cc -o conftest -O2 -I/usr/pkg/include
-I/usr/X11R6/include -Wall -I/usr/X11R6/include/freetype2
-I/usr/pkg/include -I/usr/X11R6/include -Wl,-R/usr/pkg/lib -L/usr/pkg/lib
-liconv -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib conf test.c -lX11
-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -L/usr/X11R6/lib -lXft -lfreetype
-lXrender -lXext -lfontconfig -lX11 -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib
-lfreetype -lintl >&5
undefined reference to `FT_Get_BDF_Property'
collect2: ld returned 1 exit status

I read this is caused by old freetype2 being available.

freetype2-2.1.5     Font rendering engine and library API
freetype-lib-1.3.1nb1 TrueType font rendering engine and library API

It is defined in my /usr/pkg/include/freetype2/freetype/ftbdf.h

But I have this buildlinked:

 384580      0 lrwxr-xr-x    1 reed     wheel           45 Feb  4 19:58
work.rainier/.buildlink//include/freetype2/freetype/ftbdf.h ->

It is not defined in /usr/X11R6/include/freetype2/freetype/ftbdf.h. I
assume that file was as installed from one of the X sets (not pkgsrc).

rainier:/usr/pkgsrc/x11/gtk2$ make show-var VARNAME=_NEED_FREETYPE2
rainier:/usr/pkgsrc/x11/gtk2$ make show-var VARNAME=_FREETYPE_VERSION
rainier:/usr/pkgsrc/x11/gtk2$ make show-var VARNAME=_FREETYPE_DEPENDS

So I tried to set

BUILDLINK_DEPENDS.freetype2?=   freetype2>=2.0.1

in my x11/gtk2/Makefile, but no change. I am trying to figure out where
the 2.0.9 is defined.

Then I tried to change it in ../../graphics/freetype2/ but
still get:

$ make show-var VARNAME=BUILDLINK_DEPENDS.freetype2

Does anyone know where this 2.0.9 comes from and why it overrides my

   Jeremy C. Reed