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)



Hello,

Not sure if it’s 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’s better not to link directly with the Lua library.
Consequently if you can take into consideration this diff 

--- 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.
  
  # System's libraries directory (where binary libraries are installed)
 -LUA_LIBDIR= $(PREFIX)/lib/lua/5.1
-+LUA_LIBS= $(pkg-config --libs lua-$(LUA_VERS))
++LUA_LIBS= $(shell pkg-config --libs lua-$(LUA_VERS))
 +LUA_LIBDIR= $(DESTDIR)$(PREFIX)/$(LUA_CDIR)
  
  # Lua includes directory
@@ -26,7 +26,7 @@ Try to find lua libs from pkgconfig, so we get RPATH specified.
 -#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X
 +ifeq ($(shell uname -s 2>/dev/null), Darwin)
 +# for macOS
-+LIB_OPTION+= -L$(PREFIX)/lib $(LUA_LIBS) -shared -install_name $(PREFIX)/$(LUA_CDIR)/$(notdir $@)
++LIB_OPTION= -install_name $(PREFIX)/$(LUA_CDIR)/$(notdir $@) -shared -undefined dynamic_lookup
 +else
 +# for Linux & other unix
 +LIB_OPTION+= -L$(PREFIX)/lib $(LUA_LIBS) -shared

I suspect the LIB_OPTION for Unix (*BSD, Linux, ..) should not include $(LUA_LIBS) but I don’t 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 “lfs"';  lua5.1  -e 'require “lfs”'

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:
> 
> Synopsis: devel/lua-filesystem fails to buid due to missing lua link information
> 
> 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)
> 
> 
> 



Home | Main Index | Thread Index | Old Index