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: Jeff Squyres (jsquyres_at_[hidden])
Date: 2009-01-20 09:55:00


Yes, _FORTIFY_SOURCE does a lot of pedantic things -- google around
and you'll find out what it does. FWIW, we had to make some other
changes in OMPI to handle _FORTIFY_SOURCE as well.

On Jan 20, 2009, at 9:17 AM, Jonathan Billings wrote:

> 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.billings_at_[hidden]>
> The College of Language, Science, and the Arts
> LS&A IT - Research Systems and Support
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel

-- 
Jeff Squyres
Cisco Systems