Summary: | dev-libs/nspr-4.8.7: emerge on Intel Mac dies with "failed to detect whether your arch is 64bits or 32bits" | ||
---|---|---|---|
Product: | Gentoo/Alt | Reporter: | Sven Schwyn (svoop) <gentoo> |
Component: | Prefix Support | Assignee: | Gentoo Prefix <prefix> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mozilla |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 354523 |
Description
Sven Schwyn (svoop)
2011-02-11 16:46:53 UTC
(In reply to comment #0) > If I override it with 'myconf="${myconf} --enable-64bit"', the ebuild installs > just fine. > <snip> > ACCEPT_KEYWORDS="~x86-macos" > CBUILD="i686-apple-darwin9" > CHOST="i686-apple-darwin9" This doesn't address the bug report, but I wonder why you want to "--enable-64bit" on a 32bit prefix... (In reply to comment #1) > This doesn't address the bug report, but I wonder why you want to > "--enable-64bit" on a 32bit prefix... You're right, it compiles as well when I drop this enable. @mozilla: could you agree with this change to solve this problem, which occasionally seems to me like a simplification as well? @Sven: could you test this patch if it works for you? =================================================================== RCS file: /var/cvsroot/gentoo-x86/dev-libs/nspr/nspr-4.8.7.ebuild,v retrieving revision 1.1 diff -u -r1.1 nspr-4.8.7.ebuild --- nspr-4.8.7.ebuild 14 Jan 2011 13:37:10 -0000 1.1 +++ nspr-4.8.7.ebuild 12 Feb 2011 13:00:19 -0000 @@ -43,9 +43,9 @@ echo > "${T}"/test.c $(tc-getCC) -c "${T}"/test.c -o "${T}"/test.o - case $(file "${T}"/test.o) in - *64-bit*|*ppc64*|*x86_64*) myconf="${myconf} --enable-64bit";; - *32-bit*|*ppc*|*i386*|*"RISC System/6000"*) ;; + case $(scanelf -BF'%M' "${T}"/test.o)$(scanmacho -BF'%M' "${T}"/test.o) in + ELFCLASS64*|POWERPC64*|X86_64*) myconf="${myconf} --enable-64bit";; + ELFCLASS32*|POWERPC*|I386*|ARM*) ;; *) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";; esac cvs diff: Diffing files The patch works for me, it enters the "ELFCLASS32*|POWERPC*|I386*|ARM*)" clause. @mozilla: I went ahead and committed this change. I hope this is ok with you. If not, please revert and reopen this bug so we can find a solution that works for both of us. Thanks. (In reply to comment #3) > - case $(file "${T}"/test.o) in > + case $(scanelf -BF'%M' "${T}"/test.o)$(scanmacho -BF'%M' "${T}"/test.o) in Not important enough to reopen ATM, just to note: There is no $(scanelf) or $(scanmacho) on AIX and others, so $(file) still feels necessary. |