can't view example data graphs

Asked by Tim jones

I am getting a broken icon when I view any of the graph. If I right click on the graph I get the following error.

Traceback (most recent call last):
File "/home/tjones/qr4/3p/python/lib/python2.4/site-packages/django/core/handlers/base.py" in get_response
  68. callback, callback_args, callback_kwargs = resolver.resolve(request.path)
File "/home/tjones/qr4/3p/python/lib/python2.4/site-packages/django/core/urlresolvers.py" in resolve
  162. sub_match = pattern.resolve(new_path)
File "/home/tjones/qr4/3p/python/lib/python2.4/site-packages/django/core/urlresolvers.py" in resolve
  162. sub_match = pattern.resolve(new_path)
File "/home/tjones/qr4/3p/python/lib/python2.4/site-packages/django/core/urlresolvers.py" in resolve
  118. return self.callback, args, kwargs
File "/home/tjones/qr4/3p/python/lib/python2.4/site-packages/django/core/urlresolvers.py" in _get_callback
  127. raise ViewDoesNotExist, "Could not import %s. Error was: %s" % (mod_name, str(e))

  ViewDoesNotExist at /render/
  Could not import web.render.views. Error was: /usr/local/lib/libfontconfig.so.1: undefined symbol: FT_Select_Size

I am using fontconfig 2.5.93 ... should I be using a different version ?

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
Tim jones
Solved:
Last query:
Last reply:
Revision history for this message
chrismd (chrismd) said :
#1

Hm... It's probably the cairo module import that is failing. To verify run "import cairo" from a python prompt and if you get an error then we'll know for sure. The FT_Select_Size symbol comes from the freetype library, which fontconfig links against. The best bet to fix this is to recompile/reinstall freetype then fontconfig. To verify that fontconfig is working try running "fc-list" from a command prompt. If you see a bunch of font names then fontconfig is probably fine. If the cairo import still fails you may need to recompile/reinstall cairo since it also links against libfreetype and libfontconfig. If that *still* doesn't do it then I'd go one step further and recompile/reinstall the pycairo bindings, but those should only link against libcairo so I wouldn't think that would be necessary.

Revision history for this message
chrismd (chrismd) said :
#2

Actually now that I think of it, running "import cairo" probably won't trigger the error since its a missing symbol. That will only get triggered once you try to render fonts with cairo, so to see if the problem is fixed you'll have to restart apache and try to render a graph again.

Revision history for this message
Tim jones (tjones-bottomline) said :
#3

ok thanks for the message. I have recompiled everything. I am not getting the fontconfig error anymore but I am now getting.

Traceback (most recent call last):
File "/home/tjones/qr4/3p/python/lib/python2.4/site-packages/django/core/handlers/base.py" in get_response
  68. callback, callback_args, callback_kwargs = resolver.resolve(request.path)
File "/home/tjones/qr4/3p/python/lib/python2.4/site-packages/django/core/urlresolvers.py" in resolve
  162. sub_match = pattern.resolve(new_path)
File "/home/tjones/qr4/3p/python/lib/python2.4/site-packages/django/core/urlresolvers.py" in resolve
  162. sub_match = pattern.resolve(new_path)
File "/home/tjones/qr4/3p/python/lib/python2.4/site-packages/django/core/urlresolvers.py" in resolve
  118. return self.callback, args, kwargs
File "/home/tjones/qr4/3p/python/lib/python2.4/site-packages/django/core/urlresolvers.py" in _get_callback
  127. raise ViewDoesNotExist, "Could not import %s. Error was: %s" % (mod_name, str(e))

  ViewDoesNotExist at /render/
  Could not import web.render.views. Error was: /usr/local/lib/libcairo.so.2: undefined symbol: FT_GlyphSlot_Embolden

I am using
freetype 2.3.7
fontconfig 2.5.0
cairo 1.6.4
pycairo-1.4.12
graphite-0.9.2

maybe you can tell me what version you are using and I can try those ?

thanks
Tim

Revision history for this message
chrismd (chrismd) said :
#4

I have used many different versions of each of those libraries, and compiling should (hopefully) fail if you are using incompatible versions. The error your getting now indicates to me that cairo needs to be recompiled. Did you just recompile freetype & fontconfig or did you already recompile cairo after recompiling those?

On my workstation I am using:

freetype 2.3.5
fontconfig 2.5.0
cairo 1.6.0
pycairo 1.4.0
graphite 0.9.2

Your versions should be fine as well since they are only newer minor versions. I would recommend recompiling cairo. Also it looks like you have compiled these packages from source and are not using versions that may come with your distro, so it might be that you need to set your LD_LIBRARY_PATH to have /usr/local/lib/ in it to ensure its linking against the right versions of these libs. It is quite likely that your distro already has versions of these installed in /usr/lib/ and that may be where the issue is. To run apache with the right LD_LIBRARY_PATH you may need to find & modify a distro-specific config file (if you're using apache from your distro) or if your apache is also from source then there should be a /usr/local/apache2/bin/envvars file that is used by the apachectl script.

If none of this works then maybe you should try just using packages from your distro instead of compiling the libs from source.

Revision history for this message
Tim jones (tjones-bottomline) said :
#5

ok I finally got this to work using the django webserver after I noticed that I could actually import the web.render.views from a python interpreter. So obviously there is something I need to modify in apache config though I have not found it yet (do not have envvars on my system). Though it does look like it is using /usr/local/lib/libcairo.so.2 from the error log and if I do strings on that I see the FT_GlyphSlot_Embolden symbol in there.