dev-util/perf-3.8-r1[unwind] fails to compile with those errors under amd64: ---- arch/x86/util/unwind.c:80:7: error: ‘UNW_X86_EDX’ undeclared (first use in this function) case UNW_X86_EDX: ^ arch/x86/util/unwind.c:83:7: error: ‘UNW_X86_ECX’ undeclared (first use in this function) case UNW_X86_ECX: ^ arch/x86/util/unwind.c:86:7: error: ‘UNW_X86_EBX’ undeclared (first use in this function) case UNW_X86_EBX: ^ arch/x86/util/unwind.c:89:7: error: ‘UNW_X86_ESI’ undeclared (first use in this function) case UNW_X86_ESI: ^ arch/x86/util/unwind.c:92:7: error: ‘UNW_X86_EDI’ undeclared (first use in this function) case UNW_X86_EDI: ^ arch/x86/util/unwind.c:95:7: error: ‘UNW_X86_EBP’ undeclared (first use in this function) case UNW_X86_EBP: ^ arch/x86/util/unwind.c:98:7: error: ‘UNW_X86_ESP’ undeclared (first use in this function) case UNW_X86_ESP: ^ arch/x86/util/unwind.c:101:7: error: ‘UNW_X86_EIP’ undeclared (first use in this function) case UNW_X86_EIP: ^ make: *** [arch/x86/util/unwind.o] Error 1 ---- ./arch/x86/util/unwind.c relies on a macro ARCH_X86_64 to determine if it's on amd64 or x86, which is in turn defined according to the ARCH variable passed to make. Unfortunately, the ebuild uses ARCH="$(tc-arch-kernel)" to determine the ARCH passed to make, and tc-arch-kernel() returns "x86" on amd64 systems, leading to the build failure. I did a quick test to change $(tc-arch-kernel) to x86_64, and it works. You guys may have better ways to resolve it, by, for example, creating another tc-arch-kernel function that does the sane thing. Reproducible: Always
Created attachment 360838 [details] build.log
For the impatient, setting ARCH="x86_64" in the ebuild instead of ARCH="$(tc-arch-kernel)" seems to work.
By the way, this is the workaround I use personally: --- /usr/portage/dev-util/perf/perf-3.8-r1.ebuild 2013-10-09 06:46:22.000000000 +0800 +++ /usr/local/portage/dev-util/perf/perf-3.8-r1.ebuild 2013-11-08 22:16:34.780105803 +0800 @@ -123,12 +123,16 @@ puse() { usex $1 "" no; } perf_make() { + local myhost=${CTARGET:-${CHOST}} + local myarch="$(tc-arch-kernel)" + [[ "${myhost}" == x86_64* ]] && myarch=x86_64 + emake -j1 V=1 \ CC="$(tc-getCC)" AR="$(tc-getAR)" \ prefix="/usr" bindir_relative="sbin" \ CFLAGS_OPTIMIZE="${CFLAGS}" \ LDFLAGS_OPTIMIZE="${LDFLAGS}" \ - ARCH="$(tc-arch-kernel)" \ + ARCH="${myarch}" \ NO_DEMANGLE=$(puse demangle) \ NO_LIBAUDIT=$(puse audit) \ NO_LIBPERL=$(puse perl) \
Fix added to the tree.