Unable to compile nagios-plugins-1.4.3

I run ./configure and get the following;

[blockquote]
checking how to run the C++ preprocessor… /lib/cpp
configure: error: C++ preprocessor “/lib/cpp” fails sanity check
See `config.log’ for more details.
[/blockquote]

My config.log shows this;

[blockquote]
conftest.c:2: error: syntax error before “me”

configure:3004: $? = 1

configure: failed program was:

| #ifndef __cplusplus

| choke me

| #endif

configure:3139: checking dependency style of gcc

configure:3229: result: gcc3

configure:3252: checking how to run the C preprocessor

configure:3287: gcc -E conftest.c

configure:3293: $? = 0

configure:3325: gcc -E conftest.c

conftest.c:12:28: ac_nonexistent.h: No such file or directory

configure:3331: $? = 1

configure: failed program was:

| /* confdefs.h. */

|

| #define PACKAGE_NAME “nagios-plugins”

| #define PACKAGE_TARNAME “nagios-plugins”

| #define PACKAGE_VERSION “1.4.3”

| #define PACKAGE_STRING “nagios-plugins 1.4.3”

| #define PACKAGE_BUGREPORT “”

| #define PACKAGE “nagios-plugins”

| #define VERSION “1.4.3”

| #define _GNU_SOURCE 1

| /* end confdefs.h. */

| #include <ac_nonexistent.h>

configure:3370: result: gcc -E

configure:3394: gcc -E conftest.c

configure:3400: $? = 0

configure:3432: gcc -E conftest.c

conftest.c:12:28: ac_nonexistent.h: No such file or directory

configure:3438: $? = 1

configure: failed program was:

| /* confdefs.h. */

[/blockquote]

I’m told this means it’s missing header files. Should I have to alter the C to make this work? I’m on RHEL4, u02.

Chris

Have got round this problem without fixing it. I downloaded, compiled + installed nagios-plugins-1.3.1 and it worked without any problems.

Bug in the code? Or maybe my system has some horrible problem (more likely I guess).

I have run into the same issue. I’m running Ubuntu 6.06 and my /lib/cpp is linked to /etc/alternatives/cpp.

Answer: check for g++ as it is probably not installed.