Build failure on sparc with gcc4.7
Dmitry V. Levin
ldv at altlinux.org
Fri Jul 29 15:24:34 UTC 2016
On Fri, Jul 29, 2016 at 11:06:24PM +0800, Yun-Chih Chen wrote:
> > On Fri, Jul 29, 2016 at 11:00:28PM +0800, Yun-Chih Chen wrote:
> >> Environment:
> >> OS: Debian Wheezy on qemu-system-sparc64
> >> Kernel: 3.2.0-4-sparc64
> >> gcc: 4.7
> >>
> >> strace commit hash: 6d3162acf, configured without --enable-gcc-Werror.
> >> Because this error happens on ./linux/sparc64/* , I suspect it is
> >> specific to sparc.
> >> Any hint on minimum gcc version? Thanks
> >
> > What's the error? Could you give a link to the log with the error?
>
> as attached, sorry about that
[...]
> /usr/bin/gcc-4.7 -DHAVE_CONFIG_H -I./linux/sparc64 -I./linux/sparc64 -I./linux -I./linux -I. -I. -Wall -Wempty-body -Wformat-security -Wignored-qualifiers -Winit-self -Wlogical-op -Wmissing-parameter-type -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wsign-compare -Wtype-limits -Wwrite-strings -g -O2 -MT strace-syscall.o -MD -MP -MF .deps/strace-syscall.Tpo -c -o strace-syscall.o `test -f 'syscall.c' || echo './'`syscall.c
> In file included from syscall.c:1180:0:
> ./linux/sparc64/arch_regs.c:2:0: warning: "ARCH_PC_REG" redefined [enabled by default]
> In file included from ./linux/sparc64/arch_regs.c:1:0,
> from syscall.c:1180:
> ./linux/sparc/arch_regs.c:3:0: note: this is the location of the previous definition
> syscall.c: In function 'print_pc':
> syscall.c:1203:20: error: 'struct pt_regs' has no member named 'tpc'
> In file included from syscall.c:1337:0:
> ./linux/sparc64/get_scno.c: In function 'arch_get_scno':
> ./linux/sparc64/get_scno.c:8:62: error: 'struct pt_regs' has no member named 'tpc'
> ./linux/sparc64/get_scno.c:11:2: warning: right shift count >= width of type [enabled by default]
> In file included from syscall.c:1342:0:
> ./linux/sparc64/get_error.c: In function 'get_error':
> ./linux/sparc64/get_error.c:4:16: error: 'struct pt_regs' has no member named 'tstate'
These members are present only when gcc compiles for sparc64.
> make[2]: *** [strace-syscall.o] Error 1
> make[2]: Leaving directory `/strace'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/strace'
> make: *** [all] Error 2
Looks like you are trying to build strace for sparc64 using
either 32-bit userspace or gcc that builds for -m32 by default.
Try something like CC='gcc -m64'.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160729/7f77421c/attachment.bin>
More information about the Strace-devel
mailing list