[PATCH] strace: solve ilp32 strace build error
chenzanyu
chenzanyu at huawei.com
Thu Jun 15 09:07:56 UTC 2023
> -----Original Message-----
> From: Dmitry V. Levin <ldv at strace.io>
> Sent: Sunday, March 26, 2023 5:42 AM
> To: chenzanyu <chenzanyu at huawei.com>
> Cc: strace-devel at lists.strace.io
> Subject: Re: [PATCH] strace: solve ilp32 strace build error
>
> On Fri, Mar 24, 2023 at 01:43:49AM +0000, chenzanyu wrote:
> > When constructing, HAVE_ARCH_OLD_TIME64_SYSCALLS SIZEOF_LONG ==
> 8,
> > resulting in failure to build ilp32, need to add SIZEOF_LONG == 4 to fit ilp32
> >
> > The build error log is as follows:
> > ERROR: ilp32-strace-5.14 do_compile: oe_runmake failed
> > ERROR: ilp32-strace-5.14 do_compile:
> ExecutionError('/home/ck/strace/czy/tmp-glibc/work/aarch64_ilp32-
> eulermlilp32-linux-gnu_ilp32/ilp32-strace/5.14/temp/run.do_compile.19077',
> 1, None, None)
> > ERROR: Logfile of failure stored in: /home/ck/strace/czy/tmp-
> glibc/work/aarch64_ilp32-eulermlilp32-linux-gnu_ilp32/ilp32-
> strace/5.14/temp/log.do_compile.19077
> > NOTE: recipe ilp32-strace-5.14: task do_compile: Failed
> >
> > Signed-off-by: chenzanyu <chenzanyu at huawei.com>
> > ---
> > src/arch_defs.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/arch_defs.h b/src/arch_defs.h
> > index bb35252..500212f 100644
> > --- a/src/arch_defs.h
> > +++ b/src/arch_defs.h
> > @@ -66,7 +66,7 @@
> > # endif
> >
> > # ifndef HAVE_ARCH_OLD_TIME64_SYSCALLS
> > -# define HAVE_ARCH_OLD_TIME64_SYSCALLS (SIZEOF_LONG == 8)
> > +# define HAVE_ARCH_OLD_TIME64_SYSCALLS ((SIZEOF_LONG == 4) ||
> (SIZEOF_LONG == 8))
> > # endif
> >
> > # ifndef MIN_KLONGSIZE
>
> The patch to change the default for 32-bit architectures is definitely
> incorrect because none of them used to provide old style time64 syscalls.
>
Excuse me, thank you for the reminder. Do you have any good suggestions?
> What is the ilp32 architecture you're trying to build,
> and why does it provide old style time64 syscalls?
>
strace is built using ilp32 (32-bit integers, long, int, and Pointers are all 32-bit).
It provides old-style time64 system calls because on 64-bit systems,
values of type time_t need to be represented in 64 bits,
while on 32-bit systems, values of type time_t need only be represented in
32 bits. Therefore, in order to support values of type time_t on the ilp32
architecture, you need to use the old-fashioned time64() system call.
>
> --
> ldv
More information about the Strace-devel
mailing list