Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 427816 - sys-apps/sandbox: fails to build on arm uclibc because eabi does not support utime syscall
Summary: sys-apps/sandbox: fails to build on arm uclibc because eabi does not support ...
Status: RESOLVED DUPLICATE of bug 425006
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-23 22:01 UTC by Anthony Basile
Modified: 2012-07-24 15:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Remove utime syscall tracing in sandbox (remove-utime-syscall.patch,1.51 KB, patch)
2012-07-23 22:04 UTC, Anthony Basile
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Basile gentoo-dev 2012-07-23 22:01:02 UTC
According to /usr/include/asm/unistd.h, we have:

/*
 * The following syscalls are obsolete and no longer available for EABI.
 */
#if defined(__ARM_EABI__)
#undef __NR_time
#undef __NR_umount
#undef __NR_stime
#undef __NR_alarm
#undef __NR_utime
#undef __NR_getrlimit
#undef __NR_select
#undef __NR_readdir
#undef __NR_mmap
#undef __NR_socketcall
#undef __NR_syscall
#undef __NR_ipc
#endif

So sandbox fails with

 CC     libsandbox_la-libsandbox.lo
../../sandbox-2.5/libsandbox/libsandbox.c: In function 'before_syscall_open_char':
../../sandbox-2.5/libsandbox/libsandbox.c:1161:15: warning: operation on 'mode' may be undefined [-Wsequence-point]
../../sandbox-2.5/libsandbox/libsandbox.c: In function 'before_syscall.part.2':
../../sandbox-2.5/libsandbox/libsandbox.c:984:5: warning: 'debug_log_path' may be used uninitialized in this function [-Wuninitialized]
../../sandbox-2.5/libsandbox/libsandbox.c:945:19: note: 'debug_log_path' was declared here
  CC     libsandbox_la-lock.lo
  CC     libsandbox_la-memory.lo
  GEN    trace_syscalls.h
  CC     libsandbox_la-trace.lo
In file included from ../../sandbox-2.5/libsandbox/trace/common.c:14:0,
                 from ../../sandbox-2.5/libsandbox/trace/os.c:1,
                 from ../../sandbox-2.5/libsandbox/trace.c:24:
./trace_syscalls.h:64:1: error: '__NR_utime' undeclared here (not in a function)
In file included from ../../sandbox-2.5/libsandbox/trace/os.c:6:0,
                 from ../../sandbox-2.5/libsandbox/trace.c:24:
../../sandbox-2.5/libsandbox/trace/linux/arch.c:21:3: warning: #warning "trace: sorry, no support for your architecture" [-Wcpp]
../../sandbox-2.5/libsandbox/trace/common.c:8:13: warning: 'trace_raw_ret' used but never defined [enabled by default]
../../sandbox-2.5/libsandbox/trace.c:12:13: warning: '_do_ptrace' declared 'static' but never defined [-Wunused-function]
../../sandbox-2.5/libsandbox/trace/common.c:6:12: warning: 'trace_sysnum' declared 'static' but never defined [-Wunused-function]
../../sandbox-2.5/libsandbox/trace/common.c:7:12: warning: 'trace_sysnum_regs' declared 'static' but never defined [-Wunused-function]
../../sandbox-2.5/libsandbox/trace/common.c:9:22: warning: 'trace_arg' declared 'static' but never defined [-Wunused-function]
../../sandbox-2.5/libsandbox/trace/linux/common.c:1:13: warning: 'do_peekuser' declared 'static' but never defined [-Wunused-function]
../../sandbox-2.5/libsandbox/trace/linux/common.c:8:13: warning: 'trace_result' defined but not used [-Wunused-function]
make[2]: *** [libsandbox_la-trace.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


The obvious solution is to remove utime from sandbox --- I have a patch which I'll attach --- but I'm not sure where or how to apply this.  You have to test for 1) arch=arm, 2) libc=uclibc and 3) abi=eabi.  Ideally sandbox should check the system for what syscalls are available, but that sounds like a tough problem --- maybe compile tests in configure.ac?




Reproducible: Always
Comment 1 Anthony Basile gentoo-dev 2012-07-23 22:04:59 UTC
Created attachment 319034 [details, diff]
Remove utime syscall tracing in sandbox
Comment 2 Anthony Basile gentoo-dev 2012-07-23 22:06:44 UTC
Sorry for the long cc, not sure who this bug belongs to.
Comment 3 SpanKY gentoo-dev 2012-07-24 15:28:14 UTC

*** This bug has been marked as a duplicate of bug 425006 ***