Subject: Re: lossage guile-gtk, guile, pthreads
To: None <tech-pkg@netbsd.org>
From: Greg Troxel <gdt@ir.bbn.com>
List: tech-pkg
Date: 05/12/2004 18:07:56
That works (but I also had to add mk/pthread).
So this means that /usr/pkg/bin/guile and /usr/pkg/lib/libguile.so*
will be linked with pthread.so. So the following cases should be ok
run /usr/pkg/bin/guile, dynlink .so with pthread
run /usr/pkg/bin/guile, dynlink .so without pthread (since libc is
with pthread to start with?)
run some other program with pthread, and dynlink in libguile
but what about
compile some other program w/o pthreads, and use "guile-config link",
which doesn't have -pthread, to link in guile.
Index: Makefile
===================================================================
RCS file: /NETBSD-CVS/pkgsrc/lang/guile/Makefile,v
retrieving revision 1.52
diff -u -r1.52 Makefile
--- Makefile 3 May 2004 15:58:20 -0000 1.52
+++ Makefile 12 May 2004 22:00:16 -0000
@@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.52 2004/05/03 15:58:20 wiz Exp $
DISTNAME= guile-1.6.4
+PKGREVISION= 1
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GNU:=guile/}
@@ -22,7 +23,12 @@
TEST_DIRS= ${WRKSRC}
TEST_TARGET= check
+# Link the native thread so that Guile processes won't die when libpthread.so
+# is dl_open(3)'ed.
+CFLAGS+= ${PTHREAD_CFLAGS}
+
.include "../../devel/libtool/buildlink3.mk"
.include "../../devel/ncurses/buildlink3.mk"
.include "../../devel/readline/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"