I believe the situation that is causing the error has to do with GCC's
FORTIFY_SOURCE.  I'm building under CentOS 5.2 using the 1.3 src.rpm
available on the website:

% gcc -DHAVE_CONFIG_H -I. -I.. -I../tools/opari/lib -I../extlib/otf/otflib 
-I../extlib/otf/otflib -D_GNU_SOURCE -DBINDIR=\"/usr/bin\" 
-DDATADIR=\"/usr/share\" -DRFG  -DVT_MEMHOOK -DVT_IOWRAP -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -MT vt_iowrap.o -MD -MP -MF 
.deps/vt_iowrap.Tpo -c -o vt_iowrap.o vt_iowrap.c 
vt_iowrap.c:1242: error: expected declaration specifiers or β€˜...’
before numeric constant
vt_iowrap.c:1243: error: conflicting types for β€˜__fprintf_chk’

% 
(compile fails)

I cd into the appropriate area, and re-run the gcc without
-D_FORTIFY_SOURCE=2:

% gcc -DHAVE_CONFIG_H -I. -I.. -I../tools/opari/lib -I../extlib/otf/otflib 
-I../extlib/otf/otflib -D_GNU_SOURCE -DBINDIR=\"/usr/bin\" 
-DDATADIR=\"/usr/share\" -DRFG  -DVT_MEMHOOK -DVT_IOWRAP -O2 -g -pipe -Wall 
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic 
-MT vt_iowrap.o -MD -MP -MF .deps/vt_iowrap.Tpo -c -o vt_iowrap.o vt_iowrap.c

% 
(compile succeeds)

If I change the spec file to remove the -D_FORTIFY_SOURCE define from
RPM_OPT_FLAGS (like what is done for non-gcc compilers) the build
succeeds.

It appears that the additional define is more strict and causes
problems when the default RPM build environment is kept intact.

-- 
Jonathan Billings <jonathan.billi...@umich.edu>
The College of Language, Science, and the Arts
LS&A IT - Research Systems and Support

Reply via email to