-
-
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
[Bug]: llua_do_call: function conky_main execution failed: #1867
Comments
For this to work, you need to enable the cmake .. -G Ninja -DBUILD_X11=ON -DBUILD_LUA_CAIRO=ON -DBUILD_LUA_CAIRO_XLIB=ON |
Gentoo USE flags aready enabled, but not working. Previous version (1.19.8) has exact same flags, and working correctly. Rolled back for now, all okay, but would like a fix. |
I don't see Paging @billie80 |
Is this a new flag requirement compared to the previous version (1.19.8), if not, the flag is not in the ebuild either but works fine. If so, should I notify the gentoo team? |
It's new, yes, introduced in #1844 as part of the effort to improve Wayland support. |
@brndnmtthws Thanks for letting me know. This might slipped through when adding the new version. I already took a closer look at it yesterday after the version bump because there is a Gentoo Bug (https://bugs.gentoo.org/show_bug.cgi?id=930823) which might be related to this changes. In the build log I see that lua_cairo is disabled in the configure options but obviously there is nothing about lua_cairo_xlib. However later it says "Cairo Xlib Lua bindings require Cairo and X11; setting to 'false'."Again later it checks for the module cairo which it finds. In the end the build fails because cairo.h is missing. So even if the ebuild does not control lua_cairo_xlib conky itself disables it due to the cmake settings. So I wonder why it is still looking for cairo. I am not sure if everything is due to the ebuild not covering the new flag. Nevertheless the ebuild could do better with regard to X11 and Wayland support. I have to come up with something to improve this. |
@belrus65 Can you please add your build log here? |
@billie80 Sorry for the delay, here is my build log. (Strangely, did not noticed any errors during the build cycle) build.log: �[32m * �[39;49;00mPackage: app-admin/conky-1.20.2:0
-- Configuring done (2.8s)
�[32m�[0m Final size of build directory: 14368 KiB (14.0 MiB) strip: x86_64-pc-linux-gnu-strip --strip-unneeded -N gentoo_check_ldflags -R .comment -R .GCC.command.line -R .note.gnu.gold-version
|
@billie80 Here is the version info I get after installation: conky --version Compiled in features: System config file: /etc/conky/conky.conf General:
Lua bindings:
Default values:
|
Unrelated, but that email is a bit out of date, not something I have access to anymore FWIW. |
I'll have to check the behaviour again, but it's possible that it was changed to only print a warning instead of failing the build when the dependencies are missing. I'll try to fix this up and restore the old behaviour (i.e., the build should fail if you enable a feature and a dependency is missing). |
Which contact address should I use instead? I can also remove it completely if you prefer!
Don't know if this is the case here but it would be worse if if e.g. cairo support is disabled in build options but it is still tried to link against cairo if it is present on the system.
Are the following assumptions correct? In the Gentoo build log BUILD_LUA_CAIRO is false thus BUILD_LUA_CAIRO_XLIB is also set to false. In the build log from @belrus65 BUILD_LUA_CAIRO is true thus BUILD_LUA_CAIRO_XLIB should also be true even if it is not specified explicitly. Here I don't understand why there the lua problem mentioned happen because libcairo.so and libcairo_xlib.so are installed as can be seen in his log. |
I am not sure if this is only related to the ebuild not dealing with the new BUILD_LUA_CAIRO_XLIB build option so this probably wont help. It would be great if you could try this version anyway. |
Hm, probably the error from the Gentoo bug is related to the imlib2 changes from #1844 in lua/CMakeLists.txt? Even if cairo and cairo-xlib are disabled the libcairo_imlib2_helper still requires cairo. If cairo is not installed it fails because cairo.h is not present. If cairo is present it does not fail because the header is available which sounds like the above mentioned automagic behaviour. |
Looks like it! #1873 |
|
Still why does calling cairo_xlib_surface_create fail if BUILD_GUI (X11), BUILD_LUA_CAIRO and BUILD_LUA_CAIRO_XLIB is true like for @belrus65? Or is this also related to the cairo_imlib2_helper fix? |
Just tested the example from wiki with default args (X11) and The
This was fixed by linked PR. I'm not well versed in ebuild files, but just to clarify, 99% of users don't want to change
|
Well here it fails after your commit. Explicitly enabling
I just added this flag for testing purposes. However I added in such a way that it also requires X11 and cairo. So it shouldn't cause problems. I will think about keeping or dropping it again. |
Well if You can go through the diff of #1844 as it's pretty short and you'll see that |
I an looking at it over and over since this issue has been opened and I also don't get why I doesn't work. |
@billie80 Is it possible that the built libraries aren't in correct Lua include path and system libraries are included instead? On arch, I have:
Do you have cairo (that could be loaded by Lua) installed by some other package or something? @belrus65 Can you try building |
Caellian, link not working, page not found for https://github.com/brndnmtthws/conky/tree/fix/cairo-imlib2-helper-dep |
@belrus65 Sorry, I merged it and forgot to update the link, use |
I have this libraries in the following locations
and for conky-1.20.2:
Well there is
I already tried this and did not change anything. |
Confirmed, same result. |
Just tried fresh from main branch I am getting Even though I selected it in build options Doing an However, doing a
Currently digging through the cmakes to see what's going on. |
Update: My problem was slightly different. For me, placing the libcairo.so libcairo_xlib.so That is where it wants it. I was expecting it to want it in /usr/lib |
You can use brenden@brndn.io.
If you compiled from source, |
Unfortunately, after solving that, I have now joined the others. I am now also getting the error
I will continue invetigating |
|
The strange thing is that |
Ah, okay, I see what's going on. You need to explicitly include the separate require 'cairo' Now you need: require 'cairo'
require 'cairo_xlib' I'll need to go through and update the docs accordingly. |
Great find! |
I modified my scripts to include " require 'cairo_xlib' ". Executed without any errors. Problem seems to be resolved. Thank you gentlemen for your hard work, much appreciated. |
Unfortunately, another problem arose! Scripts stops updating on screen after a few seconds. .xsession-errors logs the following: conky: FOUND: console conky: 'openbox' x11 session running 'openbox' destop Then the scripts stops updating the screen. |
Not only does the scripts that needed " require 'cairo_xlib' " stop functioning, but it seems every conky process stops responding. Can't kill running processes either, they simply respawn before they all shut down. |
Don't know if this helps, but the moment you touch your mouse, conky stops responding. |
Closing as completed then.
I opened a separate issue for that as it's unrelated and possibly (yet) a(nother) bug in some code I added 4 years ago. |
What happened?
Lua scripts fail - ua:896: attempt to call a nil value (global 'cairo_xlib_surface_create') when drawing shapes.
Version
1.20.2
Which OS/distro are you seeing the problem on?
Gentoo
Conky config
Lua script:
Stack trace
No response
Relevant log output
The text was updated successfully, but these errors were encountered: