pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/54797 (devel/lua-filesystem fails to buid due to missing lua link information)



The following reply was made to PR pkg/54797; it has been noted by GNATS.

From: Jonathan Buschmann <jonthn+pkgsrc%pinacea.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: fhajny%netbsd.org@localhost,
 pkg-manager%netbsd.org@localhost,
 pkgsrc-bugs%netbsd.org@localhost,
 gnats-admin%netbsd.org@localhost,
 "leot%netbsd.org@localhost" <leot%NetBSD.org@localhost>
Subject: Re: pkg/54797 (devel/lua-filesystem fails to buid due to missing lua
 link information)
Date: Tue, 31 Dec 2019 21:56:51 +0800

 Hello,
 
 Not sure if it=E2=80=99s the proper way to reply/follow-up on this =
 issue.
 But I found that in order to be able to use a Lua module such as this =
 one, it=E2=80=99s better not to link directly with the Lua library.
 Consequently if you can take into consideration this diff=20
 
 --- i/devel/lua-filesystem/patches/patch-config
 +++ w/devel/lua-filesystem/patches/patch-config
 @@ -15,7 +15,7 @@ Try to find lua libs from pkgconfig, so we get RPATH =
 specified.
  =20
   # System's libraries directory (where binary libraries are installed)
  -LUA_LIBDIR=3D $(PREFIX)/lib/lua/5.1
 -+LUA_LIBS=3D $(pkg-config --libs lua-$(LUA_VERS))
 ++LUA_LIBS=3D $(shell pkg-config --libs lua-$(LUA_VERS))
  +LUA_LIBDIR=3D $(DESTDIR)$(PREFIX)/$(LUA_CDIR)
  =20
   # Lua includes directory
 @@ -26,7 +26,7 @@ Try to find lua libs from pkgconfig, so we get RPATH =
 specified.
  -#LIB_OPTION=3D -bundle -undefined dynamic_lookup #for MacOS X
  +ifeq ($(shell uname -s 2>/dev/null), Darwin)
  +# for macOS
 -+LIB_OPTION+=3D -L$(PREFIX)/lib $(LUA_LIBS) -shared -install_name =
 $(PREFIX)/$(LUA_CDIR)/$(notdir $@)
 ++LIB_OPTION=3D -install_name $(PREFIX)/$(LUA_CDIR)/$(notdir $@) -shared =
 -undefined dynamic_lookup
  +else
  +# for Linux & other unix
  +LIB_OPTION+=3D -L$(PREFIX)/lib $(LUA_LIBS) -shared
 
 I suspect the LIB_OPTION for Unix (*BSD, Linux, ..) should not include =
 $(LUA_LIBS) but I don=E2=80=99t have a system to try this :(
 
 Basically in order to be sure that a module works it would be to do =
 something like this :
 
 luajit -e 'require =E2=80=9Clfs"';  lua5.1  -e 'require =E2=80=9Clfs=E2=80=
 =9D'
 
 If no output then it works.
 
 Thank you for your time
 
 > On 25 Dec 2019, at 16:34, leot%netbsd.org@localhost <leot%NetBSD.org@localhost> wrote:
 >=20
 > Synopsis: devel/lua-filesystem fails to buid due to missing lua link =
 information
 >=20
 > Responsible-Changed-From-To: pkg-manager->fhajny
 > Responsible-Changed-By: leot%NetBSD.org@localhost
 > Responsible-Changed-When: Wed, 25 Dec 2019 08:34:50 +0000
 > Responsible-Changed-Why:
 > Filip, can you please give it a look?
 > (over to MAINTAINER)
 >=20
 >=20
 >=20
 


Home | Main Index | Thread Index | Old Index