bug-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gcc4 compilation error


From: Jeff Sheltren
Subject: gcc4 compilation error
Date: Tue, 15 Mar 2005 20:41:59 -0800
User-agent: Microsoft-Entourage/11.0.0.040405

Using gcc 4.0, I am unable to compile cfengine.  Here is what is output
during the build:

----------

if gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include/db4 -I/usr/include
-pthread  -g -O2 -Wreturn-type -Wmissing-prototypes -Wuninitialized -pthread
-O2 -Wall -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -m32 -march=i386 -mtune=pentium4
-I/usr/include/db4 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64   -pthread -O2
-Wall -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -m32 -march=i386 -mtune=pentium4
-I/usr/include/db4 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -MT init.o -MD
-MP -MF ".deps/init.Tpo" -c -o init.o init.c; \
then mv -f ".deps/init.Tpo" ".deps/init.Po"; else rm -f ".deps/init.Tpo";
exit 1; fi
In file included from init.c:33:
cf.extern.h:73: error: array type has incomplete element type
init.c: In function 'CheckWorkDirectories':
init.c:96: warning: too many arguments for format
init.c:116: warning: too many arguments for format
init.c:176: warning: too many arguments for format
init.c:89: warning: ignoring return value of 'chown', declared with
attribute warn_unused_result
init.c:109: warning: ignoring return value of 'chown', declared with
attribute warn_unused_result
init.c:130: warning: ignoring return value of 'chown', declared with
attribute warn_unused_result
init.c:150: warning: ignoring return value of 'chown', declared with
attribute warn_unused_result
init.c:182: warning: ignoring return value of 'chown', declared with
attribute warn_unused_result

----------

Apparently, the definition of OPTIONS[] in cf.extern.h is not allowed since
you can't have an array of incomplete types.  See
http://gcc.gnu.org/ml/gcc/2005-02/msg00053.html for a bit more info.  I am
not quite sure what to change to get this working correctly.

-Jeff






reply via email to

[Prev in Thread] Current Thread [Next in Thread]