New issue
Advanced search Search tips

Issue 905424 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Nov 15
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug
Build-Toolchain



Sign in to add a comment

GLIBC breakage: 'readdir_r' is deprecated

Project Member Reported by zwisler@google.com, Nov 14

Issue description

First broken release build:

https://cros-goldeneye.corp.google.com/chromeos/healthmonitoring/buildDetails?buildbucketId=8930312117647549584

relevant warnings/errors:

lxc-1.0.7: x86_64-cros-linux-gnu-clang -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -DLXCROOTFSMOUNT=\"/usr/lib/lxc/rootfs\" -DLXCPATH=\"/etc/lxc\" -DLXC_GLOBAL_CONF=\"/etc/lxc/lxc.conf\" -DLXCINITDIR=\"/usr/libexec\" -DLIBEXECDIR=\"/usr/libexec\" -DLXCTEMPLATEDIR=\"/usr/share/lxc/templates\" -DLOGPATH=\"/var/log/lxc\" -DLXC_DEFAULT_CONFIG=\"/etc/lxc/default.conf\" -DLXC_USERNIC_DB=\"/run/lxc/nics\" -DLXC_USERNIC_CONF=\"/etc/lxc/lxc-usernet\" -DDEFAULT_CGROUP_PATTERN=\"/lxc/%n\" -DRUNTIME_PATH=\"/run\" -DSBINDIR=\"/usr/sbin\"      -pthread  -O2 -pipe  -march=corei7 -g -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-strict-aliasing -Wall -Werror -c -o lsm/liblxc_so-lsm.o `test -f 'lsm/lsm.c' || echo './'`lsm/lsm.c
lxc-1.0.7: utils.c:62:10: error: 'readdir_r' is deprecated [-Werror,-Wdeprecated-declarations]
lxc-1.0.7:         while (!readdir_r(dir, &dirent, &direntp)) {
lxc-1.0.7:                 ^
lxc-1.0.7: ../../../../../../../../usr/include/dirent.h:186:28: note: 'readdir_r' has been explicitly marked deprecated here
lxc-1.0.7:      __nonnull ((1, 2, 3)) __attribute_deprecated__;
lxc-1.0.7:                            ^
lxc-1.0.7: ../../../../../../../../usr/include/sys/cdefs.h:385:51: note: expanded from macro '__attribute_deprecated__'
lxc-1.0.7: # define __attribute_deprecated__ __attribute__ ((__deprecated__))
lxc-1.0.7:                                                   ^
lxc-1.0.7: 1 error generated.
lxc-1.0.7: make[3]: *** [Makefile:1277: liblxc_so-utils.o] Error 1
lxc-1.0.7: make[3]: *** Waiting for unfinished jobs....

I suspect this is more fallout due to the GLIBC upgrade.  I'm a bit confused by this because readdir_r was deprecated in GLIBC 2.24 per:

https://sourceware.org/bugzilla/show_bug.cgi?id=19056

and I think we upgraded from GLIBC 2.25 to GLIBC 2.27, but this still seems like the most likely culprit.
 
guado_labstation is using an older version of lxc (1.07), so I probably will have to patch it instead of trying to upgrade it. 

Other boards that build lxc-3.0.2 are fine.


Components: Tools>ChromeOS-Toolchain
Labels: OS-Chrome
arguably lxc shouldn't be building with -Werror in the first place.  upstream Gentoo policy is to never do that.
Cc: benchan@chromium.org
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 15

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/39c8b985667ddf8facc593d245853ac486f2efcc

commit 39c8b985667ddf8facc593d245853ac486f2efcc
Author: Manoj Gupta <manojgupta@google.com>
Date: Thu Nov 15 10:16:36 2018

guado_labstation: Fix lxc to build with glibc 2.27

Backport upstream commit to use readdir instead of readdir_r.
Also include <sys/sysmacros.h> header to avoid major/minor
related errors.

BUG= chromium:905424 
TEST=emerge-guado_labstation lxc works.

Change-Id: Ideab2882a107949f94b8b8a784bc308ec489f4d1
Reviewed-on: https://chromium-review.googlesource.com/1336588
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Ross Zwisler <zwisler@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[rename] https://crrev.com/39c8b985667ddf8facc593d245853ac486f2efcc/project-labstation/app-emulation/lxc/lxc-1.0.7-r1.ebuild
[add] https://crrev.com/39c8b985667ddf8facc593d245853ac486f2efcc/project-labstation/app-emulation/lxc/files/lxc-1.0.7-readdir.patch

Status: Verified (was: Untriaged)

Sign in to add a comment