Description of problem: I attempted to write a trivial RPM .spec file for the package provided at www.libradtran.org. This is a bog-standard './configure' package, and it builds fine from the commandline. However, when I use the %configure from within my .spec file, RPM gets an error during the ./configure run. I look through the output and I see that it has set FFLAGS before calling ./configure, and the FFLAGS contains an "-mtime=..." parameter. This parameter is not permitted with g77, so the ./configure tests all fail. Version-Release number of selected component (if applicable): rpm 4.4.2 on FC5 also tested with rpm 4.4.1 on FC4. How reproducible: Every bloody time :-) Steps to Reproduce: 1. cd $RPM/SOURCES 2. wget http://www.libradtran.org/bin/libRadtran-1.1-beta-1.tar.gz (GPL license) 3. cd ../SPECS 3. wget (attached file: libradtran.spec) 4. rpmbuild -ba libradtran.spec Actual results: [john@cruncher2 SPECS]$ rpmbuild -ba libradtran.spec Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.89959 + umask 022 + cd /home/john/rpmbuild/BUILD + LANG=C + export LANG + unset DISPLAY + cd /home/john/rpmbuild/BUILD + rm -rf libRadtran-1.1-beta + /bin/gzip -dc /home/john/rpmbuild/SOURCES/libRadtran-1.1-beta-1.tar.gz + tar -xf - + STATUS=0 + '[' 0 -ne 0 ']' + cd libRadtran-1.1-beta ++ /usr/bin/id -u + '[' 500 = 0 ']' ++ /usr/bin/id -u + '[' 500 = 0 ']' + /bin/chmod -Rf a+rX,u+w,g-w,o-w . + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.92705 + umask 022 + cd /home/john/rpmbuild/BUILD + cd libRadtran-1.1-beta + LANG=C + export LANG + unset DISPLAY + CFLAGS='-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' + export CFLAGS + CXXFLAGS='-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' + export CXXFLAGS + FFLAGS='-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' + export FFLAGS ++ find . -name config.guess -o -name config.sub + for i in '$(find . -name config.guess -o -name config.sub)' ++ basename ./config.guess + '[' -f /usr/lib/rpm/redhat/config.guess ']' + /bin/rm -f ./config.guess ++ basename ./config.guess + /bin/cp -fv /usr/lib/rpm/redhat/config.guess ./config.guess `/usr/lib/rpm/redhat/config.guess' -> `./config.guess' + for i in '$(find . -name config.guess -o -name config.sub)' ++ basename ./config.sub + '[' -f /usr/lib/rpm/redhat/config.sub ']' + /bin/rm -f ./config.sub ++ basename ./config.sub + /bin/cp -fv /usr/lib/rpm/redhat/config.sub ./config.sub `/usr/lib/rpm/redhat/config.sub' -> `./config.sub' + ./configure --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu defining prefix to be /usr defining exec_prefix to be $(prefix) defining bindir to be $(exec_prefix)/bin defining datadir to be $(prefix)/lib defining datafiledir to be $(datadir)/libRadtran/$(version)/ defining libdir to be $(exec_prefix)/lib checking for i686-redhat-linux-gnu-gcc... no checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking whether gcc needs -traditional... no configure: WARNING: libRadtran has only been tested with gcc, and I can't find it defining GCC_IEEE_FP_FLAG to be checking for AIX... no checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking for library containing strerror... none required checking for working alloca.h... yes checking for alloca... yes checking for an ANSI C-conforming const... yes checking for i686-redhat-linux-gnu-ranlib... no checking for ranlib... ranlib checking for perl... /usr/bin/perl checking for gawk... gawk checking for g77... g77 checking how to get verbose linking output from g77... configure: WARNING: compilation failed checking for Fortran libraries of g77... checking whether g77 uses uppercase external names... no checking whether g77 appends underscores to external names... yes checking g77/f2c compatibility... no checking for f2c... no configure: WARNING: in order to build libRadtran, you must have a compatible configure: WARNING: Fortran compiler or f2c installed and in your path. configure: error: See the file INSTALL for more information. error: Bad exit status from /var/tmp/rpm-tmp.92705 (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.92705 (%build) [john@cruncher2 SPECS]$ Expected results: The RPM package should build through to completion. Additional info:
Created attachment 133845 [details] RPM .spec file for libRadtran
Created attachment 133846 [details] RPM config.log file This file is the log file from my ~/rpmbuild/BUILD/libRadtran-1.1* directory. It shows the FORTRAN error output in a bit more detail.
this probably ought to be filed against redhat-rpm-config, since that's where these (incompatible) flags are coming from. OTOH, redhat-rpm-config likely assumes use of gfortran. Where's g77 coming from here, compat-gcc-g77? If using compat-gcc-* bits, this is likely NOTABUG (ie, you're expected to modify rpmoptflags or make other manual fixes required to make it work).
*** Bug 201849 has been marked as a duplicate of this bug. ***
This report targets the FC3 or FC4 products, which have now been EOL'd. Could you please check that it still applies to a current Fedora release, and either update the target product or close it ? Thanks.
Hi there. Checked with FC5 and appears to be ok now.