[MacPorts] #27378: lua dlopen error @5.1.4

MacPorts noreply at macports.org
Thu Nov 18 23:20:53 PST 2010


#27378: lua dlopen error @5.1.4
-------------------------------------+--------------------------------------
 Reporter:  and.damore@…             |       Owner:  pmq@…           
     Type:  defect                   |      Status:  new             
 Priority:  Normal                   |   Milestone:                  
Component:  ports                    |     Version:  1.9.2           
 Keywords:  lua dlopen dyld malloc   |        Port:  lua             
-------------------------------------+--------------------------------------
 lua 5.1.4 use of DL_DYLD raises malloc error when loading lua packages,
 [http://code.google.com/p/luahpdf/issues/detail?id=1#makechanges cf. this
 issue] and [http://lua-users.org/lists/lua-l/2009-10/msg00102.html this
 one].

 lua should use POSIX dlopen rather than DL_DYLD, cf. point 2 of [http
 ://lua-users.org/lists/lua-l/2007-10/msg00748.html this message] and [http
 ://lua-users.org/lists/lua-l/2009-10/msg00145.html this solution].

 Also lua is building an ar archive rather than a Mach-O dylib.

 I'm attaching a patch from the message above, I used '''-install_name
 @executable_path/../lib/liblua5.1.dylib''' when linking lua executable to
 replace the explicit '''/usr/local/lib''', this should be fine with mp
 image activation.

 After rebuilding the port with attached patch, ''otool -L $(which lua)''
 correctly shows liblua while it didn't before and the modules I've tested
 are not having the malloc error anymore.

 Interesting enough lua50 has support for dylib, you may want to follow the
 existing patch way that only affects main ''Makefile''.

-- 
Ticket URL: <https://trac.macports.org/ticket/27378>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list