Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] OpenMPI rpm build 1.3rc3r20226 build failed
From: Jonathan Billings (jsbillin_at_[hidden])
Date: 2009-01-20 09:17:37

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

% 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

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

Jonathan Billings <jonathan.billings_at_[hidden]>
The College of Language, Science, and the Arts
LS&A IT - Research Systems and Support