NetBSD Problem Report #31171

From www@netbsd.org  Tue Sep  6 16:44:16 2005
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
	id B55FE63B84E; Tue,  6 Sep 2005 16:44:16 +0000 (UTC)
Message-Id: <20050906164416.B55FE63B84E@narn.netbsd.org>
Date: Tue,  6 Sep 2005 16:44:16 +0000 (UTC)
From: mc0@databaar.ch
Reply-To: mc0@databaar.ch
To: gnats-bugs@netbsd.org
Subject: package lang/lua and its dependencies do not build
X-Send-Pr-Version: www-1.0

>Number:         31171
>Category:       pkg
>Synopsis:       package lang/lua and its dependencies do not build
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    rillig
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 06 16:45:00 +0000 2005
>Closed-Date:    Thu Jun 01 06:53:17 +0000 2006
>Last-Modified:  Thu Jun 01 06:55:01 +0000 2006
>Originator:     A L Meyers
>Release:        latest pkgsrc bootstrapped to Mandrake Linux i386 10.1
>Organization:
>Environment:
[alm@localhost pkgsrc]$ uname -a
Linux localhost.localdomain 2.6.8.1-12mdk #1 Fri Oct 1 12:53:41 CEST 2004 i686 AMD Athlon(tm) XP 2800+ unknown GNU/Linux
>Description:
===> Building for lua-5.0.2nb4
cd include; /usr/pkg/bin/bmake all
cd src; /usr/pkg/bin/bmake all
cd src/lib; /usr/pkg/bin/bmake all
cd src/luac; /usr/pkg/bin/bmake all
libtool  --mode=link gcc -o ../../bin/luac   -L/usr/pkg/gcc3/lib/gcc-lib/i386-mandrake-linux/3.3.5 -Wl,-R/usr/pkg/gcc3/lib/gcc-lib/i386-mandrake-linux/3.3.5 -L/usr/pkg/gcc3/lib -Wl,-R/usr/pkg/gcc3/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib  luac.o print.o lopcodes.o -L../../lib -llua -llualib -lm 
*** [buildlink3] Warning: libtool replaced -llua with ../../lib/liblua.la
*** [buildlink3] Warning: libtool replaced -llualib with ../../lib/liblualib.la
gcc -o ../../bin/.libs/luac -Wl,-R/usr/pkg/gcc3/lib/gcc-lib/i386-mandrake-linux/3.3.5 -Wl,-R/usr/pkg/gcc3/lib -Wl,-R/usr/pkg/lib luac.o print.o lopcodes.o  -L/usr/pkgsrc/lang/lua/work/.buildlink/gcc3/lib/gcc-lib/i386-mandrake-linux/3.3.5 -L/usr/pkgsrc/lang/lua/work/.buildlink/gcc3/lib -L/usr/pkgsrc/lang/lua/work/.buildlink/lib -L/usr/pkgsrc/lang/lua/work/lua-5.0.2/lib ../../lib/.libs/liblua.so ../../lib/.libs/liblualib.so -lm
../../lib/.libs/liblualib.so: undefined reference to `dlerror'
../../lib/.libs/liblualib.so: undefined reference to `dlclose'
../../lib/.libs/liblualib.so: undefined reference to `dlopen'
../../lib/.libs/liblualib.so: undefined reference to `dlsym'
collect2: ld returned 1 exit status

>How-To-Repeat:
do "make install clean" in lang/lua
>Fix:
none known

>Release-Note:

>Audit-Trail:
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/

State-Changed-From-To: open->closed
State-Changed-By: rillig@netbsd.org
State-Changed-When: Sat, 22 Oct 2005 14:42:06 +0000
State-Changed-Why:
Does this PR still apply?


State-Changed-From-To: closed->feedback
State-Changed-By: wiz@netbsd.org
State-Changed-When: Sat, 22 Oct 2005 15:19:14 +0000
State-Changed-Why:
rillig asked a question -> feedback


State-Changed-From-To: feedback->open
State-Changed-By: wiz@netbsd.org
State-Changed-When: Wed, 26 Oct 2005 16:58:58 +0000
State-Changed-Why:
Feedback supplied.


From: A L Meyers <me@privacy.net>
To: rillig@netbsd.org, wiz@netbsd.org
Cc: pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org,
	gnats-admin@netbsd.org
Subject: Re: pkg/31171
Date: Wed, 26 Oct 2005 16:55:43 +0200

 rillig@netbsd.org wrote:
 > Synopsis: package lang/lua and its dependencies do not build
 > 
 > State-Changed-From-To: open->closed
 > State-Changed-By: rillig@netbsd.org
 > State-Changed-When: Sat, 22 Oct 2005 14:42:06 +0000
 > State-Changed-Why:
 > Does this PR still apply?
 > 
 > 
 Yes it does in part.  lang/lua itself now builds and installs but
 its dependencies,
 e.g.:

 checking for lua-config... no
 checking for lua-config50... no
 checking for lua-config5.0... no
 checking for lua_setfenv in -llua... yes
 checking for luaopen_base in -llualib... no
 checking for luaopen_base in -llualib50... no
 checking for luaopen_base in -llualib5.0... no
 configure: error: *** Lualib5 is required.
              You can download lua from http://www.lua.org
 *** Error code 1

 Stop.
 bmake: stopped in /usr/pkgsrc/games/fillets-ng
 ===>
 ===> There was an error during the ``configure'' phase.
 ===> Please investigate the following for more information:
 ===>      * config.log
 ===>      * /usr/pkgsrc/games/fillets-ng/work/.work.log
 ===>
 *** Error code 1

 Stop.
 bmake: stopped in /usr/pkgsrc/games/fillets-ng
 *** Error code 1

 Stop.
 bmake: stopped in /usr/pkgsrc/games/fillets-ng

Responsible-Changed-From-To: pkg-manager->rillig
Responsible-Changed-By: rillig@netbsd.org
Responsible-Changed-When: Sat, 19 Nov 2005 14:44:24 +0000
Responsible-Changed-Why:
I'll take it.


From: Roland Illig <rillig@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/31171
Date: Sat, 19 Nov 2005 15:49:57 +0100

 Building games/fillet-ng works for me (on NetBSD 1.6.2). Can you please 
 retry?

 Roland

State-Changed-From-To: open->closed
State-Changed-By: rillig@netbsd.org
State-Changed-When: Thu, 02 Feb 2006 20:35:36 +0000
State-Changed-Why:
Feedback timeout.


From: A L Meyers <me@privacy.net>
To: gnats-bugs@netbsd.org
Cc: rillig@netbsd.org, pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org
Subject: Re: pkg/31171 (package lang/lua and its dependencies do not build)
Date: Sun, 05 Feb 2006 11:13:24 +0100

 Am Donnerstag, den 02.02.2006, 20:35 +0000 schrieb rillig@netbsd.org:
 > Synopsis: package lang/lua and its dependencies do not build
 > 
 > State-Changed-From-To: open->closed
 > State-Changed-By: rillig@netbsd.org
 > State-Changed-When: Thu, 02 Feb 2006 20:35:36 +0000
 > State-Changed-Why:
 > Feedback timeout.
 > 
 > 
 > 
 Hello,

 The issue was never resolved and the games depending on lua still do not
 work.

 Best regards,

 lux

State-Changed-From-To: closed->open
State-Changed-By: wiz@netbsd.org
State-Changed-When: Sun, 05 Feb 2006 11:41:53 +0000
State-Changed-Why:
Problem still there.


From: Roland Illig <rillig@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/31171 (package lang/lua and its dependencies do not build)
Date: Sun, 05 Feb 2006 15:46:27 +0100

 A L Meyers wrote:
 > Hello,
 > 
 > The issue was never resolved and the games depending on lua still do not
 > work.

 I'm currently trying to reproduce this PR using SuSE Linux. Let's see
 if it works. Otherwise I will install Mandriva 2006 locally.

 Roland

State-Changed-From-To: open->analyzed
State-Changed-By: rillig@netbsd.org
State-Changed-When: Mon, 06 Feb 2006 23:31:14 +0000
State-Changed-Why:
I could reproduce the build failure.

The relevant lines from the config.log file are:

liblualib.so: undefined reference to `dlerror'
liblualib.so: undefined reference to `dlclose'
liblualib.so: undefined reference to `dlopen'
liblualib.so: undefined reference to `dlsym'


State-Changed-From-To: analyzed->closed
State-Changed-By: rillig@netbsd.org
State-Changed-When: Thu, 01 Jun 2006 06:53:17 +0000
State-Changed-Why:
It works for me on SuSE Linux.


From: Roland Illig <rillig@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/31171 CVS commit: pkgsrc/lang/lua
Date: Thu,  1 Jun 2006 06:52:28 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	rillig
 Date:		Thu Jun  1 06:52:28 UTC 2006

 Modified Files:
 	pkgsrc/lang/lua: Makefile buildlink3.mk distinfo
 	pkgsrc/lang/lua/patches: patch-aa patch-ac patch-ad

 Log Message:
 On Linux, -ldl must be included into the libtool archive to make other
 packages work, for example games/fillet-ng. This fixes PR 31171.

 Bumped PKGREVISION.


 To generate a diff of this commit:
 cvs rdiff -r1.28 -r1.29 pkgsrc/lang/lua/Makefile
 cvs rdiff -r1.6 -r1.7 pkgsrc/lang/lua/buildlink3.mk
 cvs rdiff -r1.13 -r1.14 pkgsrc/lang/lua/distinfo
 cvs rdiff -r1.10 -r1.11 pkgsrc/lang/lua/patches/patch-aa
 cvs rdiff -r1.4 -r1.5 pkgsrc/lang/lua/patches/patch-ac \
     pkgsrc/lang/lua/patches/patch-ad

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.