Subject: Re: pkg/31171: package lang/lua and its dependencies do not build
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Jeremy C. Reed <reed@reedmedia.net>
List: pkgsrc-bugs
Date: 09/06/2005 17:42:02
The following reply was made to PR pkg/31171; it has been noted by GNATS.

From: "Jeremy C. Reed" <reed@reedmedia.net>
To: gnats-bugs@netbsd.org
Cc: mc0@databaar.ch, pkgsrc@bjan.freeshell.org
Subject: Re: pkg/31171: package lang/lua and its dependencies do not build
Date: Tue, 6 Sep 2005 10:41:53 -0700 (PDT)

 > ../../lib/.libs/liblualib.so: undefined reference to `dlsym'
 
 The following works for me. (I tested and I had same problem with Linux.)
 This sets DLLIB to what the mk/dlopen.builtin.mk defines and also patch-aa 
 comments out the setting of DLLIB to nothing.
 
 (The patch-aa was made with diff -u and is different.)
 
 Bruce: may I commit this?
 
 cvs diff: Diffing lang/lua
 Index: lang/lua/Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/lang/lua/Makefile,v
 retrieving revision 1.25
 diff -b -u -r1.25 Makefile
 --- lang/lua/Makefile	4 Sep 2005 04:59:36 -0000	1.25
 +++ lang/lua/Makefile	6 Sep 2005 17:32:01 -0000
 @@ -32,6 +32,7 @@
   EGDIR=		${PREFIX}/share/examples/lua
 
   .include "../../mk/dlopen.buildlink3.mk"
 +MAKE_ENV+=	DLLIB=${BUILDLINK_LDADD.dl}
 
   post-build:
   	cd ${WRKSRC}/etc && ${SETENV} ${MAKE_ENV} ${MAKE} bin2c
 Index: lang/lua/distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/lang/lua/distinfo,v
 retrieving revision 1.12
 diff -b -u -r1.12 distinfo
 --- lang/lua/distinfo	4 Sep 2005 04:59:36 -0000	1.12
 +++ lang/lua/distinfo	6 Sep 2005 17:32:01 -0000
 @@ -3,7 +3,7 @@
   SHA1 (lua-5.0.2.tar.gz) = a200cfd20a9a4c7da1206ae45dddf26186a9e0e7
   RMD160 (lua-5.0.2.tar.gz) = 5f1a1cf5802e38b3c4dcfc9f3cd0dc33bfdc0a30
   Size (lua-5.0.2.tar.gz) = 190442 bytes
 -SHA1 (patch-aa) = 510d19518331e8290bbec95d3f18ca746dbb0d2e
 +SHA1 (patch-aa) = 9465754c22ab87131c3f95f53063c4defcf2241f
   SHA1 (patch-ab) = 983d0ea51adf08188830b163075e13f331bb4c8a
   SHA1 (patch-ac) = 3f5a63251b1386969d583aeea167131567966e6e
   SHA1 (patch-ad) = b9ab79c9b1098d6b74a025ac986a5e26ef2111ec
 cvs diff: Diffing lang/lua/patches
 Index: lang/lua/patches/patch-aa
 ===================================================================
 RCS file: /cvsroot/pkgsrc/lang/lua/patches/patch-aa,v
 retrieving revision 1.9
 diff -b -u -r1.9 patch-aa
 --- lang/lua/patches/patch-aa	4 Sep 2005 04:59:36 -0000	1.9
 +++ lang/lua/patches/patch-aa	6 Sep 2005 17:32:02 -0000
 @@ -1,8 +1,17 @@
 -$NetBSD: patch-aa,v 1.9 2005/09/04 04:59:36 jlam Exp $
 +$NetBSD$
 
 ---- config.orig	Fri Apr 11 14:00:41 2003
 -+++ config
 -@@ -25,7 +25,7 @@ USERCONF=
 +--- config.orig	2003-04-11 14:00:41.000000000 +0000
 ++++ config	2005-09-06 17:19:27.292544672 +0000
 +@@ -4,7 +4,7 @@
 + # These are default values. Skip this section and see the explanations below.
 + 
 + LOADLIB=
 +-DLLIB=
 ++#DLLIB=
 + NUMBER=
 + POPEN=
 + TMPNAM=
 +@@ -25,7 +25,7 @@
    # interface (e.g., Linux, Solaris, IRIX, BSD, AIX, HPUX, and probably others),
    # uncomment the next two lines.
    #
 @@ -11,7 +20,7 @@
    #DLLIB= -ldl
    #
    # In Linux with gcc, you should also uncomment the next definition for
 -@@ -45,7 +45,7 @@ USERCONF=
 +@@ -45,7 +45,7 @@
    # If your system is not POSIX but has popen and pclose, define USE_POPEN=1.
    # If you don't want to support pipes, define USE_POPEN=0.
    #
 @@ -20,7 +29,7 @@
    #POPEN= -DUSE_POPEN=0
    #
    # The form below will probably work in (some) Windows systems.
 -@@ -108,8 +108,8 @@ EXTRA_LIBS= -lm
 +@@ -108,8 +108,8 @@
    # You need an ANSI C compiler. gcc is a popular one. We do not use -ansi in
    # WARN because it disables POSIX features used in the libraries.
    #
 @@ -31,7 +40,7 @@
 
    # ------------------------------------------------------------------ C options
 
 -@@ -119,7 +119,7 @@ WARN= -Wall
 +@@ -119,7 +119,7 @@
    # debug information. If you only want the shared libraries, you may want to
    # add -fPIC to MYCFLAGS.
    #
 @@ -40,7 +49,7 @@
    #MYCFLAGS= -O3 -fomit-frame-pointer # -fPIC
 
    # Write here any options you may need for your C linker.
 -@@ -148,7 +148,7 @@ STRIP= strip
 +@@ -148,7 +148,7 @@
 
    # Locations for "make install". You may need to be root do "make install".
    #
 @@ -49,7 +58,7 @@
    INSTALL_BIN= $(INSTALL_ROOT)/bin
    INSTALL_INC= $(INSTALL_ROOT)/include
    INSTALL_LIB= $(INSTALL_ROOT)/lib
 -@@ -165,6 +165,7 @@ INSTALL_DATA= cp
 +@@ -165,6 +165,7 @@
    # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
 
    V=5.0
 @@ -57,15 +66,15 @@
 
    BIN= $(LUA)/bin
    INC= $(LUA)/include
 -@@ -173,6 +174,11 @@ LIB= $(LUA)/lib
 +@@ -173,6 +174,11 @@
    INCS= -I$(INC) $(EXTRA_INCS)
    DEFS= $(NUMBER) $(EXTRA_DEFS)
 
   +CCLD= $(LIBTOOL) --mode=link $(CC)
    CFLAGS= $(MYCFLAGS) $(WARN) $(INCS) $(DEFS)
 -+
 +
   +.SUFFIXES:	.lo
   +.c.lo:
   +	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $<
 - 
 ++
    # (end of config)
 
   Jeremy C. Reed
 
   	  	 	 technical support & remote administration
  	  	 	 http://www.pugetsoundtechnology.com/