Number: 1080
Title: "sfexit.c", line 101: identifier redeclared: exit
Submitter: Don Pellegrino
Date: Wed Feb 7 15:28:47 2007
Subsys: Build/Installation
Version: 2.12
System: Sparc-Solaris-8
Severity: critical
Using the Sun Studio 11 C compiler on Solaris 8:

% cc -V
cc: Sun C 5.8 2005/10/13

I encounter the following "identifier redeclared" error during the build:

cc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../lib/ast -I/usr/local/include -Dvt_threaded=0 -g -c sfexit.c -KPIC -DPIC -o .libs/sfexit.o "sfexit.c", line 57: warning: old-style declaration or incorrect type for: atexit "sfexit.c", line 101: warning: old-style declaration or incorrect type for: exit "sfexit.c", line 101: identifier redeclared: exit current : function(int) returning int previous: function(int) returning void : "/usr/include/iso/stdlib_iso.h", line 100 "sfexit.c", line 137: warning: old-style declaration or incorrect type for: waitpid cc: acomp failed for sfexit.c

It seems this bit of code is attempting to redefine exit with a different signature. This is done within the lib/sfio directory.
[erg] In any recent C environment, sfexit.c should basically be empty since the atexit() function should be available with the system. Something must be going wrong with how FEATURE/sfio is being generated.

[donald] I have three files for sfio in my graphviz-2.12 source directory:

[lb9566@esdbdv  2:58PM ~/software/graphviz-2.12]% find . -name "sfio"

I do not have a ./lib/sfio/FEATURE/sfio file. My ./FEATURE/sfio file is empty.

[erg] Sorry, I forgot that, in the released version, the sfio file is in ./FEATURE rather than in ./lib/sfio/FEATURE.

Anyway, the problem is that ./FEATURE/sfio is empty. When make is run in ./lib/sfio, one of the first things it does is to generate the FEATURE/sfio file, which contains various #defines given system-dependent information.

You might try removing ./FEATURE/sfio and then cd to lib/sfio and run make again. Early in the process you should see a command like

../../../iffe - set cc icc : run ../../../lib/sfio/features/sfio > ../../../FEATURE/sfio

Since FEATURE/sfio is being created, this line is probably being executed, but it may be failing for some reason. You might try running it by hand. If you are in the lib/sfio directory, you can run

../../iffe - set cc icc : run features/sfio > ../../FEATURE/sfio

You may need to replace 'icc' with the value used by your make; this is just the C compiler being used on your machine.

If you see where the process is failing or if you see any error messages, please let us know.
Owner: erg
Status: *