ymobe/rapanui

chrome host.

meapps opened this issue · 9 comments

Cant get the chrome host working with rapanui...

Moai samples are working.

Error:

Failed to load resource chrome-extension://iiapdmefondlanehgiegdbfgfagbccfl/socket.lua
Failed to load resource chrome-extension://iiapdmefondlanehgiegdbfgfagbccfl/usr/local/share/lua/5.1/socket.lua
Failed to load resource chrome-extension://iiapdmefondlanehgiegdbfgfagbccfl/usr/local/share/lua/5.1/socket/init.lua
Failed to load resource chrome-extension://iiapdmefondlanehgiegdbfgfagbccfl/usr/local/lib/lua/5.1/socket.lua
Failed to load resource chrome-extension://iiapdmefondlanehgiegdbfgfagbccfl/usr/local/lib/lua/5.1/socket/init.lua
Failed to load resource chrome-extension://iiapdmefondlanehgiegdbfgfagbccfl/socket.so
Failed to load resource chrome-extension://iiapdmefondlanehgiegdbfgfagbccfl/usr/local/lib/lua/5.1/socket.so
Failed to load resource chrome-extension://iiapdmefondlanehgiegdbfgfagbccfl/usr/local/lib/lua/5.1/loadall.so

Hi meapps,

at the moment we didn't test RapaNui with chrome.

Anyway it seems that in chrome lua socket.so lib is missing.

Test with pure moai and put this snippet in a Lua script:

require "socket"

print(socket.gettime())

probably you'll get the same error.

let me know.

The Moai samples are working without rapanui i get only the error in rapanui

did you test also the code above in chrome without rapanui?

thank you,
Stefano

i didnt need the code above everything was working fine the the sample from Moai

thank you meapps

The code above is just to confirm the problem is due to socket lib missing in the lua interpreter in chrome.

as far as I know the moai samples don't use luasocket for timing so no errors there.

I had the same problem on Linux in early releases of Moai, the script for building Moai on linux was missing the link to lua socket library, and so the resulting moai exceutable went in error when the socket.gettime() was called.

hth,
Stefano

socket calls are not allowed in NaCL thats the issue

how to fix it ?

At the moment we use Lua Socket in Rapanui.

If it's not allowed in NaCL we need to remove Lua Socket usage in our code, but we are using it for millisec scale timing.

regards,
Stefano

roar commented

Does this mean that I cannot use Rapanui if I want to build for chrome?