-
Notifications
You must be signed in to change notification settings - Fork 82
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
Cannot run python in lua with python 2.7.13 #56
Comments
Where did you put the compiled |
Good question. I have been able to do some more digging, and I believe the issue is caused by differences between RTLD_NOW and RTLD_GLOBAL. See comment Gustavo Niemeyers comment
However this proofing difficult. If I get lua from homebrew, it comes pre-compiled and I can't modify loadlib.c. If I install lua from source I don't seem to get the correct lua dynanic libraries liblua.5.2.dylib Has anyone else succeeded with lunatic-python on a mac? |
No, Can you show the output of the CMake build? If building with CMake->gnu make, you can add |
In that case I am very confused. I have downloaded a copy of the repository zip and it correctly builds the two file lua-python.so and lua.so. At no stage is it building a python.sp Here is the code $gmake VERBOSE=1 install |
Can you run |
For macosx the command is The output is:
|
The second error message, it could be related to this maybe http://stackoverflow.com/questions/35006614/what-does-symbol-not-found-expected-in-flat-namespace-actually-mean. I don't have an Mac OSX to test this on so not sure how much help I can provide. |
Hey! I have the same issue. Next I go to test and get the error Well, set LUA_CPATH as I see libs copied to site-packages Weee new issue:) What does it mean? Is "lua-python.so" the right lib to use in lua scripts? Why it is installed in python2.7/site-packages ? Thanks in advance! |
将编译好的lua-python.so改名成python.so,放到/usr/lib64/lua/5.1/python.so即可 |
@cross10 could you repeat that in English? |
Change the compiled lua-python.so to python.so, and put it in /usr/lib64/lua/5.1/python.so |
I am having a similar issue. I am working on MacOsX with python 2.7.13 and Lua 5.2.
I am trying to call python from within lua.
If I try
py = require 'python'
I get the error:
no field package.preload['python']
no file '/Users/name/dgdinst/lib/python.lua'
no file '/Users/name/dgdinst/lib/python.so'
Similarly when I try
py = require 'lua-python'
I get the error message:
dlopen(/Users/TOM/name/lib/lua-python.so, 2): Symbol not found: _PyCFunction_Type
Referenced from: /Users/name/dgdinst/lib/lua-python.so
Expected in: flat namespace
in /Users/name/dgdinst/lib/lua-python.so
Any suggestions?
Thanks
The text was updated successfully, but these errors were encountered: