Summary: | sys-devel/gcc-4.9.2: parallel build failure with config.h | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Thomas Deutschmann (RETIRED) <whissi> |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | benj.crz, bircoph, fedja, gem, mackal.cook |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://gcc.gnu.org/PR61899 | ||
See Also: |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61899 https://bugs.gentoo.org/show_bug.cgi?id=487398 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
gcc-build-logs
build.log emerge --info environment gcc-ar.i |
Description
Thomas Deutschmann (RETIRED)
2015-03-29 23:48:46 UTC
Same problem here: gcc-4.9.2 is installed and active compiler and fails to rebuild (after emul-linux-* unmerge) with the same error. Created attachment 400180 [details]
build.log
Created attachment 400182 [details]
emerge --info
Created attachment 400184 [details]
environment
FYI: On my system it finally succeeded after 9 attempts with the same error. With USE="cilk" build was successful on the first attempt. Built successfully the 2nd time for me, no changes to the use flag (as in still -clik) Not sure worth noting, but the first time sys-devel/gnuconfig was also being updated. Second attempt was just gcc. I had no extra updates both times. the error messages, and your descriptions, make it look like a parallel build issue ... like it's picking up the wrong config.h when you have a failure, try: cd /var/tmp/portage/sys-devel/gcc-4.9.2/work/build/gcc make gcc-ar.o if that still fails, try: make gcc-ar.o CPPFLAGS='-E -dD' and then attach that gcc-ar.o file here (it should be an ascii file) Created attachment 400232 [details]
gcc-ar.i
make gcc-ar.o failed. Here's the requested file and output:
gentoo-buildhost-x64 ~ # cd /var/tmp/portage/sys-devel/gcc-4.9.2/work/build/gcc
gentoo-buildhost-x64 gcc # make gcc-ar.o
/var/tmp/portage/sys-devel/gcc-4.9.2/work/build/./prev-gcc/xg++ -B/var/tmp/portage/sys-devel/gcc-4.9.2/work/build/./prev-gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -nostdinc++ -B/var/tmp/portage/sys-devel/gcc-4.9.2/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -B/var/tmp/portage/sys-devel/gcc-4.9.2/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -isystem /var/tmp/portage/sys-devel/gcc-4.9.2/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -isystem /var/tmp/portage/sys-devel/gcc-4.9.2/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include -isystem /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/libstdc++-v3/libsupc++ -L/var/tmp/portage/sys-devel/gcc-4.9.2/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/var/tmp/portage/sys-devel/gcc-4.9.2/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -c -DEFAULT_SSP -DSTANDARD_STARTFILE_PREFIX=\"../../../\" -DSTANDARD_EXEC_PREFIX=\"/usr/lib/gcc/\" -DSTANDARD_LIBEXEC_PREFIX=\"/usr/libexec/gcc/\" -DDEFAULT_TARGET_VERSION=\"4.9.2\" -DDEFAULT_TARGET_MACHINE=\"x86_64-pc-linux-gnu\" -DSTANDARD_BINDIR_PREFIX=\"/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.2/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\" -DENABLE_SHARED_LIBGCC -DCONFIGURE_SPECS="\"\"" -DTARGET_MACHINE=\"x86_64-pc-linux-gnu\" -DPERSONALITY=\"ar\" -m64 -O2 -pipe -march=sandybridge -mtune=sandybridge -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc -I/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/. -I/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/../include -I/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/../libcpp/include -I/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/../libdecnumber -I/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/../libdecnumber/bid -I../libdecnumber -I/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/../libbacktrace -o gcc-ar.o -MT gcc-ar.o -MMD -MP -MF ./.deps/gcc-ar.TPo /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/gcc-ar.c
In file included from /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/gcc-ar.c:22:0:
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/system.h:506:34: error: conflicting declaration of C function ‘const char* strsignal(int)’
extern const char *strsignal (int);
^
In file included from /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/libstdc++-v3/include/c_global/cstring:42:0,
from /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/system.h:205,
from /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/gcc-ar.c:22:
/usr/include/string.h:563:14: note: previous declaration ‘char* strsignal(int)’
extern char *strsignal (int __sig) __THROW;
^
In file included from /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/../include/hashtab.h:40:0,
from /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/../include/filenames.h:29,
from /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/system.h:630,
from /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/gcc-ar.c:22:
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/../include/ansidecl.h:171:64: error: ambiguating new declaration of ‘char* basename(const char*)’
# define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
^
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/../include/libiberty.h:110:64: note: in expansion of macro ‘ATTRIBUTE_NONNULL’
extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
^
In file included from /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/libstdc++-v3/include/c_global/cstring:42:0,
from /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/system.h:205,
from /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/gcc-ar.c:22:
/usr/include/string.h:600:26: note: old declaration ‘const char* basename(const char*)’
extern "C++" const char *basename (const char *__filename)
^
In file included from /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/system.h:1064:0,
from /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/gcc-ar.c:22:
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h: In function ‘int clz_hwi(long unsigned int)’:
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h:16:30: error: ‘CHAR_BIT’ was not declared in this scope
#define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG)
^
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h:60:35: note: in expansion of macro ‘HOST_BITS_PER_LONG’
# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
^
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h:244:12: note: in expansion of macro ‘HOST_BITS_PER_WIDE_INT’
return HOST_BITS_PER_WIDE_INT;
^
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h: In function ‘int ctz_hwi(long unsigned int)’:
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h:16:30: error: ‘CHAR_BIT’ was not declared in this scope
#define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG)
^
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h:60:35: note: in expansion of macro ‘HOST_BITS_PER_LONG’
# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
^
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h:258:12: note: in expansion of macro ‘HOST_BITS_PER_WIDE_INT’
return HOST_BITS_PER_WIDE_INT;
^
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h: In function ‘int floor_log2(long unsigned int)’:
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h:16:30: error: ‘CHAR_BIT’ was not declared in this scope
#define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG)
^
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h:60:35: note: in expansion of macro ‘HOST_BITS_PER_LONG’
# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
^
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h:295:10: note: in expansion of macro ‘HOST_BITS_PER_WIDE_INT’
return HOST_BITS_PER_WIDE_INT - 1 - clz_hwi (x);
^
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h: In function ‘long int sext_hwi(long int, unsigned int)’:
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h:16:30: error: ‘CHAR_BIT’ was not declared in this scope
#define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG)
^
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h:60:35: note: in expansion of macro ‘HOST_BITS_PER_LONG’
# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
^
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h:328:15: note: in expansion of macro ‘HOST_BITS_PER_WIDE_INT’
if (prec == HOST_BITS_PER_WIDE_INT)
^
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h: In function ‘long unsigned int zext_hwi(long unsigned int, unsigned int)’:
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h:16:30: error: ‘CHAR_BIT’ was not declared in this scope
#define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG)
^
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h:60:35: note: in expansion of macro ‘HOST_BITS_PER_LONG’
# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
^
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/hwint.h:342:15: note: in expansion of macro ‘HOST_BITS_PER_WIDE_INT’
if (prec == HOST_BITS_PER_WIDE_INT)
^
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/gcc-ar.c: In function ‘int main(int, char**)’:
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/gcc-ar.c:139:39: error: ‘LTOPLUGINSONAME’ was not declared in this scope
plugin = find_a_file (&target_path, LTOPLUGINSONAME, R_OK);
^
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/gcc-ar.c:189:35: error: call of overloaded ‘strsignal(int&)’ is ambiguous
exe_name, sig, strsignal (sig),
^
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/gcc-ar.c:189:35: note: candidates are:
In file included from /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/libstdc++-v3/include/c_global/cstring:42:0,
from /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/system.h:205,
from /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/gcc-ar.c:22:
/usr/include/string.h:563:14: note: char* strsignal(int)
extern char *strsignal (int __sig) __THROW;
^
In file included from /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/gcc-ar.c:22:0:
/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/system.h:506:20: note: const char* strsignal(int)
extern const char *strsignal (int);
^
Makefile:1069: recipe for target 'gcc-ar.o' failed
make: *** [gcc-ar.o] Error 1
gentoo-buildhost-x64 gcc # make gcc-ar.o CPPFLAGS='-E -dD'
/var/tmp/portage/sys-devel/gcc-4.9.2/work/build/./prev-gcc/xg++ -B/var/tmp/portage/sys-devel/gcc-4.9.2/work/build/./prev-gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -nostdinc++ -B/var/tmp/portage/sys-devel/gcc-4.9.2/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -B/var/tmp/portage/sys-devel/gcc-4.9.2/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -isystem /var/tmp/portage/sys-devel/gcc-4.9.2/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -isystem /var/tmp/portage/sys-devel/gcc-4.9.2/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include -isystem /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/libstdc++-v3/libsupc++ -L/var/tmp/portage/sys-devel/gcc-4.9.2/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/var/tmp/portage/sys-devel/gcc-4.9.2/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -c -DEFAULT_SSP -DSTANDARD_STARTFILE_PREFIX=\"../../../\" -DSTANDARD_EXEC_PREFIX=\"/usr/lib/gcc/\" -DSTANDARD_LIBEXEC_PREFIX=\"/usr/libexec/gcc/\" -DDEFAULT_TARGET_VERSION=\"4.9.2\" -DDEFAULT_TARGET_MACHINE=\"x86_64-pc-linux-gnu\" -DSTANDARD_BINDIR_PREFIX=\"/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.2/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\" -DENABLE_SHARED_LIBGCC -DCONFIGURE_SPECS="\"\"" -DTARGET_MACHINE=\"x86_64-pc-linux-gnu\" -DPERSONALITY=\"ar\" -m64 -O2 -pipe -march=sandybridge -mtune=sandybridge -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc -I/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/. -I/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/../include -I/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/../libcpp/include -I/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/../libdecnumber -I/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/../libdecnumber/bid -I../libdecnumber -I/var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/../libbacktrace -E -dD -o gcc-ar.o -MT gcc-ar.o -MMD -MP -MF ./.deps/gcc-ar.TPo /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/gcc/gcc-ar.c
thanks, that file shows it is indeed a parallel issue: # 1 "../libdecnumber/config.h" 1 it should be using config.h from $PWD which would pull in auto-host.h which handles things like strsignal probably the fact that gcc/Makefile does: native: config.status auto-host.h build-po $(LANGUAGES) \ $(EXTRA_PROGRAMS) $(COLLECT2) lto-wrapper$(exeext) \ gcc-ar$(exeext) gcc-nm$(exeext) gcc-ranlib$(exeext) ordering of dependencies is not guaranteed. if it's cilk related, my guess is that the cilk config.h was fuller and the gcc dir didn't notice. upstream already has a bug report, so i'll move development there. doesn't look like too much progress has been made yet though. i've backported the upstream fix into 4.8.4 and 4.9.2 http://sources.gentoo.org/gentoo/src/patchsets/gcc/4.8.4/gentoo/93_all_gcc-4.8-config.h-bconfig.h-parallel-PR57125-PR61899.patch?rev=1.1 http://sources.gentoo.org/gentoo/src/patchsets/gcc/4.9.2/gentoo/93_all_gcc-4.9-config.h-bconfig.h-parallel-PR57125-PR61899.patch?rev=1.1 hopefully this should put to bed all bconfig.h/config.h issues ;) Commit message: Add fix from upstream for config.h/bconfig.h parallel build problems http://sources.gentoo.org/sys-devel/gcc/gcc-4.8.4.ebuild?r1=1.4&r2=1.5 http://sources.gentoo.org/sys-devel/gcc/gcc-4.9.2.ebuild?r1=1.15&r2=1.16 *** Bug 545166 has been marked as a duplicate of this bug. *** *** Bug 549638 has been marked as a duplicate of this bug. *** I'm getting the same thing on gcc-4.9.3 Should i open a new bug? (In reply to Gary E. Miller from comment #18) yes. this has been closed for over 6 months w/no new reports. |