Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LuaSocket on Unix #75

Closed
3000Lane opened this issue Aug 22, 2013 · 28 comments
Closed

LuaSocket on Unix #75

3000Lane opened this issue Aug 22, 2013 · 28 comments

Comments

@3000Lane
Copy link

Hello, i try to use LuaSocket on unix but i can`t compile it. I become this error.

http://pastebin.com/ZhEceS9g

can you pls help me =/

@Kelet
Copy link

Kelet commented Aug 23, 2013

You probably need to specify the platform and maybe some directories. See:
https://github.com/diegonehab/luasocket/blob/master/linux.cmd

@3000Lane
Copy link
Author

i can now compile it, i most only remove the wsocket.c form the folder but now i have a other error >.<

http://pastebin.com/R7aqnJJJ

and i dont know where i become this files...

@sam-github
Copy link
Contributor

You are using cmake, luasocket doesn't have cmake support, so I don't think you are using luasocket, not the luasocket that can be downloaded here, anyhow. You should talk to whoever gave you luasocket, or use the version of luasocket from Diego.

@3000Lane
Copy link
Author

I use the current version of Luasocket from here. And i use LuaSocket in a LuaEngine ( https://github.com/ElunaLuaEngine/Source/tree/master/dep/lualib ). Now i need only the the listed files in the error =/

@sam-github
Copy link
Contributor

You should report this bug to the ElunaLuaEngine project, since it's their luasocket that you can't build, with their build system.

The files listed in your error either were not built (by their cmake files), or not installed (by their cmake files).

@ghost
Copy link

ghost commented Aug 26, 2013

LuaSocket is not a part of our project, it is something the above user wants to add to our existing source as a 3rd party extension. Thus we can't really offer any support for it either, as it's not a planned implementation from our side at least.

@Easelm
Copy link

Easelm commented Aug 26, 2013

How is LuaSocket Eluna's? We have nothing to do with it. It isn't our problem, it is LuaSocket staff's problem..

@Florob
Copy link
Contributor

Florob commented Aug 26, 2013

@ElunaLuaEngine @Easelm Sorry, to be harsh, but could you try and be a bit less ignorant?
a) LuaSocket has not "staff", it mostly has voluntary contributors
b) @3000Lane doesn't have a problem with LuaSocket's code, or LuaSocket's build system. He has a problem with a build system that only exists in the ElunaLuaEngine's repository. Why would it be LuaSocket's responsibility to support that?

@ghost
Copy link

ghost commented Aug 26, 2013

The engine compiles perfectly fine without his 3rd party changes and additions, in this case luasocket. As we don't provide luasocket natively with our source, it is not something we can or will support ourselves, as we have other issues that take presidency that has to do with our own code. I'm not saying it's your responsibility, but we can't take responsibility for it either, thus it's up to the user to figure this one out himself unfortunately. If we had luasocket implemented with our source natively, we'd definitely help him out with it.

@3000Lane
Copy link
Author

emm...ok i need only the files. i can compile the source and all i need only:
no file '/usr/local/share/lua/5.2/socket/core.lua'
no file '/usr/local/share/lua/5.2/socket/core/init.lua'
no file '/usr/local/lib/lua/5.2/socket/core.lua'
no file '/usr/local/lib/lua/5.2/socket/core/init.lua'
no file './socket/core.lua'
no file '/usr/local/lib/lua/5.2/socket/core.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './socket/core.so'
no file '/usr/local/lib/lua/5.2/socket.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './socket.so'

more not :)

@moteus
Copy link
Contributor

moteus commented Aug 26, 2013

After make you should have mime/core.so and socket/core.so somewhere in you luasocket dir.
Then you should this file into LUA_CPATH dir. Also you should copy all src/*.lua files into LUA_PATH dir.
May be this task can do make install i do not know. I work on windows.

@3000Lane
Copy link
Author

@moteus Thx for your help, i need now only one file :)

Eluna Nova::Error loading scripts/luasocket.lua.
error loading module 'socket.core' from file '/usr/local/lib/lua/5.2/socket/core.so':
dynamic libraries not enabled; check your Lua installation
Eluna Nova::Loaded 9 Lua scripts

@moteus
Copy link
Contributor

moteus commented Aug 26, 2013

there no file luasocket.lua in luasocket project. may be you need socket.lua. and in lua you write socket =require"socket"

@3000Lane
Copy link
Author

Source of luasocket.lua

socket = require("socket")
print(socket._VERSION)

@3000Lane
Copy link
Author

i think the problem is the load of dynamic libraries are not enabled =(

@moteus
Copy link
Contributor

moteus commented Aug 26, 2013

dynamic libraries not enabled; check your Lua installation Eluna Nova::Loaded 9 Lua scripts
I think this is @ElunaLuaEngine related problem. may be they have config option for that.

@3000Lane
Copy link
Author

i place now the socket.lua in the folder and become the self error:

Eluna Nova::Error loading scripts/luasocket.lua.
error loading module 'socket.core' from file '/usr/local/lib/lua/5.2/socket/core.so':
dynamic libraries not enabled; check your Lua installation
Eluna Nova::Error loading scripts/socket.lua.
error loading module 'socket.core' from file '/usr/local/lib/lua/5.2/socket/core.so':
dynamic libraries not enabled; check your Lua installation

And yes i think its only a config problem, but thank you very much @moteus =)

@ghost
Copy link

ghost commented Aug 26, 2013

You can enable dynamic loading of libraries in luaconf.h

@Easelm
Copy link

Easelm commented Aug 26, 2013

@ Florob: Could you be a little less ignorant? If LuaSocket "mostly" has voluntary contributors then that is technically considered as staff. He could ask anyone who contributed to fix his errors for him.

@3000Lane
Copy link
Author

@ElunaLuaEngine how i can change it, i dont found the config >.<

@sam-github
Copy link
Contributor

Folks, maybe we can turn the heat down a little, this is a public forum where comments are visible to the world.

@ElunaLuaEngine, the original bug report was pretty vague, it was pretty clear luasocket's build system wasn't being used (so not a luasocket bug), but only an eluna user like yourself could have known that that it was @3000Lane who'd added luasocket.

Anyhow, at this point its pretty clear this isn't a "bug" at all, just a gitub issue being used to get advice on how to integrate luasocket into eluna. Which is fine, I guess, if @diegonehab is happy to have his issue tracker used for that :-). Seems the eluna or lua list would be more appropriate.

@diegonehab
Copy link
Contributor

No need to fight over this. :) Here is what I think about the situation.

The LuaSocket maintainers have no interest in understanding the details of eluna. The eluna maintainers also don't care much about LuaSocket.

The extent of my interest in this (altruism aside) is as follows. If eluna is capable of loading Lua modules, then it should be able to load LuaSocket.

This file

https://raw.github.com/diegonehab/luasocket/master/doc/installation.html

explains how to install LuaSocket in a typical Lua distribution. Besides the Lua headers, the only files needed to build LuaSocket are provided in the distribution.

So, if an eluna user can build and install other modules but not LuaSocket, you have our attention. If he/she cannot build other modules, then I think it is unfair to expect us to figure this out for them.

Kind regards,
Diego

@ghost
Copy link

ghost commented Aug 26, 2013

@sam-github I'm sorry if I came across as anything but neutral, was definitely not the purpose of my comments. The reason why I said anything at all was due to the vagueness of the user's report, so I figured I'd try to clarify that the user was trying to add modules not supported by us natively.

@diegonehab It's in no way, shape or form expected that any of you try to figure this out for the user. I'll try saying it without sounding too cynical, but this is something the said user has to figure out for himself, as it's neither yours nor our responsibility to support the user on this matter. LuaSocket is not something we intend to support and/or include, nor do we intend to support and/or include any 3rd party modules for that matter.

As stated earlier as well, this is not something we (contributors) of Eluna will nor can spend any time on, as we have other more pressing matters when it comes to debugging and optimizing what we already have.

I would still like to thank you for taking your time to point @3000Lane in the right direction, hopefully the information you provided can help him/her to figure it out!

@3000Lane
Copy link
Author

Thx @ALL :) i must now only know how i enable dynamic libraries load in the luaconf.h. if you can say me that im happy 👍

@moteus
Copy link
Contributor

moteus commented Aug 27, 2013

luaconf.h is part or Lua.
When you compile Lua you can change some variables in this file.
And after compiling this file describe your Lua options.
So you need change luaconf.h and rebuild/reinstall Lua.

@3000Lane
Copy link
Author

yes i know. but what i most change in the luaconf.h i have a lot of var`s but i dont found anything with dynamic lib load =(

luaconf.h : http://pastebin.com/0KW4SnjC

@moteus
Copy link
Contributor

moteus commented Aug 27, 2013

May be it is LUA_USE_DLOPEN
Lua 5.2
Lua 5.1

@3000Lane
Copy link
Author

good, i have "#define LUA_USE_DLOPEN" in the luaconf.h but its not work and i dont know i compile it with the parameter -ldl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

7 participants