0

I can successfully install luasocket (https://github.com/diegonehab/luasocket) via luarocks, but I am having an issue with it working within a certain environment (https://dev.etlegacy.com/boards/2/topics/3388?r=3401).

As far as I can tell, there's some sort of architecture mismatch. I'm assuming this is because luarocks installs 64 bit modules on my OSX by default?

Is there a way to build luasocket specifically as 32 bit?

Thanks for the help. Here's the specific error output:

Lua API: G_LuaStartVM error running lua script: error loading module 'socket.core’ from file 'lualibs/lib/lua/5.3/socket/core.so’: dlopen(lualibs/lib/lua/5.3/socket/core.so, 6): no suitable image found. Did find: lualibs/lib/lua/5.3/socket/core.so: mach-o, but wrong architecture /Applications/ET Legacy/lualibs/lib/lua/5.3/socket/core.so: mach-o, but wrong architecture

1 Answers1

0

I'm not sure how to configure luarocks to do this, but I have luasocket compiled as universal binary for Lua 5.1, 5.2, and 5.3 in the ZeroBrane Studio repository (as clibsXX/socket/core.dylib files).

Paul Kulchenko
  • 25,884
  • 3
  • 38
  • 56
  • Is there a difference between the *.dylib and *.so? – Robert Sirois May 22 '18 at 06:48
  • In the repository I referenced .so is for Linux and and .dylib are for macOS. You will see that some macOS Lua libraries have .so extensions, but their content is not compatible with .so libraries for Linux. – Paul Kulchenko May 22 '18 at 16:23