New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 859601 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jul 9
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug
Build-Toolchain



Sign in to add a comment

libchrome: failed to build with glibc 2.27

Project Member Reported by yunlian@chromium.org, Jul 2

Issue description

With glibc 2.27,
emerge-samus libchrome

sandbox/linux/services/proc_util.cc:56:11: error: 'readdir_r' is deprecated [-Werror,-Wdeprecated-declarations]
  while (!readdir_r(dir.get(), &e, &de) && de) {
          ^

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 5

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

commit 780671120a0ddedc79ff9943b06fecb3a9c1fc98
Author: Yunlian Jiang <yunlian@google.com>
Date: Thu Jul 05 19:37:17 2018

libchrome: Remove usage of readdir_r()

readdir_r() is deprecated, which causes build failures when using
glibc-2.24 or newer headers.  This CL replaces usage of readdir_r()
with readdir().

BUG= chromium:859601 
TEST=emerge-samus libchrome with glibc 2.27

Change-Id: Iee2cff3891ae68dcfbd29d5c28b1c479c1b143dd
Reviewed-on: https://chromium-review.googlesource.com/1123066
Commit-Ready: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[add] https://crrev.com/780671120a0ddedc79ff9943b06fecb3a9c1fc98/chromeos-base/libchrome/files/libchrome-395517-Replace-usage-readdir_r.patch
[modify] https://crrev.com/780671120a0ddedc79ff9943b06fecb3a9c1fc98/chromeos-base/libchrome/libchrome-395517.ebuild
[rename] https://crrev.com/780671120a0ddedc79ff9943b06fecb3a9c1fc98/chromeos-base/libchrome/libchrome-395517-r32.ebuild

Status: Fixed (was: Untriaged)
it'd help to note in your commits that readdir_r->readdir is safe for glibc because it guarantees readdir is thread safe, and atm we aren't supporting other C libraries
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 11

The following revision refers to this bug:
  https://chromium.googlesource.com/aosp/platform/external/libchrome/+/536f6cb9217032dfd1d4cdbfc35b5d1c316cec27

commit 536f6cb9217032dfd1d4cdbfc35b5d1c316cec27
Author: Yunlian Jiang <yunlian@google.com>
Date: Wed Jul 11 19:13:08 2018

libchrome: Remove usage of readdir_r()

readdir_r() is deprecated, which causes build failures when using
glibc-2.24 or newer headers.  This CL replaces usage of readdir_r()
with readdir(). Part of it is a cherry-pick of
http://crrev.com/4e33415240d5799

BUG= chromium:859601 
TEST=emerge-samus libchrome with glibc 2.27

Change-Id: If530eeb5faf7748b59fdd7a367a03ff02eaa95a1
Reviewed-on: https://chromium-review.googlesource.com/1123101
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>

[modify] https://crrev.com/536f6cb9217032dfd1d4cdbfc35b5d1c316cec27/base/files/file_enumerator_posix.cc
[modify] https://crrev.com/536f6cb9217032dfd1d4cdbfc35b5d1c316cec27/sandbox/linux/services/proc_util.cc

Sign in to add a comment