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

Heimdal vs FORTIFY_SOURCE



As I referred to in another mail, my packages build fine on all recent 
versions of Mandriva, and RHEL4, but not on RHEL5.

Compilation fails as follows:
if 
gcc  -DHAVE_CONFIG_H -I. -I. -I../../include  -I../../lib/roken -I../../lib/roken -DBUILD_ROKEN_LIB -I/usr/include/et  -D_FILE_OFFSET_BITS=64 -DTEST_SNPRINTF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fno-omit-frame-pointer -MT 
snprintf_test-snprintf-test.o -MD -MP -MF ".deps/snprintf_test-snprintf-test.Tpo" -c -o 
snprintf_test-snprintf-test.o `test -f 'snprintf-test.c' || 
echo './'`snprintf-test.c; \
        then 
mv -f ".deps/snprintf_test-snprintf-test.Tpo" ".deps/snprintf_test-snprintf-test.Po"; 
else rm -f ".deps/snprintf_test-snprintf-test.Tpo"; exit 1; fi
snprintf.c:541: error: expected declaration specifiers or '...' before numeric 
constant
snprintf.c:541: error: expected declaration specifiers or '...' 
before '__builtin_object_size'
snprintf.c:542: warning: conflicting types for built-in 
function '__builtin___snprintf_chk'
snprintf.c:684: error: expected declaration specifiers or '...' before numeric 
constant
snprintf.c:684: error: expected declaration specifiers or '...' 
before '__builtin_object_size'
snprintf.c:685: warning: conflicting types for built-in 
function '__builtin___vsnprintf_chk'
make[3]: *** [libtest_la-snprintf.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/home/bgmilne/rpm/BUILD/heimdal-1.2/lib/roken'
make[2]: *** [all] Error 2


If I remove "-Wp,-D_FORTIFY_SOURCE=2" from CFLAGS, it builds ... any hints as 
to a better fix?

Regards,
Buchan