Subject: building graphics/py-imagingtk on 1.6 (was Re: libtcl84.so.1 Undefined PLT symbol "pthread_*" )
To: None <tech-pkg@netbsd.org>
From: Simon J. Gerraty <sjg@crufty.net>
List: tech-pkg
Date: 09/04/2004 09:02:37
For those interested in being able to use py-imagingtk on 1.6, the
following may help.

The patch below results in a python binary that is linked against
libpthread.so as _well_ as libpth.so.  This is ugly to be sure, and
probably the reason for the --with-pth in the first place, (even
--without-pth doesn't stop it linking with libpth.so)

Anyway, linking against libpthread.so avoids the unresolved symbols
that otherwise result when _tkinter causes libtcl to be pulled in
which requires libpthread.

I'm not planning to commit this since I expect there's a better fix out
there (upgrading to 2.0 is a simple one ;-), but it may help others in
the meantime.

--sjg

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python23-pth/Makefile,v
retrieving revision 1.26
diff -u -p -r1.26 Makefile
--- Makefile	15 Jun 2004 14:26:34 -0000	1.26
+++ Makefile	4 Sep 2004 15:53:40 -0000
@@ -8,7 +8,7 @@ PKGNAME=	python23-pth-2.3.4
 PTHREAD_OPTS=   require
 .include "../../mk/pthread.buildlink3.mk"
 .if ${PTHREAD_TYPE} == "pth"
-CONFIGURE_ARGS+=	--with-pth
+CONFIGURE_ARGS+=	--with-threads
 .endif
 
 PY_VER_SUFFIX=	2p3