Patchwork [3/7] logrotate: fix recompile error

login
register
mail settings
Submitter Robert Yang
Date Aug. 7, 2014, 1:40 p.m.
Message ID <226b1ec38d61574b52cbe6c932a4e25ac99b243b.1407418718.git.liezhi.yang@windriver.com>
Download mbox | patch
Permalink /patch/77451/
State Accepted
Commit 866070c78a396f8d394155cfb8845d84aab198f0
Headers show

Comments

Robert Yang - Aug. 7, 2014, 1:40 p.m.
Fixed:
NOTE: make -j 32
make: *** No rule to make target `/path/to/sysroot/4.9.0/include/stddef.h', needed by `logrotate.o'.  Stop.

This happens when upgrade gcc from 4.9.0 to 4.9.1, and the .depend isn't
regenerated when recompile, the content of the .depend are:

[snip]
logrotate.o: /path/to/sysroot/4.9.0/include/stddef.h
[snip]

And Makefile includes the .depend file if it exists, so there would be
errors when /path/to/sysroot/4.9.0/include/stddef.h doesn't exist.

Remove .depend will fix the problem.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/recipes-extended/logrotate/logrotate_3.8.7.bb |    5 +++++
 1 file changed, 5 insertions(+)

Patch

diff --git a/meta/recipes-extended/logrotate/logrotate_3.8.7.bb b/meta/recipes-extended/logrotate/logrotate_3.8.7.bb
index b386b85..3a6a228 100644
--- a/meta/recipes-extended/logrotate/logrotate_3.8.7.bb
+++ b/meta/recipes-extended/logrotate/logrotate_3.8.7.bb
@@ -18,6 +18,11 @@  SRC_URI[sha256sum] = "f6ba691f40e30e640efa2752c1f9499a3f9738257660994de70a45fe00
 
 EXTRA_OEMAKE = ""
 
+do_compile_prepend() {
+    # Make sure the recompile is OK
+    rm -f ${B}/.depend
+}
+
 do_install(){
     oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir}
     mkdir -p ${D}${sysconfdir}/logrotate.d