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.
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 See
config.log' for more detailsI'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!
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.
The compiler was installed on the single-board computer by the manufacturer.
So you would suggest installing a new gcc?
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.
I attached the log to my original post.
if you have any ideas of how exactly I should proceed, I'd be grateful,
Thanks
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.
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?
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.
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
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.
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.
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?