Menu

#2024 configure uses /usr/local/share/ regardless of --prefix

None
closed-out-of-date
nobody
None
2024-07-03
2018-02-23
Ryo
No

I've downloaded gnuplot-5.2.2.tar.gz from the official website and tried to install gnuplot under my homedir:

$ ./configure --prefix=$HOME/local/gnuplot-5.2.2
$ mkdir $HOME/local
$ make install

The installation is almost succesfull except

. . . .
make[3]: Nothing to be done for `install-exec-am'.
/bin/mkdir -p '/usr/local/share/texmf/tex/latex/gnuplot'
/bin/mkdir: cannot create directory `/usr/local/share/texmf': Permission denied
make[3]: *** [install-texDATA] Error 1
. . . .

As you can see, make tries to write in /usr/local/share/ . This suggests there is something wrong in the configure script. (I suppose that the --prefix option is designed to set all default paths to be under the directory it specifies.)

I think it's an old version CentOS. uname -a says Linux . . . 2.6.32-696.1.1.el6.x86_64.

Discussion

  • Shigeharu TAKENO

    If you install files for latex to your home directory, please specify it by --with-texdir option. These files should be installed to the directory where your latex command can find them, not gnuplot.

     
    • Ryo

      Ryo - 2018-03-06

      Thank you for your help! I confirm that
      $ PREFIX=$HOME/local/gnuplot-5.2.2
      $ ./configure --prefix=$PREFIX --with-texdir=$PREFIX
      $ make
      $ make install
      works (although the latex feature isn't properly installed).

      But, for future users, shouldn't --with-texdir be optional? I don't think
      $ ./configure --prefix=$PREFIX
      $ make
      $ make install
      should give any errors as long as $PREFIX is writable.

      These files should be installed to the directory
      where your latex command can find them, not gnuplot.

      But there are gnuplot users who don't use latex and therefore I don't think make install should fail because of latex-gunplot users.

      Is it difficult to write the configure script in such a way that errors don't occur even if the latex directories aren't writable?

       
  • GiP

    GiP - 2019-02-21

    There is a similar problem in 5.3:

    $ ./configure --with-texdir=$HOME/gnuplot53/latex --with-prefix=$HOME/gnuplot53
    $ make
    $ make install
    ....
    /usr/bin/mkdir -p '/usr/local/share/gnuplot/5.3/js'
    /usr/bin/mkdir: cannot create directory ‘/usr/local/share/gnuplot’: Permission denied
    ...

    From what I understand that is "jsdir" for the "canvas" terminal and there is no option to set it or to exclude that terminal.

    (I am using Fedora 28 with KDE)

     
    • Hans-Bernhard Broeker

      That's actually an entirely different problem.

      $ ./configure --with-texdir=$HOME/gnuplot53/latex --with-prefix=$HOME/gnuplot53
      

      That command is wrong. It's supposed to be --prefix, not --with-prefix.

       
  • Ethan Merritt

    Ethan Merritt - 2024-07-03
    • status: open --> closed-out-of-date
    • Group: -->
    • Priority: -->
     

Log in to post a comment.