On 2010-01-18 21:56-0800 David MacMahon wrote:

> Hi, Alan (and plplot-devel),
>
> On Jan 13, 2010, at 18:40 , David MacMahon wrote:
>
>> I also found that to use the xcairo device I have to add `pkg-config
>> --libs cairo` to the examples/c Makefile when plplot is installed in
>> a non-standard location (e.g. ~/local/lib/...) and cairo is installed
>> to a different non-standard location (e.g. /opt/local/lib...).  If I
>> don't add this, the examples build, but they crash when running them
>> with "-dev xcairo".
>
> I think I've partially figured out what is causing this crash.  It turns out 
> that cmake was not finding my freetype fonts.  I installed them on my Mac via 
> MacPorts and they are in /opt/local/share/fonts/freetype-ttf, but I wasn't 
> telling cmake about this location and it doesn't look there by default so it 
> didn't find them so it turned off WITH_FREETYPE.  For some reason that I 
> can't fully explain, this ends up causing a crash when using the xcairo 
> driver (maybe any cairo driver?).
>
> If I tell cmake where to find my freetype fonts (via 
> -DPL_FREETYPE_FONT_PATH=...) and turn on WITH_FREETYPE, then I can use the 
> xcairo device fine.
>
> I still don't know exactly why the workaround I first described prevented the 
> crash, nor do I know what exactly changes with -DWITH_FREETYPE=ON, but now 
> that it works, the priority of this already oddball configuration problem has 
> gotten a lot lower IMHO.

Hi Dave:

On Linux, I can build and test xcairo with no issues using
WITH_FREETYPE=OFF. That makes sense because WITH_FREETYPE and
PL_FREETYPE_FONT_PATH are only supposed to affect old-fashioned
unicode-aware device drivers such as gd and parts of wxwidgets which use
plfreetype to do their font-finding.  Modern unicode-aware device drivers
such as qt and cairo do not use plfreetype at all and do not find fonts
directly with the aide of PL_FREETYPE_FONT_PATH.  Instead, they use generic
fonts names and pass font finding off to the Qt and cairo stack of
libraries.

So I cannot confirm the issue on Linux.  My best guess at this point is the
cairo libraries were independently crashing because they had no access to
fonts so this issue had nothing to do with our build system, but I just
don't know for sure since you supplied few details.

Now that you have installed the fonts, I think you will find setting
-DWITH_FREETYPE=OFF will make no difference to xcairo.  But if that turns
out not to be the case, and you want to pursue this further, please provide
all the details so we can see exactly what is going on for your use
case/platform.  Those details are relevant environment variables, cmake
options, cmake.out, make.out, make_install.out, cmake output for installed
examples (if using the new build system for those examples), make output for
installed examples. Note, that all make output must be done with the
VERBOSE=1 option in order to be useful.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to