Subject: x11/gtk2 on FreeBSD
To: None <tech-pkg@netbsd.org>
From: Lasse Kliemann <lasse-list-tech-pkg-netbsd-2004@plastictree.net>
List: tech-pkg
Date: 01/23/2005 00:15:43
--Wtrm9ATX0sn6fFKv
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

I tried to build x11/gtk2 from pkgsrc-current on FreeBSD 5.3. It aborts=20
complaining about a missing or wrong glib.

[...]
checking for GLIB - version >=3D 2.6.0... Abort trap (core dumped)
[...]


A closer inspection of config.log reveals:

[...]
configure:22619: checking for GLIB - version >=3D 2.6.0
configure:22738: cc -o conftest -O2 -pthread -I/usr/pkg/include -D_THREAD_S=
AFE -I/usr/include -I/usr/pkg/include/freetype2 -Wall -pthread -I/usr/pkg/i=
nclude/glib/glib-2.0 -I/usr/pkg/lib/glib-2.0/include   -DPREFIX=3D"\"/usr/p=
kg\"" -I/usr/pkg/include -D_THREAD_SAFE -I/usr/include -I/usr/pkg/include/f=
reetype2 -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -L/usr/lib -Wl,-R/usr/l=
ib -L/usr/pkg/xorg/lib -Wl,-R/usr/pkg/xorg/lib conftest.c -Wl,-R/usr/pkg/li=
b -pthread -L/usr/pkg/lib -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-=
2.0 -liconv    -lintl -liconv -lpthread  >&5
configure:22741: $? =3D 0
configure:22743: ./conftest
Fatal error 'Spinlock called when not threaded.' at line 83 in file /usr/sr=
c/lib/libpthread/thread/thr_spinlock.c (errno =3D 0)
configure:22746: $? =3D 134
configure: program exited with status 134
configure: failed program was:
[...]


I got a hint from Google to put these into /etc/libmap.conf:

libc_r.so.5 libpthread.so.1
libc_r.so libpthread.so

It in fact resolved the error; x11/gtk2 is built now (didn't test it yet).

Is this the right way to do it? If so, maybe we should document this?
I haven't found anything appropriate in the list archives.

--=20
Lasse Kliemann
      private homepage: http://plastictree.net
   NO software patents: http://swpat.ffii.org
do NOT use M$ products: http://plastictree.net/articles/noms

--Wtrm9ATX0sn6fFKv
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iD8DBQFB8t6f1gObwed86AkRAnnTAJ4x98Vt/GkKZWYbIVkQE8LMs75LRgCeNTDL
uowQFY3rbtMvLI7w81BFPhc=
=UrKA
-----END PGP SIGNATURE-----

--Wtrm9ATX0sn6fFKv--