Subject: Re: pkgsrc on Debian - no dlopen/dlerror/dlsym
To: None <michal@pasternak.w.lub.pl>
From: Yuji Yamano <yyamano@kt.rim.or.jp>
List: tech-pkg
Date: 09/10/2003 13:06:05
On Tue, 9 Sep 2003 05:01:19 +0200
Michal Pasternak <michal@pasternak.w.lub.pl> wrote:

> I am trying to get pkgsrc running on Debian-unstable; currently I have
> problems compiling programs, which use libslang - for example, jed
> compilation fails with:
> 
> /usr/pkgsrc/editors/jed/work/.buildlink/lib/libslang.so: undefined reference
> to `dlerror'
> /usr/pkgsrc/editors/jed/work/.buildlink/lib/libslang.so: undefined reference
> to `dlclose'
> /usr/pkgsrc/editors/jed/work/.buildlink/lib/libslang.so: undefined reference
> to `dlopen'
> /usr/pkgsrc/editors/jed/work/.buildlink/lib/libslang.so: undefined reference
> to `dlsym'

Could you try the following patch for pkgsrc/editors/jed/Makefile?
On redhat 9, it works for me. This is a quick fix and I think adding 
"AC_CHECK_LIB(dl, dlopen)" to configure.in is better than this.

--- Makefile.orig	2003-09-10 10:58:53.000000000 +0900
+++ Makefile	2003-09-10 10:58:57.000000000 +0900
@@ -7,6 +7,11 @@
 
 CONFLICTS=		xjed-[0-9]*
 
+.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} == "Linux"
+LDFLAGS+=	-ldl
+.endif
+
 CONFIGURE_ARGS+=	--without-X
 
 .include "../../mk/bsd.pkg.mk"

-- 
Yuji Yamano <yyamano@kt.rim.or.jp>