New issue
Advanced search Search tips

Issue 846398 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug

Blocking:
issue 834385



Sign in to add a comment

minijail: failed to build with glibc 2.27

Project Member Reported by yunlian@chromium.org, May 24 2018

Issue description

When building minijail with glibc 2.27, I got

In file included from /var/tmp/portage/chromeos-base/minijail-9999/work/minijail-9999/signal_handler.c:16:
In file included from /usr/include/signal.h:57:
In file included from /usr/include/bits/types/siginfo_t.h:6:
/usr/include/bits/types/__sigval_t.h:24:7: error: redefinition of 'sigval'
union sigval
      ^
/usr/include/asm-generic/siginfo.h:7:15: note: previous definition is here
typedef union sigval {
              ^
In file included from /var/tmp/portage/chromeos-base/minijail-9999/work/minijail-9999/signal_handler.c:16:
In file included from /usr/include/signal.h:57:
/usr/include/bits/types/siginfo_t.h:58:14: error: expected ';' at end of declaration list
            __pid_t si_pid;     /* Sending process ID.  */
                    ^
/usr/include/asm-generic/siginfo.h:122:26: note: expanded from macro 'si_pid'
#define si_pid          _sifields._kill._pid

 
This appears to mean that glibc is finally exposing that struct that we had to redefine because it wasn't exposed before. Fix should be to remove our declaration if we're on glibc >= 2.27.

Comment 2 by keescook@google.com, May 25 2018

This is what I used in the kernel to check it:

#if !__GLIBC_PREREQ(2, 26)
# include <asm/siginfo.h>
# define __have_siginfo_t 1
# define __have_sigval_t 1
# define __have_sigevent_t 1
#endif

I think it'll need to be changed slightly to work correctly with non-glibc compiles.

Comment 3 by keescook@google.com, May 25 2018

#if !defined(__GLIBC__) || !__GLIBC_PREREQ(2, 26)

I'll need to fix this in the kernel too...
Components: OS>Packages
Labels: OS-Chrome
Owner: vapier@chromium.org
Status: Fixed (was: Untriaged)
fixed via https://android-review.googlesource.com/696924
Project Member

Comment 5 by bugdroid1@chromium.org, Jun 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/8c0eef99faa1b52a940902128e4e8212f04b3248

commit 8c0eef99faa1b52a940902128e4e8212f04b3248
Author: Yunlian Jiang <yunlian@google.com>
Date: Tue Jun 19 21:38:50 2018

minijail: Uprev Minijail to make it build with glibc 2.27

Pulled 8 new changes from platform/external/minijail: (ebuild: chromeos-base/minijail)

0e66f47 OWNERS: add lhchavez@
07ba090 HACKING: convert to markdown
30f9bb0 Inspect arguments of mmap and mprotect
5b184a6 Fix aarch64 test failure.
b40895c rewrite si_syscall compat hack
33d051a stop using "nr" for signal numbers
d9ef07c clean up & unify compiler attributes
85e7a26 Mark as recovery_available:true

BUG= chromium:846398 
TEST=sudo emerge minijail with glibc 2.27

Change-Id: I65c1bc92979d8f3cf949699f968467172f9a9cd9
Reviewed-on: https://chromium-review.googlesource.com/1104873
Commit-Ready: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[rename] https://crrev.com/8c0eef99faa1b52a940902128e4e8212f04b3248/chromeos-base/minijail/minijail-1-r15.ebuild

Comment 6 by vapier@chromium.org, Jun 21 2018

Components: -OS>Packages OS>Systems>Minijail

Comment 7 by vapier@chromium.org, Jun 21 2018

Cc: benchan@chromium.org vapier@chromium.org
 Issue 358863  has been merged into this issue.

Sign in to add a comment