When compiling dev-libs/newt-0.52.15 with CFLAGS option "-frecord-gcc-switches", compilation fails. Reproducible: Always Steps to Reproduce: 1. configure CFLAGS with "-ggdb -frecord-gcc-switches" 2. emerge dev-libs/newt 3. Actual Results: * Package: dev-libs/newt-0.52.15 * Repository: gentoo * Maintainer: naota@gentoo.org * USE: abi_x86_64 amd64 elibc_glibc kernel_linux nls python_targets_python2_7 userland_GNU * FEATURES: nostrip preserve-libs sandbox userpriv usersandbox >>> Unpacking source... >>> Unpacking newt-0.52.15.tar.gz to /tmp/portage/dev-libs/newt-0.52.15/work >>> Source unpacked in /tmp/portage/dev-libs/newt-0.52.15/work >>> Preparing source in /tmp/portage/dev-libs/newt-0.52.15/work/newt-0.52.15 ... * Applying newt-0.52.13-gold.patch ... [ ok ] * Applying newt-0.52.15-snack.patch ... [ ok ] * Applying newt-0.52.14-tcl.patch ... [ ok ] * Running eautoreconf in '/tmp/portage/dev-libs/newt-0.52.15/work/newt-0.52.15' ... * Running aclocal ... [ ok ] * Running autoconf --force ... [ ok ] * Running autoheader ... [ ok ] * Running elibtoolize in: newt-0.52.15/ >>> Source prepared. >>> Configuring source in /tmp/portage/dev-libs/newt-0.52.15/work/newt-0.52.15 ... ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 PYTHONVERS= --without-gpm-support --without-tcl --enable-nls checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... none needed checking for a BSD-compatible install... /usr/bin/install -c checking whether ln -s works... yes checking for grep that handles long lines and -e... /bin/grep checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking for GNU ld... ./configure: line 3253: test: too many arguments yes checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E checking for egrep... /bin/grep -E 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 sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking alloca.h usability... yes checking alloca.h presence... yes checking for alloca.h... yes checking slang.h usability... yes checking slang.h presence... yes checking for slang.h... yes checking popt.h usability... yes checking popt.h presence... yes checking for popt.h... yes checking libintl.h usability... yes checking libintl.h presence... yes checking for libintl.h... yes checking for python versions... python2.7 checking for gettext in -lc... yes configure: creating ./config.status config.status: creating Makefile config.status: creating libnewt.pc config.status: creating config.h >>> Source configured. >>> Compiling source in /tmp/portage/dev-libs/newt-0.52.15/work/newt-0.52.15 ... * python2_7: running building make -j21 -l8 PYTHONVERS=python2.7 x86_64-pc-linux-gnu-gcc -E -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -M test.c testgrid.c testtree.c showchars.c showkey.c whiptail.c dialogboxes.c newt.c button.c form.c checkbox.c entry.c label.c listbox.c scrollbar.c textbox.c scale.c grid.c windows.c buttonbar.c checkboxtree.c > .depend x86_64-pc-linux-gnu-gcc -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -c -o test.o test.c x86_64-pc-linux-gnu-gcc -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -c -o newt.o newt.c x86_64-pc-linux-gnu-gcc -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -c -o button.o button.c x86_64-pc-linux-gnu-gcc -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -c -o form.o form.c x86_64-pc-linux-gnu-gcc -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -c -o checkbox.o checkbox.c x86_64-pc-linux-gnu-gcc -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -c -o entry.o entry.c x86_64-pc-linux-gnu-gcc -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -c -o label.o label.c x86_64-pc-linux-gnu-gcc -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -c -o listbox.o listbox.c x86_64-pc-linux-gnu-gcc -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -c -o scrollbar.o scrollbar.c x86_64-pc-linux-gnu-gcc -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -c -o textbox.o textbox.c x86_64-pc-linux-gnu-gcc -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -c -o scale.o scale.c x86_64-pc-linux-gnu-gcc -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -c -o grid.o grid.c x86_64-pc-linux-gnu-gcc -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -c -o windows.o windows.c x86_64-pc-linux-gnu-gcc -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -c -o buttonbar.o buttonbar.c x86_64-pc-linux-gnu-gcc -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -c -o checkboxtree.o checkboxtree.c x86_64-pc-linux-gnu-gcc -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -c -o whiptail.o whiptail.c x86_64-pc-linux-gnu-gcc -fPIC -c -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -o shared/button.o button.c x86_64-pc-linux-gnu-gcc -fPIC -c -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -o shared/form.o form.c Assembler messages: Fatal error: can't create shared/button.o: No such file or directory x86_64-pc-linux-gnu-gcc -fPIC -c -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -o shared/checkbox.o checkbox.c x86_64-pc-linux-gnu-gcc -fPIC -c -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -o shared/newt.o newt.c mkdir -p shared x86_64-pc-linux-gnu-gcc -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -c -o dialogboxes.o dialogboxes.c x86_64-pc-linux-gnu-gcc -fPIC -c -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -o shared/entry.o entry.c Assembler messages: Fatal error: can't create shared/form.o: No such file or directory x86_64-pc-linux-gnu-gcc -fPIC -c -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -o shared/label.o label.c x86_64-pc-linux-gnu-gcc -fPIC -c -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -o shared/listbox.o listbox.c x86_64-pc-linux-gnu-gcc -fPIC -c -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -o shared/scrollbar.o scrollbar.c x86_64-pc-linux-gnu-gcc -fPIC -c -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -o shared/textbox.o textbox.c x86_64-pc-linux-gnu-gcc -fPIC -c -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -o shared/scale.o scale.c x86_64-pc-linux-gnu-gcc -fPIC -c -O2 -pipe -ggdb -frecord-gcc-switches -march=core-avx2 -D_GNU_SOURCE -I/usr/include/slang -o shared/grid.o grid.c Makefile:131: recipe for target 'shared/button.o' failed make: *** [shared/button.o] Error 2 make: *** Waiting for unfinished jobs.... Makefile:131: recipe for target 'shared/form.o' failed make: *** [shared/form.o] Error 2 * ERROR: dev-libs/newt-0.52.15::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=dev-libs/newt-0.52.15::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-libs/newt-0.52.15::gentoo'`. * The complete build log is located at '/tmp/portage/dev-libs/newt-0.52.15/temp/build.log'. * The ebuild environment file is located at '/tmp/portage/dev-libs/newt-0.52.15/temp/environment'. * Working directory: '/tmp/portage/dev-libs/newt-0.52.15/work/newt-0.52.15' * S: '/tmp/portage/dev-libs/newt-0.52.15/work/newt-0.52.15' Expected Results: Sucessful compilation
Created attachment 405798 [details] emerge-info
Actual cause of the bug seems to be "mkdir -p shared" is executed after "gcc ... -o shared/...", not CFLAGS.
Added a patch into the CVS.