From: Michael E. <ms...@sa...> - 2003-03-18 01:00:25
|
Hello, I am working on a project that uses PLplot for 3D surface plotting (more info: http://endo.sandia.gov/DAKOTA) and am having the problem that an executable linked with libplplotfX.a on one platform won't execute on a different platform of the same type due to the dependence on external font files. The error manifests itself as: Cannot open library file: plstnd5.fnt lib dir="/home/mseldre/export/sierra/Dakota/VendorPackages/plplot/i686-unknown-linux/lib" *** PLPLOT ERROR *** Unable to open font file Program aborted As it is not practical to build the DAKOTA application from scratch on every platform where we'd like to run, we'd prefer to be able to distribute executables without this type of dependency. I have read through the FAQ and other available documentation and the only possible solution I can find it to distribute the font files along with the executable and have the user set a $PLPLOT_LIB environment variable. This is do-able, but I'm writing to see if there may be other possibilities that would be cleaner. I am currently using an older version of PLplot (circa Sept. 1998, the included NEWS file says version 4.99j), so the first thing I tried was downloading the latest (5.2.0) to see if that would help. From the distribution, it appears that this version is still dependent on the same external font files. So I don't know much about font management, but the desired solution would be something where the font support is compiled into the executable or, alternatively, is reliant on the locally supported fonts such that external fonts are not needed. Is something like this available? I looked a little at the freetype configure option, but couldn't find much info on what this is about. Thanks very much for the help, --Mike Eldred -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Michael S. Eldred, Ph.D. Sandia National Laboratories P.O. Box 5800, Mail Stop 0847 Albuquerque, NM 87185-0847 (505)844-6479, FAX:(505)844-9297 ms...@sa... http://endo.sandia.gov/~mseldre/ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
From: Alan W. I. <ir...@be...> - 2003-03-18 02:15:00
|
On Mon, 17 Mar 2003, Michael Eldred wrote: > As it is not practical to build the DAKOTA application from > scratch on every platform where we'd like to run, we'd prefer > to be able to distribute executables without this type of > dependency. Since you are talking common executables, you must have the same platform everywhere. I suggest configuring plplot-5.2.0 with a unique prefix (e.g., ./configure --prefix=/usr/local/plplot), then make; make install. That last step will put everything you need (fonts, drivers, etc.) into /usr/local/plplot. All you have to do after that is make a tarball of everything in that tree and copy the tree to all your platforms. This solution assumes you have the same system libraries installed in the same positions on every platform. If you want to get a bit fancier, and your platform is a Linux one, then you can build an rpm instead. This has already been done for you for RH 7.3. See resources on http://plplot.sourceforge.net/resources/ for the link. That page also says where you can get the latest developmental tarball and Debian packages as well. BTW, use ./configure --help to see what the options are. For example, by default you will build both shared and static libraries. If you don't want the shared libraries just specify --disable-shared. One notorious configuration bug to watch out for in plplot-5.2.0 --- the combination of static drivers and double precision does not work. This configuration bug has been fixed in the cvs version and the developmental tarball that is derived from the cvs version. Also, stay tuned here for PLplot news. In April we plan to make our next release (with configuration superbly debugged, refined, and polished mostly by Rafael Laboissiere's hard work), and you will first hear all the details right here. Alan __________________________ Alan W. Irwin email: ir...@be... phone: 250-727-2902 Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the Canadian Centre for Climate Modelling and Analysis (www.cccma.bc.ec.gc.ca) and the PLplot scientific plotting software package (plplot.org). __________________________ Linux-powered Science __________________________ |
From: Michael E. <ms...@sa...> - 2003-03-18 03:07:32
|
Hi Alan, Thanks very much for the reply. I'm afraid I wasn't very clear in my description. I'm not trying to distribute a PLplot installation to other platforms, I'm trying to distribute an executable (DAKOTA in this case) to other platforms which has the PLplot library (libplplotfX.a) linked in as a graphics library. This works fine for all of our various DAKOTA libraries (see http://endo.sandia.gov/DAKOTA/licensing/license.html), except for this dependence of PLplot on external font files. We'd prefer for our DAKOTA users to be able to download a DAKOTA executable from our site and just run it as is, without the need to install additional files, have root privelege, etc. So the question is really: can PLplot be built as a self-contained library without dependence on external files (and without dependence on the paths to these files that were present on the build platform)? This may not be possible, but thought it would be worth asking. My hope was that there would be an option to either embed the fonts or rely on native platform fonts. Also, w.r.t. our plplot configuration, we are currently configuring using the --prefix=<build_dir>, --disable-tcl, and --without-shlib options. Thanks, --Mike "Alan W. Irwin" wrote: > > On Mon, 17 Mar 2003, Michael Eldred wrote: > > > As it is not practical to build the DAKOTA application from > > scratch on every platform where we'd like to run, we'd prefer > > to be able to distribute executables without this type of > > dependency. > > Since you are talking common executables, you must have the same platform > everywhere. I suggest configuring plplot-5.2.0 with a unique prefix (e.g., > ./configure --prefix=/usr/local/plplot), then make; make install. That last > step will put everything you need (fonts, drivers, etc.) into > /usr/local/plplot. All you have to do after that is make a tarball of > everything in that tree and copy the tree to all your platforms. This > solution assumes you have the same system libraries installed in the same > positions on every platform. > > If you want to get a bit fancier, and your platform is a Linux one, then you > can build an rpm instead. This has already been done for you for RH 7.3. > See resources on http://plplot.sourceforge.net/resources/ for the link. That > page also says where you can get the latest developmental tarball and Debian > packages as well. > > BTW, use ./configure --help to see what the options are. For example, by > default you will build both shared and static libraries. If you don't want > the shared libraries just specify --disable-shared. > > One notorious configuration bug to watch out for in plplot-5.2.0 --- the > combination of static drivers and double precision does not work. This > configuration bug has been fixed in the cvs version and the developmental > tarball that is derived from the cvs version. > > Also, stay tuned here for PLplot news. In April we plan to make our next > release (with configuration superbly debugged, refined, and polished mostly > by Rafael Laboissiere's hard work), and you will first hear all the > details right here. > > Alan Thanks, --Mike -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Michael S. Eldred, Ph.D. Sandia National Laboratories P.O. Box 5800, Mail Stop 0847 Albuquerque, NM 87185-0847 (505)844-6479, FAX:(505)844-9297 ms...@sa... http://endo.sandia.gov/~mseldre/ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
From: Alan W. I. <ir...@be...> - 2003-03-18 04:36:22
|
On Mon, 17 Mar 2003, Michael Eldred wrote: > I'm trying > to distribute an executable (DAKOTA in this case) to other platforms > which has the PLplot library (libplplotfX.a) linked in as a graphics > library.... Sorry, I was completely in the mindset of shared libraries, dynamic drivers, etc., where the best solution is to distribute the installed PLplot tree (or the parts of it which you need). However, if you are statically linking the PLplot library into your DAKOTA executable, then I think the simplest solution (as you have already discovered) is to distribute the (Hershey) font files with your DAKOTA executable and have your users set the environment variable PLPLOT_LIB. The other alternative you mentioned, freetype, actually works very well for our gd driver (which implements our png and jpeg devices using the gd library). It does use system fonts. However, it does not yet work with other devices (the associated drivers will need some rewriting to use it), and you probably don't want to limit yourself just to the png and jpeg devices. Alan __________________________ Alan W. Irwin email: ir...@be... phone: 250-727-2902 Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the Canadian Centre for Climate Modelling and Analysis (www.cccma.bc.ec.gc.ca) and the PLplot scientific plotting software package (plplot.org). __________________________ Linux-powered Science __________________________ |
From: <jc...@fe...> - 2003-03-18 15:18:36
|
On Tuesday 18 March 2003 00:58, Michael Eldred wrote: | Hello, | | I am working on a project that uses PLplot for 3D surface | plotting (more info: http://endo.sandia.gov/DAKOTA) and am | having the problem that an executable linked with | libplplotfX.a on one platform won't execute on a different | platform of the same type due to the dependence on external | font files. The error manifests itself as: | | | Cannot open library file: plstnd5.fnt | lib | dir="/home/mseldre/export/sierra/Dakota/VendorPackages/plplot/i686-un |known-linux/lib" | | *** PLPLOT ERROR *** | Unable to open font file | Program aborted | | | As it is not practical to build the DAKOTA application from | scratch on every platform where we'd like to run, we'd prefer | to be able to distribute executables without this type of | dependency. | | I have read through the FAQ and other available documentation | and the only possible solution I can find it to distribute the | font files along with the executable and have the user set a | $PLPLOT_LIB environment variable. This is do-able, but I'm | writing to see if there may be other possibilities that would | be cleaner. | | I am currently using an older version of PLplot (circa Sept. | 1998, the included NEWS file says version 4.99j), so the first | thing I tried was downloading the latest (5.2.0) to see if | that would help. From the distribution, it appears that this | version is still dependent on the same external font files. | | So I don't know much about font management, but the desired | solution would be something where the font support is compiled | into the executable - I thing that it would be be possible to put the fonts in the library archive, or even build them at run time, as they are generated by programs (see the fonts directory -- but the README does not fully applies anymore), but that would be a bit strange. - A stripped library has 240KB, and the font and map files have 277KBytes. - the freetype library could be a solution, but then the systems where you want plplot to run should have the library. But the xwin driver that you are probably using has no support for freetype (yet -- if you feel that this solution is the best for you, you could add that feature to the driver and contribute the code :-). - you have to "distribute" the plplot library, so why not distribute the fonts also and use PLPLOT_LIB? | or, alternatively, is reliant on the locally | supported fonts such that external fonts are not needed. Is | something like this available? I looked a little at the freetype | configure option, but couldn't find much info on what this is | about. try http://www.freetype.org Joao | | Thanks very much for the help, | --Mike Eldred |