Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"This copy of gnuplot cannot read png/gif/jpeg images" problem

1,257 views
Skip to first unread message

Rich Cook

unread,
May 20, 2013, 10:15:28 PM5/20/13
to
Hello, I am in charge of installing and maintaining gnuplot on our clusters and am by no means an expert. Our user has reported the following is occurring:

gnuplot> plot 'test.png' binary filetype=png with rgbimage
This copy of gnuplot cannot read png/gif/jpeg images


After googling a bit, I have looked in the build log for PNG entrails and see the following:


checking for gdlib-config... /usr/bin/gdlib-config
checking for gdImageCreateTrueColor in -lgd... yes
checking gd.h usability... yes
checking gd.h presence... yes
checking for gd.h... yes
checking for gdImageGif in -lgd... yes
checking for gdImageGifAnimBegin in -lgd... yes
checking for gdImageJpeg in -lgd... yes
checking for gdImageStringFT in -lgd... yes
checking for gdImagePng in -lgd... yes

...

jpeg terminal: yes
gif terminal: yes (with animated gif)
png terminal: yes
(jpeg, gif and png terminals can use TTF fonts)
pdf terminal: no (requires libpdf)
...

cairo-based pdf and png terminals: yes



I don';t understand why gnuplot thinks it cannot handle png files. Can someone help me debug this one?
Thanks.

Rich Cook

unread,
May 20, 2013, 10:17:33 PM5/20/13
to
One more datapoint:

gnuplot> show datafile binary filetypes

This version of gnuplot understands the following binary file types:
avs bin edf ehf gif gpbin jpeg jpg png raw rgb auto

sfeam

unread,
May 21, 2013, 1:15:46 AM5/21/13
to
That seems odd. Please report the output from
gnuplot -e "show version long"

There should be an entry +GD_PNG
If this is present then it indicates that indeed the program should
be able to read png files. If it's missing then I guess something
must have gone wrong with the configure+build at a later stage after
it had already reported that it was going to include png support.
You might have a look in config.log for error messages that mention
libgd. But really the info you show is self-contradictory so I
don't have a good guess at what could be wrong.

Ethan


Rich Cook

unread,
May 21, 2013, 12:13:26 PM5/21/13
to
The output seems confusing. There is no +GD_PNG. But there is -LIBGD. I'm not sure where in the config.log or build process it decided to disable the PNG support.


rcook@rzgpu2 (lclocal.el6): gnuplot -e "show version long"

G N U P L O T
Version 4.6 patchlevel 1 last modified 2012-09-26
Build System: Linux x86_64

Copyright (C) 1986-1993, 1998, 2004, 2007-2012
Thomas Williams, Colin Kelley and many others

gnuplot home: http://www.gnuplot.info
faq, bugs, etc: type "help FAQ"
immediate help: type "help" (plot window: hit 'h')
Compile options:
-READLINE +LIBREADLINE +HISTORY
-BACKWARDS_COMPATIBILITY +BINARY_DATA
-LIBGD
-USE_CWDRC +X11 +X11_POLYGON +MULTIBYTE +X11_EXTERNAL +USE_MOUSE +HIDDEN3D_QUADTREE
+DATASTRINGS +HISTOGRAMS +OBJECTS +STRINGVARS +MACROS +IMAGE +USER_LINETYPES +STATS

GNUPLOT_DRIVER_DIR = "/usr/local/tools/gnuplot-4.6.1/libexec/gnuplot/4.6"
GNUPLOT_PS_DIR = "/usr/local/tools/gnuplot-4.6.1/share/gnuplot/4.6/PostScript"
HELPFILE = "/usr/local/tools/gnuplot-4.6.1/share/gnuplot/4.6/gnuplot.gih"

Rich Cook

unread,
May 21, 2013, 12:16:48 PM5/21/13
to
I also see this in config.log:

GDLIB_CONFIG='/usr/bin/gdlib-config'

And so I tried this:

rcook@rzgpu2 (dpkg-mkdeb.GMTn7fiHG9): /usr/bin/gdlib-config --features
GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON

So the libgd that gnuplot is using has PNG support, I think.

Rich Cook

unread,
May 21, 2013, 12:49:43 PM5/21/13
to
perhaps can someone who is NOT having this problem send me their build output and config.log and config.status?
thanks

sfeam

unread,
May 21, 2013, 2:52:44 PM5/21/13
to
Rich Cook wrote:

> The output seems confusing. There is no +GD_PNG. But there is -LIBGD.

The minus sign indicates libgd support is missing.

> I'm not sure where in the config.log or build process it decided to
> disable the PNG support.

Not just PNG. It's apparently failed to include libgd at all.
There should be a clue in config.log

ab

unread,
May 22, 2013, 3:20:57 AM5/22/13
to
Hello Rich,

some years ago i had problems using the system libgd together with gnuplot.
i solved this by downloading/compiling my own libgd
and run gnuplot configure with

--with-gd=/opt/gd-2.0.35

In my config.log i can find these line related to libgd:
TERMLIBS=' -lreadline -lncurses -lz -lgd -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng12 -lz -lm -ljpeg -lfreetype -lpng'

Rich Cook

unread,
May 23, 2013, 12:44:36 PM5/23/13
to
Thank you. I believe I have found the problem. Our build system occurs on a server farm and I was not loading the GD libraries into the RPM repo there.
0 new messages