DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 22nd June 2014
bsdplus bsdplus is offline
Real Name: Alan Cheng
Port Guard
 
Join Date: Jun 2009
Location: Shanghai, China
Posts: 21
Thanked 0 Times in 0 Posts
Default conky + lua + cairo issue - unable to resolv symbol

I'm trying to get conky + lua + cairo working on my OpenBSD 5.5 AMD64.
When I start conky, I got the "Unable to resolve symbol" error, thus lua cannot load cairo module, and could not draw rings as configured in a lua script, which is in turn called in my conky config file.

googling around on this didn't find anything helpful. Any hints would be appreciated.

Code:
[acheng@azalea ~]$ conky -c Downloads/conkyrc_seamod                          <
Conky: llua_load: error loading module 'cairo' from file '/usr/local/lib/conky/libcairo.so':
        Unable to resolve symbol
Conky: forked to background, pid is 13136
[acheng@azalea ~]$ 
Conky: desktop window (e8) is root window
Conky: window type - normal
Conky: drawing to created window (0x1600002)
Conky: drawing to double buffer
Conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_main execution failed: attempt to call a nil
but ldd seems can resolve the symbol fine:

Code:
[acheng@azalea ~]$ ldd /usr/local/lib/conky/libcairo.so 
/usr/local/lib/conky/libcairo.so:
        Start            End              Type Open Ref GrpRef Name
        000011ee15c0d000 000011ee16107000 dlib 1    0   0      /usr/local/lib/libcairo.so.12.2
        000011ee0af1b000 000011ee0b32d000 rlib 0    2   0      /usr/lib/libpthread.so.18.0
        000011ee06a14000 000011ee06ec0000 rlib 0    1   0      /usr/X11R6/lib/libpixman-1.so.32.4
        000011ee0e13a000 000011ee0e571000 rlib 0    1   0      /usr/X11R6/lib/libfontconfig.so.9.0
        000011ee0751b000 000011ee07940000 rlib 0    2   0      /usr/lib/libexpat.so.11.0
        000011ee085fa000 000011ee08a8c000 rlib 0    2   0      /usr/X11R6/lib/libfreetype.so.22.0
        000011ee16107000 000011ee16537000 rlib 0    1   0      /usr/local/lib/libpng.so.17.1
        000011ee0db82000 000011ee0df84000 rlib 0    1   0      /usr/X11R6/lib/libxcb-shm.so.1.0
        000011ee0f2f2000 000011ee0f6f4000 rlib 0    4   0      /usr/X11R6/lib/libpthread-stubs.so.2.0
        000011ee13a27000 000011ee13e2a000 rlib 0    2   0      /usr/X11R6/lib/libXau.so.10.0
        000011ee0b32d000 000011ee0b732000 rlib 0    2   0      /usr/X11R6/lib/libXdmcp.so.11.0
        000011ee147d5000 000011ee14bde000 rlib 0    1   0      /usr/X11R6/lib/libxcb-render.so.1.0
        000011ee0d6f2000 000011ee0dafb000 rlib 0    1   0      /usr/X11R6/lib/libXrender.so.6.0
        000011ee16537000 000011ee16948000 rlib 0    1   0      /usr/X11R6/lib/libXext.so.13.0
        000011ee11c37000 000011ee12169000 rlib 0    3   0      /usr/X11R6/lib/libX11.so.16.0
        000011ee13609000 000011ee13a27000 rlib 0    6   0      /usr/X11R6/lib/libxcb.so.3.0
        000011ee0c942000 000011ee0cd57000 rlib 0    3   0      /usr/lib/libz.so.5.0
        000011ee12bc5000 000011ee12fed000 rlib 0    3   0      /usr/lib/libm.so.9.0

Please note that the conky binary I used is compiled from ports, with lua+cairo bindings which is not enabled in the default conky package.

Also, to enable lua+cairo binding in conky, I had to manually compiled and installed tolua++ which is removed from ports a while back, for reasons unknown to me.

conky -v output:
Code:
[acheng@azalea ~]$ conky -v
Conky 1.9.0 compiled Tue Jun 10 01:14:21 CST 2014 for OpenBSD 5.5 (amd64)

Compiled in features:

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

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

 Music detection:
  * Audacious
  * MPD

 General:
  * math
  * Curl
  * RSS
  * Imlib2
  * ncurses
  * Lua

  Lua bindings:
   * Cairo
   * Imlib2
Reply With Quote
  #2   (View Single Post)  
Old 22nd June 2014
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,882
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by bsdplus View Post
I'm trying to get conky + lua + cairo working on my OpenBSD 5.5 AMD64.
While someone here may have played with these applications such that they can comment intelligently, the chances of someone using these specific packages (may) be slim.

My suggestion would be to contact sysutils/conky's maintainer who currently is benoit@.

If you do resolve this issue, you will be doing the community a favor by posting your findings.
Reply With Quote
  #3   (View Single Post)  
Old 22nd June 2014
bsdplus bsdplus is offline
Real Name: Alan Cheng
Port Guard
 
Join Date: Jun 2009
Location: Shanghai, China
Posts: 21
Thanked 0 Times in 0 Posts
Default

thanks ocicat. I'll send mail to benoit@ about this ...
Reply With Quote
  #4   (View Single Post)  
Old 6th July 2014
bsdplus bsdplus is offline
Real Name: Alan Cheng
Port Guard
 
Join Date: Jun 2009
Location: Shanghai, China
Posts: 21
Thanked 0 Times in 0 Posts
Default

benoit@ suggested "LD_PRELOAD=/usr/local/lib/conky/libcairo.so", but that did not help.

after more googling, I found out that the reason is that the libcairo.so file was not built during "make install", and this file is different from /usr/local/lib/libcairo.so.0.*, so creating sym link will not help.

I did the following and that kinda worked around it:

1. when compiling tolua++, insruct it to compile shared library instead of a static one
2. manually download conky 1.9.0 source code and apply patches included in its ports(/usr/ports/sysutil/conky/patch) to make it compile on OpenBSD
3. install automake/autoconf/docbook2x/lua51
4. export AUTOMAKE_VERSION/AUTOCONF_VERSION env according to your installed version
5. run autogen.sh
6. run configure with the following opitons:
Code:
env CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" LUA_CFLAGS="`pkg-config --cflags lua51`" LUA_LIBS="`pkg-config --libs lua51`" ./configure \
--enable-imlib2 \
--enable-mpd \
--enable-rss \
--disable-config-output \
--disable-moc \
--disable-portmon \
--enable-lua \
--enable-lua-cairo \
--enable-lua-imlib2 \
--enable-curl \
--with-libiconv-prefix=/usr/local \
--with-gnu-ld=yes
7. make
8. make install (will hit some error on documents related stuff, but that should be ok)
9. in conky-1.9.0 source directory, do the following to generate the libcairo.so file and others we need:
Code:
cd src/lua
make install
10. if everything goes well, we shoud have /usr/local/lib/conky/libcairo.so.0.0 file. then create a link named libcairo.so pointing to libcairo.so.0.0 under the same directory
11. now we're ready to try conky with some lua/cairo stuff

Here is what mine look like, with the Seamod conky configuration (still some rings missing compared to the original, but I guess that's because that config used some linux specific counters) :

http://www.deviantart.com/art/Conky-...v0-1-283461046


Last edited by bsdplus; 6th July 2014 at 06:55 AM. Reason: make image smaller
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cairo-dock gthread-2.0 shep OpenBSD Packages and Ports 2 7th February 2014 07:26 PM
conky phill OpenBSD Packages and Ports 12 21st January 2011 10:27 AM
How to add a nameserver in /etc/resolv.conf automatically guitarscn OpenBSD General 7 9th November 2010 12:12 PM
cuse4bsd - link_elf: symbol KPTmap undefined godfrank FreeBSD Ports and Packages 3 5th September 2010 11:29 PM
Python/GTK/Cairo Problems (ImportError: No module named cairo) whetphish FreeBSD General 2 24th June 2009 11:06 PM


All times are GMT. The time now is 07:28 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick