Bug 10036

Summary: ncurses-native fails at do_install using make 4.2
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: coreAssignee: Juro Bystricky <juro.bystricky>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: juro.bystricky, meta.mr.watcher, meta.watcher, randy.macleod, sgw
Version: 2.1   
Target Milestone: 2.2 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
do_install log
none
Makefile from build/narrowc/misc none

Description Paul Eggleton 2016-07-27 08:43:46 UTC
Created attachment 3324 [details]
do_install log

When I try to build ncurses-native with master on my CentOS 7 build machine it fails at do_install because some .pc files that should have been generated weren't (log attached). I've had this issue repeatedly, cleaning and rebuilding doesn't help, though using make -j1 does - so that would suggest it's a parallel make race. It also doesn't occur on my other Fedora 23 build machine.

I've examined the Makefile but I can't see what could be wrong - it looks like the rule it has the right dependencies to me, but the dependency isn't being run. If it makes any difference, the CentOS 7 machine is using buildtools containing make 4.2.
Comment 1 Paul Eggleton 2016-07-27 08:45:04 UTC
Created attachment 3325 [details]
Makefile from build/narrowc/misc

I'm attaching the Makefile in question for reference.
Comment 2 Juro Bystricky 2016-07-28 00:01:31 UTC
Just to clarify: Is this 100% repeatable?

There used to be a race between install.libs and install.headers, but that's been fixed: 
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=krogoth&id=3b8cd1db0d388e50c010899352f641d66e73279c

(It is possible there are other races as well)
Comment 3 Paul Eggleton 2016-07-28 00:32:38 UTC
Well, I can't say for certain that it's 100%, but I can say it's failed for me every time and I've run it at least six times now.
Comment 4 Randy MacLeod 2016-07-28 15:16:52 UTC
Is this just a missing package that we need to install on the host?

The Wind River Linux distro requires that users install ncurses for:

RH5_x86_64
RH6_x86_64
RH7_x86_64
F19_x86_64
U1004_x86_64
U1204_x86_64
OS121_x86_64
SLED112_x86_64
SLED12_x86_64

For RHEL7/CentOS7, the package is: ncurses-libs.i686  . I don't recall offhand
why the i686 version is needed rather than the 64 bit one but that's consistent across all distros.

If so docs updates should at least include:
http://www.yoctoproject.org/docs/2.1/yocto-project-qs/yocto-project-qs.html
Comment 5 Juro Bystricky 2016-07-28 21:00:46 UTC
So I can easily reproduce the problem (so far 100%) using Ubuntu 14 with make version 4.2.
(Using poky commit 7f9d339a0368cd990b55d2eb8f39b7a6908d6f8a).

Steps to reproduce:
1. Download make 4.2 from https://ftp.gnu.org/gnu/make/
2. Unpack
3. ./configure
4. make
5. sudo make install

Verify make is version 4.2:
$ make --version
GNU Make 4.2
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

...

 
$ bitbake ncurses-native

So not a Centos7 issue, very likely make 4.2 issue, as the problem is not observed with make 3.81
Comment 6 Juro Bystricky 2016-07-28 22:02:20 UTC
So far ncurses-native is the only recipe that fails with make 4.2, so probably the recipe for ncurses has some deficiencies.
Comment 7 Paul Eggleton 2016-07-28 23:31:46 UTC
I noticed the makefile makes use of double-colon rules - I wonder if that's the trigger for this bad behaviour?
Comment 8 Juro Bystricky 2016-07-29 15:54:12 UTC
(In reply to comment #7)
> I noticed the makefile makes use of double-colon rules - I wonder if that's
> the trigger for this bad behaviour?

Yes, that is exactly what I suspect. There don't seem to be any other Makefiles that use '::' (except for all::) , so I am pretty sure that is the culprit.
I think make 4.2 parallelizes rules with '::' , which is, I believe, a bug.
Anyway, about to investigate this today in detail.
Comment 9 Juro Bystricky 2016-07-29 17:43:23 UTC
The problem is fixed with GNU make 4.2.1, see:
https://lists.gnu.org/archive/html/info-gnu/2016-06/msg00005.html

discussion here:
https://lists.gnu.org/archive/html/bug-make/2016-05/msg00026.html