Modify

Opened 9 years ago

Closed 9 years ago

Last modified 4 years ago

#4828 closed defect (fixed)

Problem with luasocket

Reported by: woakas@… Owned by: developers
Priority: high Milestone: Barrier Breaker 14.07
Component: packages Version:
Keywords: Cc:

Description

when execute lua -e "require 'socket'" has broken

root@OpenWrt:~# lua -e "require 'socket'"   
lua: /usr/lib/lua/socket.lua:13: module 'socket.core' not found:
        no field package.preload['socket.core']
        no file './socket/core.lua'
        no file '/usr/share/lua/socket/core.lua'
        no file '/usr/share/lua/socket/core/init.lua'
        no file '/usr/lib/lua/socket/core.lua'
        no file '/usr/lib/lua/socket/core/init.lua'
        no file './socket/core.so'
        no file '/usr/lib/lua/socket/core.so'
        no file '/usr/lib/lua/loadall.so'
        no file './socket.so'
        no file '/usr/lib/lua/socket.so'
        no file '/usr/lib/lua/loadall.so'
stack traceback:
        [C]: in function 'require'
        /usr/lib/lua/socket.lua:13: in main chunk
        [C]: in function 'require'
        (command line):1: in main chunk
        [C]: ?
root@OpenWrt:~# 

the patch:

Index: lang/luasocket/Makefile
===================================================================
--- lang/luasocket/Makefile     (revisión: 14954)
+++ lang/luasocket/Makefile     (copia de trabajo)
@@ -48,6 +48,10 @@
        $(INSTALL_DIR) $(1)/usr/lib/lua
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/mime.{so.1.0.2,lua} $(1)/usr/lib/lua
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/socket.{so.2.0.2,lua} $(1)/usr/lib/lua
+       mkdir -p $(1)/usr/lib/lua/mime
+       mkdir -p $(1)/usr/lib/lua/socket
+       ln -sf ../mime.so.1.0.2 $(1)/usr/lib/lua/mime/core.so
+       ln -sf ../socket.so.2.0.2 $(1)/usr/lib/lua/socket/core.so
 endef
 
 $(eval $(call BuildPackage,luasocket))

add about makefile from luasocket.

root@OpenWrt:~# lua -e "require 'socket'"
root@OpenWrt:~# 

Attachments (0)

Change History (2)

comment:1 Changed 9 years ago by florian

  • Resolution set to fixed
  • Status changed from new to closed

Applied in [15037], thanks !

comment:2 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.