LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 08-17-2011, 11:36 AM   #1
Bindestreck
Member
 
Registered: Jul 2011
Location: Sweden
Distribution: Slackware
Posts: 337

Rep: Reputation: 75
lua with cairo doesnt work in conky


Hi,

I try to use Lua with cairo in conky. But whenever I try to execute conky I get this error:
Code:
bash-4.1$ conky -c .conkyrc_test
Conky: llua_load: /home/expander/clock.lua:71: module 'cairo' not found:
        no field package.preload['cairo']
        no file './cairo.lua'
        no file '/usr/share/lua/5.1/cairo.lua'
        no file '/usr/share/lua/5.1/cairo/init.lua'
        no file '/usr/lib64/lua/5.1/cairo.lua'
        no file '/usr/lib64/lua/5.1/cairo/init.lua'
        no file '/usr/lib/conky/libcairo.so'
        no file './cairo.so'
        no file '/usr/lib64/lua/5.1/cairo.so'
        no file '/usr/lib64/lua/5.1/loadall.so'
Conky: desktop window (ac) is root window
Conky: window type - override
Conky: drawing to created window (0x2200001)
Conky: drawing to double buffer
I have installed this dependencies:

lua
tolua++

I've also installed all possible cairo I found at SlackBuild:
cairo-compmgr
cairo-dock
cairo-dock-plugins
cairomm Libraries
perl-cairo

conky -v gives this:

Code:
bash-4.1$ conky -v
Conky 1.8.1 compiled Wed Aug 17 11:53:12 CEST 2011 for Linux 3.0.1-eXpander (x86_64)

Compiled in features:

System config file: /usr/etc/conky/conky.conf
Package library path: /usr/lib/conky

 X11:
  * Xdamage extension
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual

 Music detection:
  * MPD
  * MOC

 General:
  * math
  * hddtemp
  * portmon
  * config-output
  * Imlib2
  * apcupsd
  * iostats
  * ncurses
  * Lua

  Lua bindings:
   * Cairo
   * Imlib2
One can see that my conky should support Lua and with cairo bindings and Imlib2. What do I miss? Or is there a Lua5.1 package I need to install?

I appreciate any help, thanks.

Last edited by Bindestreck; 08-17-2011 at 11:46 AM.
 
Old 08-17-2011, 09:13 PM   #2
larryhaja
Member
 
Registered: Jul 2008
Distribution: Slackware 13.1
Posts: 293

Rep: Reputation: 76
Quote:
Originally Posted by eXpander_ View Post
Code:
bash-4.1$ conky -c .conkyrc_test
Conky: llua_load: /home/expander/clock.lua:71: module 'cairo' not found:
        no field package.preload['cairo']
        no file './cairo.lua'
        no file '/usr/share/lua/5.1/cairo.lua'
        no file '/usr/share/lua/5.1/cairo/init.lua'
        no file '/usr/lib64/lua/5.1/cairo.lua'
        no file '/usr/lib64/lua/5.1/cairo/init.lua'
        no file '/usr/lib/conky/libcairo.so'
        no file './cairo.so'
        no file '/usr/lib64/lua/5.1/cairo.so'
        no file '/usr/lib64/lua/5.1/loadall.so'
Conky: desktop window (ac) is root window
Conky: window type - override
Conky: drawing to created window (0x2200001)
Conky: drawing to double buffer
I actually don't know what is going on but it looks like you have conky in /usr/lib and the rest of the files in the list above in /usr/lib64. I would first fix that issue and then it might fix the problem or at least reduce the number of problem(s).
 
Old 08-17-2011, 10:00 PM   #3
Root-Minuz
LQ Newbie
 
Registered: Jun 2011
Posts: 5

Rep: Reputation: Disabled
Can you post the contents of .conkyrc_test?

Might give a hint
P.S: did you install conky from slakbuilds or from source?
 
Old 08-18-2011, 04:21 AM   #4
Bindestreck
Member
 
Registered: Jul 2011
Location: Sweden
Distribution: Slackware
Posts: 337

Original Poster
Rep: Reputation: 75
Quote:
Originally Posted by larryhaja View Post
I actually don't know what is going on but it looks like you have conky in /usr/lib and the rest of the files in the list above in /usr/lib64. I would first fix that issue and then it might fix the problem or at least reduce the number of problem(s).
I did a "find / -name "conky"" and this is the result:
/usr/local/lib/conky
/usr/bin/conky

Is that correct or should conky be installed somewhere else? If I manually try to find the files above, this is the result:

Code:
bash-4.1# find / -name "cairo.lua"
#nothing

bash-4.1# find / -name "init.lua"
#nothing

bash-4.1# find / -name "libcairo.so"
/usr/lib/libcairo.so
/usr/local/lib/libcairo.so
/usr/lib64/libcairo.so

bash-4.1# find / -name "cairo.so"
#nothing

bash-4.1# find / -name "loadall.so"
#nothing
It did find libcairo.so, however in other directories. But none of the rest were found.

Quote:
Originally Posted by Root-Minuz View Post
Can you post the contents of .conkyrc_test?

Might give a hint
P.S: did you install conky from slakbuilds or from source?
I did install from source, but builded a package with src2pkg. Perhaps I should install from Slackbuild instead? But it seems that some cairo package is missing. When executing:
lua -l 'cairo', it gives same error.

Thanks for all your answers!

Last edited by Bindestreck; 08-18-2011 at 05:00 AM.
 
Old 08-18-2011, 04:59 AM   #5
Bindestreck
Member
 
Registered: Jul 2011
Location: Sweden
Distribution: Slackware
Posts: 337

Original Poster
Rep: Reputation: 75
I did compiled from SlackBuild with LUA=yes ./conky.SlackBuild. However, still same error.

When executing lua -l 'cairo' or lua -l 'imlib2' I get this errors:

Code:
 bash-4.1$ lua -l 'cairo'
lua: module 'cairo' not found:
        no field package.preload['cairo']
        no file './cairo.lua'
        no file '/usr/local/share/lua/5.1/cairo.lua'
        no file '/usr/local/share/lua/5.1/cairo/init.lua'
        no file '/usr/local/lib/lua/5.1/cairo.lua'
        no file '/usr/local/lib/lua/5.1/cairo/init.lua'
        no file './cairo.so'
        no file '/usr/local/lib/lua/5.1/cairo.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: ?
        [C]: ?

bash-4.1$ lua -l 'imlib2'
lua: module 'imlib2' not found:
        no field package.preload['imlib2']
        no file './imlib2.lua'
        no file '/usr/local/share/lua/5.1/imlib2.lua'
        no file '/usr/local/share/lua/5.1/imlib2/init.lua'
        no file '/usr/local/lib/lua/5.1/imlib2.lua'
        no file '/usr/local/lib/lua/5.1/imlib2/init.lua'
        no file './imlib2.so'
        no file '/usr/local/lib/lua/5.1/imlib2.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: ?
        [C]: ?
I did find some "luacairo-1.10.2.0-src". But I get an error when trying to compile:

Code:
bash-4.1$ make
gcc -Wall -O2 -fPIC -c \
`pkg-config --cflags lua5.1` \
`pkg-config --cflags cairo` \
`pkg-config --cflags gtk+-2.0` \
`pkg-config --cflags gdk-2.0` \
lcairo.c
In file included from lcairo.c:193:0:
lcairo-ft-font.c:68:12: error: redefinition of 'l_cairo_ft_font_face_create_for_                                                                                                   pattern'
lcairo-ft-font.c:20:12: note: previous definition of 'l_cairo_ft_font_face_creat                                                                                                   e_for_pattern' was here
lcairo-ft-font.c:77:12: error: redefinition of 'l_cairo_ft_font_options_substitu                                                                                                   te'
lcairo-ft-font.c:27:12: note: previous definition of 'l_cairo_ft_font_options_su                                                                                                   bstitute' was here
In file included from lcairo.c:196:0:
lcairo-image-surface.c: In function 'l_cairo_image_surface_get_data':
lcairo-image-surface.c:85:5: warning: pointer targets in passing argument 2 of '                                  lua_pushlstring' differ in signedness
/usr/include/lua.h:163:16: note: expected 'const char *' but argument is of type                                    'unsigned char *'
lcairo.c: At top level:
lcairo-private.h:414:23: warning: 'l_cairo_xcb_device_debug_cap_xshm_version' de                                    clared 'static' but never defined
lcairo-private.h:415:23: warning: 'l_cairo_xcb_device_debug_cap_xrender_version'                                                                            declared 'static' but never defined 
lcairo-ft-font.c:20:12: warning: 'l_cairo_ft_font_face_create_for_pattern' defin                                        ed but not used
lcairo-ft-font.c:27:12: warning: 'l_cairo_ft_font_options_substitute' defined bu                                         t not used
make: *** [lcairo.o] Error 1
I have no idea what to do.

*EDIT: Have anyone here managed to get lua-cario bindings to work with conky (Slackware 13.37)? If so, could you please share your lua-script and conkyrc-file?

Last edited by Bindestreck; 08-18-2011 at 07:33 AM.
 
Old 08-18-2011, 11:47 AM   #6
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,504

Rep: Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912
cairo and imlib2 bindings for lua are bundled with conky (since 1.7.4), and normally you should have them installed in /usr/lib64/conky/.
I tried to follow the example here and works fine (besides the font).
I suspect you've got something wrong in your conky config files, but I don't use this so I cannot be of more help
 
Old 08-18-2011, 12:05 PM   #7
Bindestreck
Member
 
Registered: Jul 2011
Location: Sweden
Distribution: Slackware
Posts: 337

Original Poster
Rep: Reputation: 75
Quote:
Originally Posted by ponce View Post
cairo and imlib2 bindings for lua are bundled with conky (since 1.7.4), and normally you should have them installed in /usr/lib64/conky/.
I tried to follow the example here and works fine (besides the font).
I suspect you've got something wrong in your conky config files, but I don't use this so I cannot be of more help
Hi,

thanks for your answer.

The problem on the lua example from http://wiki.conky.be/index.php?title=Lua_Cario_bindings, is the following row:

require 'cairo'

Im just wondering, do you have the listed files above? This files:

Code:
lua: module 'cairo' not found:
        no field package.preload['cairo']
        no file './cairo.lua'
        no file '/usr/local/share/lua/5.1/cairo.lua'
        no file '/usr/local/share/lua/5.1/cairo/init.lua'
        no file '/usr/local/lib/lua/5.1/cairo.lua'
        no file '/usr/local/lib/lua/5.1/cairo/init.lua'
        no file './cairo.so'
        no file '/usr/local/lib/lua/5.1/cairo.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'

Last edited by Bindestreck; 08-18-2011 at 12:16 PM.
 
Old 08-18-2011, 12:57 PM   #8
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,504

Rep: Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912
I suspect you haven't created in your home the cairo.lua file required by the example (on that same page) and loaded in the rc by lua_load
Code:
lua_load ~/cairo.lua

Last edited by ponce; 08-18-2011 at 12:59 PM.
 
Old 08-18-2011, 01:02 PM   #9
Bindestreck
Member
 
Registered: Jul 2011
Location: Sweden
Distribution: Slackware
Posts: 337

Original Poster
Rep: Reputation: 75
I put all the code from the example in a new file called cairo.lua. I also create that .conkyrc.cairo file. I do everything that says on the page... I still cannot get it to work. Then when I execute:
conky -d -f "Radio Space" -c .conkyrc.cairo

I get this:

Conky: llua_load: ./cairo.lua:3: loop or previous error loading module 'cairo'

???????
 
Old 08-18-2011, 01:06 PM   #10
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,504

Rep: Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912
here works fine.
if the files are exactly the same as the guide, maybe it's because of all the stuff you installed before from source (always use slackbuilds): I would suggest you to try with a fresh account or with a fresh install.

Last edited by ponce; 08-18-2011 at 01:08 PM.
 
Old 08-18-2011, 01:14 PM   #11
Bindestreck
Member
 
Registered: Jul 2011
Location: Sweden
Distribution: Slackware
Posts: 337

Original Poster
Rep: Reputation: 75
Thats the thing. I tried this on a newly fresh installed Slackware on a computer. Same error.

However, there is one thing that connect my laptop to that computer, both use custom compiled kernel 3.0.1. Maybe it has something to do with that?
 
Old 08-18-2011, 01:18 PM   #12
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,504

Rep: Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912
no, 3.0.2-ck here, but I think it doesn't matter at all.
sorry if I repeat, it works on a fresh install with lua, tolua++ and conky, all from slackbuilds.org.
so if you tried, you got something else wrong (or you are using the same home for your user and what breaks it is there).

Last edited by ponce; 08-18-2011 at 01:20 PM.
 
Old 08-18-2011, 01:23 PM   #13
Bindestreck
Member
 
Registered: Jul 2011
Location: Sweden
Distribution: Slackware
Posts: 337

Original Poster
Rep: Reputation: 75
No, it is two different, my laptop, and a stationary PC. On the stationary PC I installed lua, tolua++ from sbopkg and conky from SlackBuild. I installed conky with LUA=yes ./conky.SlackBuild.

Oh my...
 
Old 08-18-2011, 02:19 PM   #14
Bindestreck
Member
 
Registered: Jul 2011
Location: Sweden
Distribution: Slackware
Posts: 337

Original Poster
Rep: Reputation: 75
Just one last question, what is your Pixman and X.org version?

Mine is:

Code:
bash-4.1$ X -version

X.Org X Server 1.10.3
Release Date: 2011-07-08
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.37.6 x86_64 
Current Operating System: Linux darkstar 3.0.1-eXpander #1 SMP PREEMPT Thu Aug 11 20:24:20 CEST 2011 x86_64
Kernel command line: BOOT_IMAGE=eXpander_3.0.1 ro root=802 vt.default_utf8=0
Build Date: 10 August 2011  11:34:34PM
 
Current version of pixman: 0.22.2
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.

Last edited by Bindestreck; 08-18-2011 at 02:23 PM.
 
Old 08-19-2011, 04:15 AM   #15
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,504

Rep: Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912
I'm using the ones provided with slackware (I suppose you do not).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing Conky -- strange lua problem? benav Linux - Software 8 09-27-2011 01:06 PM
Trying to get Lua to work with Conky AbsoluteZ3r0 Linux - Software 0 08-17-2011 11:01 AM
[SOLVED]gtk theme doesnt't change using cairo dock launcher michaelinux Linux - Software 1 05-25-2010 07:42 PM
installing LUA 5.1 and conky on slackware 13 bret381 Linux - Software 2 11-17-2009 06:51 AM
Why doesnt my USB mouse doesnt work? barkha Linux - Hardware 2 08-16-2005 12:31 PM


All times are GMT -5. The time now is 08:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration