Gnuplot doc compilation with MacTeX

Gnuplot doc compilation with MacTeX

Post by Ingo Thie » Fri, 03 Apr 2009 05:14:08


I have installed MacTeX as a replacement for Fink's tetex and now the
Gnuplot 4.2.5 installation routines seem to fail about this. I have
configured the installation path as follows:

configure --with-readline=builtin --prefix=$HOME/localapps/gnuplot_stable

(the first option is due to a "known issue" in Leopard; linebreaks may
be broken due to line length limitations of the mail composer here as
well as in the following messages).

These messages occurred during "make install":

/usr/local/texlive/2008/../texmf-local/tex/latex/gnuplot/gnuplot.cfg: No
such file or directory
make[4]: *** [install-cfg] Error 71
make[3]: *** [install-data-am] Error 2
make[2]: *** [install-am] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1

What strikes me first: Why does Gnuplot attempt to read the gnuplot.cfg
file in the texlive folder? Everything should be in the Gnuplot source
folder, shouldn't?

Gnuplot itself seems to start normally, but I didn't make extended tests
here. While at least the CVS version compiled without problems a couple
of days ago (may even be yesterday) it exits now with the same error

What's going on here?


Gnuplot doc compilation with MacTeX

Post by sfea » Fri, 03 Apr 2009 08:28:30

That's not what the error message means. It is trying to install a
gnuplot-specific file as part of your *** package, so that *** files
produced by the epslatex terminal can be processed automatically.
But the directory it is trying to install into does not exist.

Possible work-around:
Create the directory that it is complaining about by hand.
After that all future gnuplot install commands should be able to find it.


Gnuplot doc compilation with MacTeX

Post by Ingo Thie » Fri, 03 Apr 2009 16:49:49

Hmm, as far as I know gnuplot didn't try anything similar when I
installed the CVS version on my office PC (Linux), otherwise there
should have been messages about missing root rights. But on Linux
everything went well.

Is there a possibility to prevent Gnuplot from installing components
outside the manually defined path (configure) on Mac, i.e. forcing all
additional components to be placed somewhere in the defined folder?


Gnuplot doc compilation with MacTeX

Post by sfea » Sat, 04 Apr 2009 02:05:28

The short answer is: I don't know.

Gnuplot is only installing files where the local configuration tells it
to. Apparently your local configuration is telling it to install into
a strange directory.

For what it's worth, I have this same problem with regard to the
gnuplot's Emacs lisp files. In order to get gnuplot to install without
error, I must ./configure --without-lisp-files
Otherwise the install fails because in fact I have no Emacs directories
since I don't have Emacs installed. Apparently the local configuration
knows where the Emacs files *would* go, if there were any, and tells
the gnuplot autoconfigure script to put the gnuplot lisp template in
the same place.

It would be nice if someone could figure out how to fix both of these
problems, but I've been reporting the Emacs case for several years now
and no one has ever offered me a solution.

Gnuplot doc compilation with MacTeX

Post by Ingo Thie » Sat, 04 Apr 2009 04:00:00

sfeam schrieb:

Do you mean the stuff in .profile or .bashrc?

I have just tested to remove the explicit setting of the texlive path --
no effect. And echo $PATH showed that the texlive path was still
included, even after a new xterm had been opened. The path must be
defined in some else mystical file... I am not that experienced with
Unix outside everyday usage, however.

The funny thing is that it had worked a few days before. I cannot
remember whether it was before I installed MacTeX but I guess it was.
Before that, there wasn't any TeX system installed on that machine. Or
something has changed in the Gnuplot source that caused the different

Does this make gnuplot being installed without any lisp support or does
it just tell gnuplot that no lisp files are currently available (and
thus have to be installed for gnuplot)?

Is there any list available for all these configure options?

Thanks so far anyway,


Gnuplot doc compilation with MacTeX

Post by Hans-Bernh » Sat, 04 Apr 2009 05:09:54

Not really. Those are just your personal settings. System-wide
settings from /etc and various other places are applied, too.

It's not terribly likely that $PATH is relevant here. Other Tex
environment variables like TEXMF are a lot more likely to have caused
this mishap.

Then, in all fairness, maybe it wasn't the best of imaginable ideas to
perform a major installation task like that yourself. TeX is one of the
most complex software packages in your average deskop Unix, after all.

Read the README and INSTALL files. That's what they're there for.

Gnuplot doc compilation with MacTeX

Post by Ingo Thie » Sat, 04 Apr 2009 05:17:49

I have found out now that Gnuplot seems to check whether there is a tex
installation within the path's in the PATH variable. Removing this (by
editing the path variable manually; I did not find out yet whether one
can simply remove a specific path without editing the whole variable)
seems to solve the problem. After installation of Gnuplot one has to add
the removed tex path, of course.

A nice thing thus would be a manually set option that prevents the
gnuplot installer to check for a specific path like

configure --no-check-for-texfolder

or something like that.


Gnuplot doc compilation with MacTeX

Post by sfea » Sat, 04 Apr 2009 05:38:12

That is not quite correct. The install command used by gnuplot is the

if test tex != no ; then \
installdir=`kpsexpand '$TEXMFLOCAL'/tex/latex/gnuplot \
|sed "s%^.*share/%/usr/local/share/%"` ; \
../../mkinstalldirs $installdir ;
if [ ! -f $installdir/gnuplot.cfg ]; then \
/usr/bin/install -c -m 644 ./gnuplot.cfg $installdir/gnuplot.cfg \
&& texhash; \
fi ; \

The relevant bit here is that the directory name is provided by the
tool kpsexpand, which is part of your *** package. So if there is
a configuration error, you should search for it in the documentation
for kpsexpand.

You said that you had recently replaced your *** package with a
different one. Is it possible that kpsexpand is reporting an
obsolete installation directory, and needs to by updated for your
new latex?

Gnuplot doc compilation with MacTeX

Post by sfea » Sat, 04 Apr 2009 05:42:14

Neither of those. The file in question is one that teaches Emacs how
to recognize syntax within a gnuplot command script, so that you can
edit gnuplot script files with syntax markup. Or something like that.
The file is of no use whatsoever unless you are running Emacs.

./configure --help

Gnuplot doc compilation with MacTeX

Post by Ingo Thie » Sat, 04 Apr 2009 16:36:49

Actually, I had *** newly installed on that machine. There wasn't any
TeX system installed before. And the path that causes the trouble (see
the error messages in my first posting) is actually the new one (plus
some obviously invalid extension).

I'd install MacTeX without any user-defined interference. After
temporarily removing the new texlive path the gnuplot.cfg can now be
found in /share/texmf/tex/latex/gnuplot/ in the local directory defined
in the configure options. The same on Linux.

'set term latex' and plotting with it seems to work without errors. But
I should have a look on kpsexpand later.