When trying to build an RPM from the SRPM, I get the following
(from 2.6) gcc -Wall -Werror -Wstrict-prototypes -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -DSendmail=\""/usr/sbin/sendmail -t"\" -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" -c -o super1.o super1.c cc1: warnings being treated as errors super1.c: In function 'add_internal_bitmap1': super1.c:1146: warning: 'offset' may be used uninitialized in this function make: *** {super1.o} Error 1 error: Bad exit status from /var/tmp/rpm-tmp.7227 (%build)
Note, I had to change the brackets due to the way this blog uses the square ones.
I get similar results from 2.6.2 (just for Detail.c)
Compiles direct from the .tgz work file, and the only difference I can find is the extra "-Wp,-D_FORTIFY_SOURCE=2" option to gcc in the RPM build.
This is on a FC4 box (which only has mdadm-1.11 in the repo).
I hacked around it by removing -Werror from the CWFLAGS in the SPEC file, but wanted to let you know anyway. I'm not so worried about the warnings as it compiles clean direct from the tgz.
heath
