[Nagiosplug-devel] [ nagiosplug-Bugs-1891183 ] 1.4.11 doesn't compile (2x)

SourceForge.net noreply at sourceforge.net
Mon Feb 11 17:05:41 CET 2008


Bugs item #1891183, was opened at 2008-02-11 15:56
Message generated for change (Comment added) made by henry78
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1891183&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Henry78 (henry78)
Assigned to: Nobody/Anonymous (nobody)
Summary: 1.4.11 doesn't compile (2x)

Initial Comment:
I got this complie error, during 'makeing' nagios-plugins-1.4.11 on RHEL4:

----------8<----------
basename.c: In function `char* base_name(const char*)':
basename.c:95: error: invalid conversion from `void*' to `char*'
make[3]: *** [basename.o] Error 1
---------->8----------

'cause i didn't need it, i removed the part for rewriting windows(?) paths from basename.c.

distclean, configure, make and a similar error occured:

----------8<----------
dirname.c: In function `char* dir_name(const char*)':
dirname.c:79: error: invalid conversion from `void*' to `char*'
make[3]: *** [dirname.o] Error 1
---------->8----------

It's a rewrite of a filename/path there too, but I'm not sure why it throws an Error. The corresponding line 79 from dirname.c:
----------8<----------
  char *dir = xmalloc (length + append_dot + 1);
---------->8----------

----------------------------------------------------------------------

>Comment By: Henry78 (henry78)
Date: 2008-02-11 17:05

Message:
Logged In: YES 
user_id=885432
Originator: YES

No, the test.c doesn't complile. It throws an error:

-----8<-----
test.c:2: error: invalid conversion from `void*' to `char*'
----->8-----

It works if I (double)quote the 'v'.

gcc -v
gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)

----------------------------------------------------------------------

Comment By: Holger Weiss (hweiss)
Date: 2008-02-11 16:57

Message:
Logged In: YES 
user_id=759506
Originator: NO

Odd.  Does compiling the following code using "gcc -o test test.c" work?

/* test.c */
int main(void) { void *v; char *c = v; return 0; }

----------------------------------------------------------------------

Comment By: Henry78 (henry78)
Date: 2008-02-11 16:12

Message:
Logged In: YES 
user_id=885432
Originator: YES

----------8<----------
if gcc -DHAVE_CONFIG_H -I. -I. -I..  -I../intl   -g -O2 -MT dirname.o -MD
-MP -MF ".deps/dirname.Tpo" -c -o dirname.o dirname.c; \
then mv -f ".deps/dirname.Tpo" ".deps/dirname.Po"; else rm -f
".deps/dirname.Tpo"; exit 1; fi
---------->8----------

That's the corresponding compiler command line. I'm pretty sure it uses
gcc...

----------------------------------------------------------------------

Comment By: Holger Weiss (hweiss)
Date: 2008-02-11 16:07

Message:
Logged In: YES 
user_id=759506
Originator: NO

You didn't post the compiler command line which threw the error, but it
seems as if you're using g++ instead of gcc for some reason.  Is the
environment variable CC set to "g++" or something like that?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1891183&group_id=29880




More information about the Devel mailing list