-
-
Notifications
You must be signed in to change notification settings - Fork 621
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
Lua 5.3 support #116
Comments
That looks like a library linking issue. You need to modify cmake/ConkyPlatformChecks.cmake for this. This seems to work for me: diff -aur old/cmake/ConkyPlatformChecks.cmake new/cmake/ConkyPlatformChecks.cmake
--- old/cmake/ConkyPlatformChecks.cmake 2015-04-27 03:53:15.546870016 -0400
+++ new/cmake/ConkyPlatformChecks.cmake 2015-04-27 03:53:45.039446214 -0400
@@ -249,7 +249,7 @@ if(BUILD_X11)
endif(X11_FOUND)
endif(BUILD_X11)
-pkg_search_module(LUA REQUIRED lua5.2 lua-5.2 lua>=5.1 lua5.1 lua-5.1)
+pkg_search_module(LUA REQUIRED lua5.3 lua-5.3 lua5.2 lua-5.2 lua>=5.1 lua5.1 lua-5.1)
set(conky_libs ${conky_libs} ${LUA_LIBRARIES})
set(conky_includes ${conky_includes} ${LUA_INCLUDE_DIRS})
link_directories(${LUA_LIBRARY_DIRS}) |
Still doesn't seem to compile for me, i get the exact same error. I also had to add lua>=5.3 since i use 5.3.1. On a side note, shouldn't lua>=5.2 be added to the list as wel? Edit: Seems like the tolua++ lib would need an upgrade and is no longer maintained; and Lua won't provide the C/C++ bindings themselves. So i guess we can compile Conky with lua 5.3.1 but won't be able to use the cairo, imlib or rsvg build flags? Feel free to correct me if i'm wrong. |
Ahh, I don't use those. Try with luajit instead (will need to adjust the search path)? |
LuaJit uses 5.1 and has 5.2 compatibility (not that great i hear, no experience myself though) but not 5.3 so i guess that's why it runs if you use LuaJit? I must note i'm far from an expert on the matter, so my information might be incomplete. The reason i'm asking for Lua 5.3 support (with the bindings) in the first place is because i've ported a C lib to work with Lua 5.3 which will be called in a Lua script called by Conky and i want people to be able to use it out of the box (uses cairo). But it seems by best bet will be to remake the bindings for Lua 5.1 and let Conky execute it's lua scripts in 5.1 and just hope most default repositories will do the same? For the record building rsvg gives warnings (just thought i would mention it):
Found this, might given alternatives for tolua++: http://lua-users.org/wiki/BindingCodeToLua |
I encountered this same issue, after the latest update to Conky, and have a fix, if you're willing to compile tolua++ (AKA, toluapp) from source. BTW, I'm also rolling in imlib2 and rsvg, as well as xdbe and xshape. A fix for this is simply to compile both tolua++ AND Conky against lua5.1 ONLY. (Side note: I also compile tolua from source, but it compiles just fine agains lua 5.3.x) I'm not sure if we'd be missing out on something, by not compiling Conky against a newer version... better performance, maybe? My Conky install doesn't appear to use many resources. (Admittedly, I skip most of the application and network-centric configuration options- they're old, sometimes difficult to support, and I write my own in POSIX, then make calls to them in my Lua code, which provides MUCH greater customization). That said, if there are real advantages to building it against a new version of Lua, which don't introduce headaches, I'm all ears! This project, in order to provide langauge bindings, for output to Cairo, relies on two others, one which hasn't been updated in two years, another which hasn't seen an update in at least three (with most of the code sitting at five) and, as mentioned, won't even compile against a modern version of Lua. Depending on whether or not tolua and tolua++ are used by projects, outside of Conky, which are popular enough to make the work worthwhile, tolua and tolua++ may as well be considered abandonware. This tells us there's probably quite a bit of work to be done (the refactoring and replacement of a LOT of outdated code), because Conky needs to integrate another means of talking to Cairo. TL;DR: |
This morning, I successfully compiled conky with I had to make the following changes to
|
Fantastic - that worked :) |
I forgot to mention that I also had to force conky to compile against Lua 5.1 in order to actually use the bindings and avoid segfaults. Thanks @antonio-malcolm for the wiki page you wrote. |
@marcpayne Not a problem! Likewise, thanks for mentioning the the update to ConkyPlatformChecks.cmake. I hadn't noticed the issue, until I attempted updating the Void repos; without the edit, conky and toluapp compile, by hand, and run fine, with everything installed under /usr/local, but the conky compile breaks, otherwise. Strange stuff. EDIT: Looks like ConkyPlatformChecks.cmake was updated just two days ago. That explains why my previous build was working. Forked the repo, applied the fix, and made a pull request. |
The cairo/imlib2/rsvg bindings require tolua++ [1], which is currently only compatible with Lua 5.1 or earlier. We need to force Conky to compile against Lua 5.1 if the user chooses to build the bindings. See [2] and [3] for some discussion on this topic. This commit adds a separate pkg_search_module command specifically for Lua 5.1, along with a note in the documentation. The original pkg_search_module command was updated to include (and prefer) Lua 5.3+. Also, I threw in two other minor random fixes to the docs while I was at it. [1] https://github.com/LuaDist/toluapp [2] brndnmtthws#116 [3] brndnmtthws#174
Just looking at the link referenced by Nooby4Ever (http://lua-users.org/wiki/BindingCodeToLua) -- I'm not exactly a LUA or C/C++ programmer so I can't answer this for myself, but if there are parts of tolua++ that are essential to Conky we must then look to see if one of the alternative C++ "Automatic binding generators" could be used in it's place ... right? |
From building and running them together, my understanding is that tolua++ (A.K.A. toluapp), which normally uses lua5.1, will use tolua, if it's available, which, in-turn, uses lua5.2. This all sounds counterintuitive, unitl one realizes, somewhere along the way, tolua was updated to use lua5.2, and tolua++ was not. Conky will not have lua binding without tolua++. It would be great if the maintainers would update both tolua and tolua++, to keep them current, or if someone with the bandwidth would fork them. I would certainly do it, if I had the time. Maybe, once I get one or two projects I've been working on, already, out the door... |
Hi everybody. Where do we stand here today? Keep this open or close? |
On Arch Linux have a look at this link my AUR packages We need to patch conky and tolua++. These patches have their origin in the Fedora project - I found during testing conkywx that Fedora was using lua 5.3 ... |
With this change, support for Lua 5.1 is dropped. This resolve #116.
With this change, support for Lua 5.1 is dropped. This resolve #116.
With this change, support for Lua 5.1 is dropped. This resolve #116.
With this change, support for Lua 5.1 is dropped. This resolve #116.
With this change, support for Lua 5.1 is dropped. This resolve #116.
With this change, support for Lua 5.1 is dropped. This resolve #116.
With this change, support for Lua 5.1 is dropped. This resolve #116.
With this change, support for Lua 5.1 is dropped. This resolve #116.
Is there a specific reason why there is no native Lua 5.3(.1) support in Conky?
In the arch repositories there is currently a patch to make conky compile with Lua 5.3(.1) but this does not work when enabling the Conky Lua bindings: cairo, imlib2 and rsvg. (I assume they need to be updated)
The patch to get Conky 1.10 to compile with Lua 5.3(.1) (no Conky Lua bindings): https://projects.archlinux.org/svntogit/packages.git/tree/trunk/lua53.patch?h=packages/conky
Edit: The Lua 5.3 patch was actually already posted here: #90 and here #100
The error i get while trying to compile Conky 1.10 (with the Lua patch, and some others) and Lua 5.3.1 with the Conky Lua bindings cairo, imlib2 and rsvg enabled:
Maybe i should have posted this in the arch repository but i figured it would be better if Conky was patched for Lua 5.3 for everyone instead of just the arch repositories.
The text was updated successfully, but these errors were encountered: