Menu

gnuplot configure fails on Linux system

2019-01-11
2020-02-06
  • James Gupta

    James Gupta - 2019-01-11

    Hi,
    I'm trying to install gnuplot-5.2.6 on a single-board computer running linux. The gcc compiler is version 3.2.3

    When I try to ./configure, I get the following (fatal) error:
    configure:4462: error: in /bin/gnuplot/gnuplot-5.2.6': configure:4464: error: C preprocessor "/lib/cpp" fails sanity check Seeconfig.log' for more details

    I've attached the config log.

    I thought that maybe my compiler was too old for this version of gnuplot, so I tried installing gnuplot-4.0.0, but it fails with exactly the same message.

    Any help would be much appreciated.

    Thanks!

     
    • Hans-Bernhard Broeker

      Your compiler's not too old. It's just quite severely broken, possibly for a lack of installing all the necessary packages (in applicable versions) to enable compiling C programs on this box.

      The test it is failing is an extremely basic autoconf built-in. It relies on virtually no gnuplot particularities. And the reason it fails is that the compiler cannot find "/usr/include/bits/local_lim.h" --- a system header file.

       
      • James Gupta

        James Gupta - 2019-01-11

        The compiler was installed on the single-board computer by the manufacturer.

        So you would suggest installing a new gcc?

         
        • Hans-Bernhard Broeker

          No, I wasn't suggesting anything like that. I suggest fixing the rest of the installation, which is missing headers that the system itself decided it wanted.

          Do what the error message says: look at that config.log file, to see what file it tried to preprocess, and how that failed.

           
          • James Gupta

            James Gupta - 2019-01-11

            I attached the log to my original post.

            if you have any ideas of how exactly I should proceed, I'd be grateful,

            Thanks

             
  • Ethan Merritt

    Ethan Merritt - 2019-01-11

    You may have installed gcc 4.0 but the log file is still showing gcc version 3.2.3

    Configuration fails because for some weird reason it is looking for the C preprocessor (cpp) in /lib rather than /usr/bin. Also it cannot find file /usr/include/limits.h. Both of these seem to indicate system configuration problems.

    I am guessing that your installation of gcc 4 might fix things, but it won't take effect without additional system reconfiguration.

     
    • James Gupta

      James Gupta - 2019-01-11

      Hi,
      To clarify: I tried installing the older GNUPLOT 4.0.0.

      Any idea how I can get it to look for the C preprocessor in the right place?

       
      • Ethan Merritt

        Ethan Merritt - 2019-01-11

        Oops. I mis-read.
        The gnuplot version is not relevant, the problem seems to be with your C compiler.
        gcc 3.2.3 is from 2003. Do you have the option of installing something a little bit newer than that?

        This might work:
        bash> CPP="/wherever/it/really/is/cpp" ./configure

        But if your PATH is messed up I suspect other things will fail later on in the process.

         
  • James Gupta

    James Gupta - 2019-01-11

    I can try installing a newer compiler. I was hoping to find another way.

    Is it possible that there's no cpp at all? "which cpp" gives nothing

     
    • Ethan Merritt

      Ethan Merritt - 2019-01-11

      So far as I know, it makes no sense to have a C compiler installed without also having the preprocessor installed. Normally they would live in the same place.

       
      • Hans-Bernhard Broeker

        cpp is not required to exist as a directly executable program. The correct way to run the preprocessing step on its own, on any POSIX system, has been "cc -E" for just about forever, which is what autoconf actually tries first.

        But anyway, this is not actually about finding cpp --- it's about the preprocessor failing to find crucial system headers.

         
  • James Gupta

    James Gupta - 2019-01-11

    It looks like limits.h is in
    /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include

    while cc1 cc1plus and cpp0 are in
    /usr/lib/gcc-lib/i486-slackware-linux/3.2.3

    So would I run your bash command telling it to look for cc1?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.