Subject: Use of mk/dlopen.buildlink3.mk?
To: NetBSD Packages Technical Discussion List <tech-pkg@netbsd.org>
From: Georg Schwarz <georg.schwarz@freenet.de>
List: tech-pkg
Date: 05/14/2006 09:33:09
I'm working on a package (wip/sipp) which has NO_CONFIGURE=yes.
It also features .include "../../mk/dlopen.buildlink3.mk"

In the package's static Makefile I have:

CFLAGS+=        ${DL_CFLAGS}
LDFLAGS+=       ${PTHREAD_LDFLAGS} ${DL_LDFLAGS}
LIBS.SunOS=     -lnsl -lsocket
LIBS+=          -lncurses ${PTHREAD_LIBS} ${LIBS.${OPSYS}} ${DL_LIBS}




Nevertheless on Linux I get:

...
g++ -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/local/pkg/lib  -pthread   -o  
sipp xp_parser.o scenario.o screen.o call.o comp.o sipp.o stat.o  
actions.o variables.o  -lncurses -lpthread -lrt
comp.o(.text+0x16): In function `comp_load':
: undefined reference to `dlopen'
....

so no -ldl. Why are the DL_* variables not set correctly?

Additional question: since ../../devel/ncurses/buildlink3.mk is also  
included in the pkgsrc Makefile could and should -lncurses be  
replaced by some appropriate variable?

-- 
Georg Schwarz    http://home.pages.de/~schwarz/
georg.schwarz@freenet.de  +49 178 8545053