libnss in krogoth branch is version 3.21 and it fails to build against glibc 2.24 if warnings are treated as errors, since it uses the deprecated readdir_r. Suggest either patching nss on krogoth or updating it to >= 3.24.
Downstream bug: https://at.projects.genivi.org/jira/browse/GDP-442
Are warnings treated as errors by default? There's a reason we do our best to stop any recipe that does this.
Oh I see, genivi adds -Werror flags back and then is surprised when stuff stops working. Looks like a simple fix Zeeshan, and you have a test environment. Can you send a patch?
(In reply to comment #2) > Are warnings treated as errors by default? There's a reason we do our best > to stop any recipe that does this. "-Werror=deprecated-declarations" specifically seems like a bad idea. I don't object to fixing specific cases depending on the situation but the idea that we would make a promise to never use deprecated APIs in the build is not realistic.
Absolutely, out of all the warnings to make critical that is one I wouldn't have picked...
> Oh I see, genivi adds -Werror flags back and then is surprised when stuff stops working. I see nothing in the bug report that indicates that anyone is "surprised"
> I don't object to fixing specific cases depending on the situation That's all anyone can ask for - that you (we, together) evaluate this case. The deprecation in glibc seems to be due to the implementation of readlink_r being buggy and not thread safe. Some references in the downstream bug Zeeshan linked to as well as which NSS versions have it fixed. >the idea that we would make a promise to never use deprecated APIs in the build is not realistic. Agreed and I don't think anyone is asking for that.
(In reply to comment #3) > Oh I see, genivi adds -Werror flags back and then is surprised when stuff > stops working. > > Looks like a simple fix Zeeshan, and you have a test environment. Can you > send a patch? Yeah, I'm on it.
Patch policy says that fixes go into master and are then backported, so can you verify what releases the upstream fix is integrated into as well please.
(In reply to comment #9) > Patch policy says that fixes go into master and are then backported, so can > you verify what releases the upstream fix is integrated into as well please. IIRC neither master nor morty needs a fix since they use nss 3.24.
Great, please mention that in the patch to krogoth.
Thanks zeenix. (In reply to comment #7) > The deprecation in glibc seems to be due to the implementation of readlink_r > being buggy and not thread safe. I think there's a mistake here though (in addition to the /readdir_r/readlink_r/ typo): readdir() itself is _not_ thread safe by spec. You may be right about the bugs though.
Turns out that Werror is actually being set by the nss package itself for GCC versions >= 4.8: coreconf/Werror.mk: ifndef NSS_ENABLE_WERROR ifeq ($(OS_TARGET),Android) # Android lollipop generates the following warning: # error: call to 'sprintf' declared with attribute warning: # sprintf is often misused; please use snprintf [-Werror] # So, just suppress -Werror entirely on Android NSS_ENABLE_WERROR = 0 $(warning OS_TARGET is Android, disabling -Werror) else ifeq ($(CC_NAME),clang) # Clang reports its version as an older gcc, but it's OK NSS_ENABLE_WERROR = 1 else CC_VERSION := $(subst ., ,$(shell $(CC) -dumpversion)) ifneq (,$(filter 4.8 4.9,$(word 1,$(CC_VERSION)).$(word 2,$(CC_VERSION)))) NSS_ENABLE_WERROR = 1 endif ifeq (,$(filter 0 1 2 3 4,$(word 1,$(CC_VERSION)))) NSS_ENABLE_WERROR = 1 endif ifndef NSS_ENABLE_WERROR $(warning Unable to find gcc 4.8 or greater, disabling -Werror) NSS_ENABLE_WERROR = 0 endif endif endif endif #ndef NSS_ENABLE_WERROR
Patch sent to list.
Commit is in akuster/krogoth-next.
Commit is in krogoth branch (probably has been for some time), closing this. commit cef5f86f43415ce8ca720d62c3d3bb1cb8fadb74 Author: Zeeshan Ali <zeeshanak@gnome.org> Date: Mon Nov 14 10:40:54 2016 +0100 nss: Disable warning on deprecated API usage nss itself enables Werror if gcc is version 4.8 of greater, which fails the build against new glibc (2.24) because of use of readdir_r(), which is now deprecated. Let's just disable warnings on deprecated API usage. https://bugzilla.yoctoproject.org/show_bug.cgi?id=10644 (From OE-Core rev: 6df5997bc0a7f7af73f625b172f99964cfed9f6e)