Tuesday, November 24, 2009

Conky 1.7.2 on OpenSolaris

I've tried to compile the last Conky 1.7.2 version with Lua Cairo bindings on OpenSolaris and should say it impress me. It was necessary to tinker with code a little but I liked the result.



I hope to prepare clean patch soon.

38 comments:

sartaj faisal said...

HI

Good information about for us.

- J.
Web Solutions

Anonymous said...

Nice work!! I'd love to see that patch when you have time!

Vympel said...

great!!

Unknown said...

Can you post your .conkyrc and .lua files from second screenshot? Thanks in advance.

alhazred said...

Patch and conkyrc available at http://www.milax.org/?p=287

Mark Hawks said...

hi,
how to compile conky on opensolaris?

alhazred said...

Install tolua++, apply patch to conky-1.7.2, then run configure, gmake. (My options: configure --disable-mpd --disable-moc --enable-weather-metar --enable-lua-cairo)

Mark Hawks said...

After ./configure i received this:

Your operating system SunOS isn't supported
Feel free to help. :P

Mark Hawks said...

how to install tolua++ on opensolaris?

alhazred said...

For tolua++ use instructions from http://www.codenix.com/~tolua/#installing

Mark Hawks said...

i received this error during tolua++ install:

/data/tolua++-1.0.93$ pfexec scons
scons: Reading SConscript files ...

scons: warning: The Options class is deprecated; use the Variables class instead.
File "/data/tolua++-1.0.93/SConstruct", line 19, in ?
('********* tolua is ', 'bin/tolua++_bootstrap')

scons: warning: The env.Copy() method is deprecated; use the env.Clone() method instead.
File "/data/tolua++-1.0.93/src/tests/SCsub", line 2, in ?
scons: done reading SConscript files.
scons: Building targets ...
gcc -o bin/tolua++_bootstrap src/bin/tolua.o src/bin/toluabind_default.o lib/libtolua++_static.a -Llib -llua -llualib -lm
ld: fatal: library -llualib: not found
ld: fatal: file processing errors. No output written to bin/tolua++_bootstrap
collect2: ld returned 1 exit status
scons: *** [bin/tolua++_bootstrap] Error 1
scons: building terminated because of errors.



SUNWlua is installed!

alhazred said...

Comment 'lualib' in config_posix.py

Mark Hawks said...

how to patch the conky 1.7.2 configure file?

Mark Hawks said...

http://linux.byexamples.com/archives/163/how-to-create-patch-file-using-patch-and-diff/

ok! i resolved!

alhazred said...

Put patch in a directory with the unpacked Conky archive, then:
gpatch -p0 -i patch_file

Mark Hawks said...

Comment 'lualib' in config_posix.py not work for me...

DO you can post your canfig_posix.py?

alhazred said...

Marco: just remove 'lualib' entry from config_posix.py

Mark Hawks said...

$ cat config_posix.py



# flags for the compiler
#CCFLAGS = []
CCFLAGS = ['-O2', '-ansi', '-Wall']


prefix = '/usr/local'

# libraries
LIBS = ['lua', 'm']
#LIBS = ['lua', 'lualib', 'm']

this work for me , after lunch scons and scons install but when i do gmake in conky source i received this error:


ld: fatal: library -ltolua++: not found
ld: fatal: file processing errors. No output written to conky

alhazred said...

export LD_LIBRARY_PATH=/usr/local/lib

Mark Hawks said...

ok! thanks for your infinite patience!

Mark Hawks said...

hi,
you can find here entire procedure:
http://marcofalchi.blogspot.com/2009/12/opensolaris-conky-172-lua-cairo.html

Mark Hawks said...

ok! i change it in Firenze/Peretola!
http://weather.noaa.gov/weather/current/LIRQ.html

and i change network configuration rtls0 to my yukonx0 card....thanks!

Anonymous said...

terrific work! i've walked through this, but looks like my tolua build is broken somehow. it works, but the rings don't draw. ;)

here are the error messages i see in the log:

Conky: llua_load: error loading module 'cairo' from file '/usr/lib/conky/libcairo.so':
ld.so.1: conky: fatal: relocation error: file /usr/lib/conky/libcairo.so: symbol tolua_isvaluenil: referenced symbol not found
Conky: desktop window (100002f) is subwindow of root window (25c)
Conky: window type - override
Conky: drawing to created window (0x3e00001)
Conky: drawing to double buffer
Conky: llua_do_call: function conky_clock_rings execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_clock_rings execution failed: attempt to call a nil value

Unknown said...

Great blog. Just the info I need when I needed it. Thank you very much. Please don´t stop.. keep it coming :)

Unknown said...

I still get this message:

___________________________________
checking for LUA... no
checking for LUA51... no
checking for LUA51... configure: error: Package requirements (lua5.1 >= 5.1) were not met:

No package 'lua5.1' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LUA51_CFLAGS
and LUA51_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
______________________________________

I have already installed SUNWlua and have usr/lib and /usr/local/lib in my PATH ... what's my failure?

alhazred said...

Peter, check /usr/lib/pkgconfig/lua.pc

Unknown said...

there is no lua.pc in my /usr/lib/pkgconfig/ ... ??!!

Why? Help me please :-)

alhazred said...

# uname -a
SunOS sysadm 5.11 snv_133 i86pc i386 i86pc
# cat /usr/lib/pkgconfig/lua.pc
prefix= /usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: Lua
Description: An Extensible Extension Language
Version: 5.1.4
Requires:
Libs: -L${libdir} -llua -lm
Cflags: -I${includedir}
#

Unknown said...

OK ... I'm still using a snv_111b! Think this might be my problem..

aP said...

Hi,
I've a problem with conky.
I get the following error.

---
checking for LUA... yes
checking for cairo... configure: error: Package requirements (cairo) were not met:

Package xrender was not found in the pkg-config search path.
Perhaps you should add the directory containing `xrender.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xrender', required by 'cairo', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables cairo_CFLAGS
and cairo_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
---


Any idea?

alhazred said...

aP: check your /usr/lib/pkgconfig directory, and if these packages already installed

aP said...

If Package Manager displays it right it should be installed.


aP@Ma3a:~$ pkg-config --list-all
...
cairomm-xlib-xrender-1.0 cairomm-xlib-xrender - C++ wrapper for cairo - xlib-xrender support
...
pangocairo Pango Cairo - Cairo rendering support for Pango
...
cairo-java Cairo-Java - Cairo Java bindings
...
Package xrender was not found in the pkg-config search path.
Perhaps you should add the directory containing `xrender.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xrender', required by 'cairo', not found


/usr/lib/pkgconfig/cairo.pc
/usr/lib/pkgconfig/cairo-ft.pc
/usr/lib/pkgconfig/cairo-java.pc
/usr/lib/pkgconfig/cairo-pdf.pc
/usr/lib/pkgconfig/cairo-png.pc
/usr/lib/pkgconfig/cairo-ps.pc
/usr/lib/pkgconfig/cairo-svg.pc
/usr/lib/pkgconfig/cairo-xlib.pc
/usr/lib/pkgconfig/cairo-xlib-xrender.pc
/usr/lib/pkgconfig/cairomm-1.0.pc
/usr/lib/pkgconfig/cairomm-ft-1.0.pc
/usr/lib/pkgconfig/cairomm-pdf-1.0.pc
/usr/lib/pkgconfig/cairomm-png-1.0.pc
/usr/lib/pkgconfig/cairomm-ps-1.0.pc
/usr/lib/pkgconfig/cairomm-svg-1.0.pc
/usr/lib/pkgconfig/cairomm-xlib-1.0.pc
/usr/lib/pkgconfig/cairomm-xlib-xrender-1.0.pc


aP@Ma3a:~$ uname -a
SunOS Ma3a 5.11 snv_134 i86pc i386 i86pc Solaris

alhazred said...

pkg search -l /usr/lib/pkgconfig/xrender.pc
.. pkg:/x11/header@0.5.11-0.134

Unknown said...

can you help me figure this one out?

libtool: link: cannot find the library `/opt/csw/lib/libxcb-xlib.la' or unhandled argument `/opt/csw/lib/libxcb-xlib.la'
gmake[2]: *** [conky] Error 1
gmake[2]: Leaving directory `/export/home/gcard/downloads/software/conky-1.7.2/src'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/export/home/gcard/downloads/software/conky-1.7.2/src'
gmake: *** [all-recursive] Error 1


there is no libxcb-xlib.la, however there is a libxcb-xlib.so.0

do I have something misconfigured here? here are the crle and ld_library path settings:

[00:15][root@hobbes conky-1.7.2]# echo $LD_LIBRARY_PATH
/opt/csw/lib
[00:15][root@hobbes conky-1.7.2]# crle

Configuration file [version 4]: /var/ld/ld.config
Platform: 32-bit LSB 80386
Default Library Path (ELF): /opt/csw/lib:/lib:/usr/lib
Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default)

Command line:
crle -c /var/ld/ld.config -l /opt/csw/lib:/lib:/usr/lib


ANy help is appreciated.

alhazred said...

I can't help here due I don't using blastwave. I wonder why you can't use default libraries.

Unknown said...

changed crle back to:

crle -c /var/ld/ld.config -l /lib:/usr/lib:/opt/csw/lib

no LD_LIBRARY_PATH set. using scons from CSW, reinstalled tolua++ to /usr/local, changed lua.pc back to prefix=/usr/local and installed SUNWlua. It compiled without issue. I did originally try this and received errors which is why i went the CSW route. Just glad I am almost there!

Jhon Davis said...

Awsome beautiful design! I really like the way these circles are presented,

thankx man nice post!
- John Devis
Magento Themes

openbabel said...

Can you compile the latest 1.9 version on oios openindiana as a Christmas present in 2016 ? Thank you sooo much

Robert Jones

How to determine PXE mac address when booting illumos via PXELinux/iPXE

In illumos, if you need to determine the interface which was used for booting via PXE then it's possible to use "boot-mac" pro...