Subject: Re: when should mk/ be used? and chat/gaim
To: None <>
From: Jeremy C. Reed <>
List: tech-pkg
Date: 08/13/2005 14:42:12
On Sat, 13 Aug 2005, Todd Vierling wrote:

>> mk/ is not covered in the pkgsrc guide.
>> When should it be used?
> Whenever dlopen is used in the package.  For instance, packages that use
> devel/libltdl (a dlopen abstraction layer) indirectly include
> also.
>> /usr/lib/silc/ undefined reference to `dlerror'
>> /usr/lib/silc/ undefined reference to `dlclose'
>> /usr/lib/silc/ undefined reference to `dlopen'
>> /usr/lib/silc/ undefined reference to `dlsym'
> Then yes, is needed.  It's a no-op on platforms with
> dlopen in libc -- such as NetBSD.

I first tried with including it with the silc-toolkit before building and 
install it. Then I tried with chat/gaim. But neither worked.

Then I saw that patch-ad removes the -ldl from the configure script.


PTHREAD_CFLAGS=\ -pthread\  PTHREAD_LDFLAGS=\ -pthread 
PTHREAD_LIBS=-lpthread\ -lrt PTHREADBASE=/usr 

My libdl comes from pkgsrc installed glibc (my package). I don't have a file for it and I install to /usr. So I set 

I see mk/ has:

# No need to add this to BUILDLINK_LIBS.dl since most GNU configure
# scripts already check for -ldl themselves.
BUILDLINK_LDADD.dl=     -ldl

And the gaim configure script does check for libdl and also it does: 
pkg-config --libs "silcclient" which returns:

-L/usr/lib/silc -lsilcclient -ldl -lpthread -lsilc

I don't know why it doesn't use the above -ldl and I don't know why it 
doesn't use the -ldl is detected.

I will ask the gaim developers about this.

  Jeremy C. Reed

  	  	 	 BSD News, BSD tutorials, BSD links