Bug 126207

Summary: Mk/bsd.lua.mk lang/lua - liblua 5.1 lib dependency missing
Product: Ports & Packages Reporter: Daniel Roethlisberger <daniel>
Component: Individual Port(s)Assignee: Alejandro Pulver <alepulver>
Status: Closed FIXED    
Severity: Affects Only Me CC: daniel
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Daniel Roethlisberger 2008-08-03 13:10:01 UTC
Since the commit to lang/lua on 2008-07-04 (port version 5.1.3_2), lang/lua
installs a shared library as ${PREFIX}/lib/lua51/liblua.so.1 along the
liblua.a.  This causes some ports previously linking to liblua statically, to
now link dynamically (example: security/nmap).  However, the component "lua"
is still marked as "build" dependency for lua 5.1 in bsd.lua.mk, resulting in
a missing run-time dependency on lang/lua.

The following is only a 5 minute analysis, and I am not too familiar with the
inner workings of the lua ports.  That is also the reason why I don't submit
a patch -- fixing this in the wrong way might break a lot of ports.

Since lang/lua (lua 5.1) installs the shared object using different naming and
versioning conventions than lang/lua50 and earlier, the logic implemented in
bsd.lua.mk breaks if I attempt to use dependency type "lib" with lua 5.1.  As
far as I can see, it attempts to find lua 5.1.1 and a shared library named
liblua-5.1.so.1.  There are different possible ways to fix this.  Either add
special casing to bsd.lua.mk to handle the different installation conventions
of lua 5.1, or fix lang/lua 5.1 to install the shared object in the same way
as the other lua ports do (AFAICS liblua-5.1.so.3 instead of liblua.so.1).

Since PR 121834 concerning lang/lua timed out on the current maintainer, I am
CC'ing to two committers which I think might/should be interested in this PR:
. araujo - committed lang/lua 5.1.3_2 which installs the .so
. alepulver - "maintainer" of bsd.lua.mk

Fix: 

Unsure, see analysis above.
How-To-Repeat: cd /usr/ports
cd security/nmap && make install clean && cd -
ldd `which nmap`          # note the liblua
pkg_delete lua-5.1.3_2    # does not know about the dependency from nmap
ldd `which nmap`          # note the missing liblua
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-08-03 13:10:12 UTC
Responsible Changed
From-To: freebsd-ports-bugs->alepulver

bsd.lua.mk is alepulver territory (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2008-08-10 20:29:52 UTC
alepulver    2008-08-10 19:29:43 UTC

  FreeBSD ports repository

  Modified files:
    Mk                   bsd.lua.mk 
    lang/lua             Makefile pkg-plist 
    lang/lua/files       patch-src-Makefile 
  Removed files:
    lang/lua/files       patch-Makefile 
  Log:
  - Merge patch-Makefile into patch-src-Makefile (both actually patch same file).
  - Patch lang/lua to behave as expected by the framework.
  - Add missing library dependency (only run before) when using lua 5.1.
  - Add notes in bsd.lua.mk for updating lang/lua* ports describing how they are
    integrated into the ports tree.
  
  PR:             ports/126207
  Submitted by:   Daniel Roethlisberger <daniel@roe.ch>
  
  Revision  Changes    Path
  1.18      +22 -2     ports/Mk/bsd.lua.mk
  1.33      +12 -7     ports/lang/lua/Makefile
  1.2       +0 -27     ports/lang/lua/files/patch-Makefile (dead)
  1.2       +22 -3     ports/lang/lua/files/patch-src-Makefile
  1.11      +3 -1      ports/lang/lua/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Alejandro Pulver freebsd_committer freebsd_triage 2008-08-10 20:30:29 UTC
State Changed
From-To: open->closed

Committed. Thanks!