From: Alan W. I. <ir...@be...> - 2010-07-02 02:04:33
|
On 2010-07-01 18:52-0500 P Kishor wrote: > Ok. I tried building PLplot once again, but failed in enabling PNG > output. In the process, I updated fontconfig, libiconv, cairo, > poppler, and pkg-config. Here is my long-ish account of what I did [...] > -DWITH_FREETYPE=OFF \ That should be ON since the gd device driver (which implements png, jpeg, and gif) depends on that. My sense, though, is you are overspecifying options. For that case you can sometimes get into trouble because you will end up with inconsistent options or at least surprising results like you have just found. Of course, turning off languages and devices you don't need with the appropriate -DENABLE_<language>=OFF and -DPLD_<device>=OFF options to save build time or to avoid broken languages/devices or turning on deprecated devices such as png with -DPLD_png=ON is perfectly fine. However, otherwise you should try to let cmake figure things out for itself as much as possible to arrive at a consistent set of options. For example, if you just drop all mention of DWITH_FREETYPE it is ON by default (unless freetype libraries cannot be found), and then -DPLD_png=ON should just work to allow use of that deprecated device. I do most of my testing of PLplot with a system loaded with the needed libraries and mostly using cmake defaults for everything. Occasionally, I drop particular languages or devices or add deprecated devices, but otherwise I leave the details to cmake. BTW, cmake allows the possibility of a "hierarchical" tree of options where options lower in the tree may only be valid for certain cases of higher-level options. That is uniquely useful and gives a speedy result for build systems where you often have logic similar to "if the freetype library is not available, don't bother with configuring options concerning the the gd device driver". So that is a big win compared to autotools which just has a flat list of options that it trudges through. However, because of that feature outputting a flat list of options and their annotations is not that useful for cmake-based build systems. Instead, I would advise doing a default configuration (with no -D options at all) and then looking at the annotated results in the generated CMakeCache.txt file. Then if you want to change any of those annotated variables, go ahead and do so with the appropriate -D option (restarting in an empty build tree with no CMakeCache.txt file) then look at the newly generated CMakeCache.txt again to see what options have been added or closed off by your choice of -D options. It sounds complicated, but for a given platform you very quickly iterate to the -D options you really need to set, and those should be minimal if the defaults are well-chosen (as I hope is the case for PLplot). 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 __________________________ |