Fixes for GIF, PDF and gnuplot 4.0

This file lists various problems and work arounds when I suceeded in installed gnuplot 4.0.0 (January 2005) on my Linux disk with support for GIF, PNG and PDF output formats, in addition to the (many) default graphic formats it supports.

Fixes

Nb no guarantees!

configure

pdf.trm

configure

configure takes various command line arguments of the form --with-xxx=DIR

The documentation suggests that this will allow you to build gnuplot to use package xxx installed in directory DIR. Generally this does not work if you have package xxx installed system wide. Instead gnuplot is built with the system version of xxx.

I am not expert in scripts:-( but am including my version of configure which has been changed so that gnuplot 4.0 is built with package xxx from the specified directory. There seem to be 3 problems:

  1. when looking for xxx-config $PATH is used, totally ignoring DIR
  2. xxx-config is invoked rather than $XXX_CONFIG
  3. when the images are linked the system libraries are included before those specified by DIR

In order to use PDF need to apply fix HBB FIXME 20040708: to term/pdf.term. Ie replace by "PDF_open_fp(myPDF, gpoutfile)" by "PDF_open_file(myPDF, outstr)" (otherwise "make" fails with "undefined reference to PDF_open_fp in function PDF_init"). Fix down loaded from https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=125907

Before running configure, I installed in non-system directories (using a user account) gd1.4 and PDFlib-Lite-6.0.1 (Use "configure --prefix=/xps/common/packages" to ensure PDFlib-Lite-6.0.1 gets put in non-system area).

Need to create by hand a gdlib-config for gd1.4

configure has only been tested only with --with-gd and --with-pdf ie:

configure --with-gd=/xps/common/packages/gd1.4 
          --with-pdf=/xps/common/packages/bin
          --prefix=/xps/common/packages"

Unresolved problems

No JPEG

Our version of gnuplot 4.0 built with gd1.4 and so supports GIF. It does not support JPEG. I think one needs a version of gdlib that supports both GIF and JPEG, but from my reading of the gnuplot FAQ, I suspect that such a version does not exist. (Our version does support PNG).

gnuplot will not run if PDFlib is a shared dynamic library but not installed

When PDFlib-Lite-6.0.1 was installed (using a non-root user account) ldconfig did not set up dynamic linker run-time bindings for libpdf.so.5.0.1 (the shared libary) however libpdf.so.5.0.1 etc were copied to ...user_area.../lib/ These files had to be removed (leaving ../lib/libpdf.a ) before running "make". Otherwise gnuplot would be linked with libpdf.so.5.0.1 and then fail at run time (or "make check") due to libpdf.so.5.0.1 not being set up as a run-time shared library. Once removed, "make" produced a much larger executable file gnuplot which runs successfully.

Installation tests find bug in Exceed X11 emulator and crashes it

When "make check" is run under Linux (suse) on an ssh terminal (microsoft windowsXP 5.0) using X11 tunnelling and Exceed win32 7.1.0.0, exceed crashes part way through the demonstration of gnuplot's abilities.

gnuplot outputs 1.5 PDF, PDF-latex expects 1.4

Our gnuplot 4.0 generates version 1.5 PDF (set term pdf) Our version of pdflatex "This is pdfTeX, Version 3.14159-1.10a (Web2C 7.4.5) (format=pdflatex 2003.5.8)" fails on: \usepackage{epsfig} \includegraphics{test.pdf} producing fatal error message
loading : Context Support Macros / PDF
)Error: PDF version 1.5 -- xpdf supports version 1.4 (continuing anyway)

Error: pdflatex (file test.pdf): pdf inclusion: found pdf version <1.5>, but at
 most version <1.4> allowed
 ==> Fatal error occurred, the output PDF file is not finished!

Workaround to incompatibility between gnuplot 4.0 and pdflatex

Changed "pdf_minorversion 4" to "pdf_minorversion 5" in pdftex.cfg

Note, Answer 1 (Jody): adding "pdf_inclusion_errorlevel 0" to end of pdftex.cfg DID NOT WORK

Versions down loaded

gnuplot-4.0.0 down loaded 27 Jan 2005 from ftp://ftp.tex.ac.uk/pub/tex/graphics/gnuplot/

gd1.4 down loaded 28 Jan 2005 from ftp://ftp.tex.ac.uk/pub/tex/graphics/gnuplot/

PDFlib-Lite-6.0.1.tar.gz down loaded 1 Feb 2005 from http://www.pdflib.com/products/pdflib/download/601src/PDFlib-Lite-6.0.1.tar.gz

Bug Reported and Fixes Sent

Wed, 02 Feb 2005 13:38:44 GMT
Cf. http://www.gnuplot.info/faq/faq.html


W.B.Langdon 6 Feb 2005