Closed openhpi2 closed 8 years ago
Diff:
--- old
+++ new
@@ -1,4 +1,4 @@
-make rpm fials with below error in RHEL7 and gcc version 4.7.3
+make rpm fails with below error in RHEL7 and gcc version 4.7.2
<stdin>:1:0: fatal error: stdout: Bad file descriptor
compilation terminated.
Original comment by: hemanthreddy
Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --disable-build-with-cxx --disable-build-poststage1-with-cxx --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --without-ppl --without-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.7.2 20121109 (Red Hat 4.7.2-8) (GCC)
Original comment by: hemanthreddy
Original comment by: dr_mohan
Michele Baldessari sent the following information the issue you're seeing is because on RHEL7 in /usr/lib/rpm/rpmrc there is the following set of CFLAGS: %__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches %{_hardened_cflags} %{_performance_cflags}
The issue is with "-Wp,-D_FORTIFY_SOURCE=2" because in the spec you do: find . -type f -name "Makefile" | xargs -n1 sed -i -e 's/-D_FORTIFY_SOURCE=2//g;'
And that will leave '-Wp,' which is confusing gcc and making it wait for data on stdin.
I'm not sure why you disable FORTIFY_SOURCE, but either you can fix the sed command to remove -Wp or you leave FORTIFY_SOURCE (and potentially fix any fallouts from it)
Original comment by: dr_mohan
Original comment by: dr_mohan
Fixed with checkin #7604
Original comment by: dr_mohan
make rpm fails with below error in RHEL7 and gcc version 4.7.2