Bug 3584 - lsbinitscripts build breaks due to referencing build host files
Summary: lsbinitscripts build breaks due to referencing build host files
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.3
Hardware: All Multiple
: Medium major
Target Milestone: 1.4 M2
Assignee: Saul Wold
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-12-13 08:01 UTC by Wolfgang Denk
Modified: 2013-01-08 22:47 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Denk 2012-12-13 08:01:46 UTC
lsbinitscripts-9.03-r3 fails to build on some systems like tat:

DEBUG: Executing shell function do_compile
NOTE: make -j 4 -e MAKEFLAGS=
make -C src
make[1]: Entering directory `/work/build/eldk-rel-v5.3-2012-12-12-c2836a8-armv4t/tmp/work/armv4t-linux-gnueabi/lsbinitscripts-9.03-r3/initscripts-9.03/src'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/work/build/eldk-rel-v5.3-2012-12-12-c2836a8-armv4t/tmp/work/armv4t-linux-gnueabi/lsbinitscripts-9.03-r3/initscripts-9.03/src'
make -C po
make[1]: Entering directory `/work/build/eldk-rel-v5.3-2012-12-12-c2836a8-armv4t/tmp/work/armv4t-linux-gnueabi/lsbinitscripts-9.03-r3/initscripts-9.03/po'
Makefile:22: *** multiple target patterns.  Stop.
make[1]: Leaving directory `/work/build/eldk-rel-v5.3-2012-12-12-c2836a8-armv4t/tmp/work/armv4t-linux-gnueabi/lsbinitscripts-9.03-r3/initscripts-9.03/po'
make: *** [all] Error 2
ERROR: oe_runmake failed
ERROR: Function failed: do_compile (see /work/build/eldk-rel-v5.3-2012-12-12-c2836a8-armv4t/tmp/work/armv4t-linux-gnueabi/lsbinitscripts-9.03-r3/temp/log.do_compile.6492 for further information)

The Makefile in question looks like this:

...
 13 POTFILES = /etc/ppp/ip* /etc/rc.d/init.d/* /etc/rc.d/rc /etc/rc.d/rc.* \
 14         $(shell ls /etc/sysconfig/network-scripts/* | grep -v ifcfg-) \
 15         /sbin/service /usr/sbin/sys-unconfig /etc/event.d/* /etc/init/*
 16
 17 all: $(NLSPACKAGE).pot $(FMTCATALOGS)
 18
 19 $(NLSPACKAGE).pot:
 20         @echo "Please don't run 'make initscripts.pot unless you have a *FULL*, current install."
 21
 22 new-pot-file-i-really-mean-it: $(POTFILES)
...

The error message "multiple target patterns" indicates that
$(POTFILES) would contain additional colon(s).

Testing on the build host:

$ echo /etc/ppp/ip* /etc/rc.d/init.d/* /etc/rc.d/rc /etc/rc.d/rc.* $(ls /etc/sysconfig/network-scripts/* | grep -v ifcfg-) /sbin/service /usr/sbin/sys-unconfig /etc/event.d/* /etc/init/*
/etc/ppp/ip-down /etc/ppp/ip-down.ipv6to4 ... /etc/sysconfig/network-scripts/route-eth0 /etc/sysconfig/network-scripts/route-eth0:1 ...

It turns out that on this system, we have specific routes set for the
eth0:1 network interface, and this breaks the build.

There are a number of issues here:

1) The Makefile references files from the root file system of the
   build host. This is definitely wrong. Instead, it should reference
   the target root file system only.

2) The way how POTFILES is set up is broken, as there is no
   protection against file names containing colons, which will break
   the build.
Comment 1 Stoicescu Cornel 2012-12-13 17:07:02 UTC
Can you please provide information needed to reproduce this?
-branch:commit or release used
-some details on the environment you are testing (distribution, architecture)
Comment 2 Wolfgang Denk 2012-12-13 18:44:26 UTC
(In reply to comment #1)
> Can you please provide information needed to reproduce this?
> -branch:commit or release used
> -some details on the environment you are testing (distribution, architecture)

Sorry for missing that.

The problem is present with mainline Yocto 1.3 release.

It happens for the core-image-lsb, core-image-lsb-dev, and
core-image-lsb-sdk images.

Best regards,

Wolfgang Denk
Comment 3 Saul Wold 2012-12-18 23:42:50 UTC
Interesting looking into this but, it appears that we only install the functions macros, and no other part of these scripts.

I would expect that we really should disable the compile and possibly ignore this issue, unless we really need to install the rest of the scripts.