summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorXiaofeng Yan <xiaofeng.yan@windriver.com>2012-05-21 06:59:22 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-14 10:23:47 (GMT)
commit0d0846e06f387caf1c7f0380072f92f5e33e0882 (patch)
tree407c26f14f044823866845a2fb0c66716dcb949a /meta/recipes-core
parent59ac33c77f16b4053ae139101ee43dfb1b09506f (diff)
downloadpoky-0d0846e06f387caf1c7f0380072f92f5e33e0882.tar.gz
ncurses: Avoid occasional builling failure when having parallel processable task
ncurses failure non-gplv3 build (race issue) like the following \ error information: | tic: error while loading shared libraries: /srv/home/pokybuild \ /yocto-autobuilder/yocto-slave/nightly-non-gpl3/build/build/tmp/\ work/x86_64-linux/ncurses-native-5.9-r8.1/ncurses-5.9/narrowc/lib\ /libtinfo.so.5: file too short | ? tic could not build /srv/home/pokybuild/yocto-autobuilder/\ yocto-slave/nightly-non-gpl3/build/build/tmp/work/x86_64-linux/\ ncurses-native-5.9-r8.1/image/srv/home/pokybuild/yocto-autobuilder\ /yocto-slave/nightly-non-gpl3/build/build/tmp/sysroots/x86_64-linux\ /usr/share/terminfo | make[1]: *** [install.data] Error 1 This is a race issue which is caused by install.libs and install.data: 1) install.data needs run tic 2) tic needs libtinfo.so 3) install.libs would regenerate libtinfo.so 4) but install.data doesn't depend on install.libs, and they can run parallelly So there would be errors in a very critical condition: tic is begining to run at the same time when install.libs is generating libtinfo.so, and this libtinfo.so is not integrity, then there would be the above error. Let task install.libs run before install.data for fixing this bug. [YOCTO #2298] (From OE-Core rev: 6993570787a97fbca5ea81513b0120c6d7563484) Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/ncurses/ncurses.inc23
1 files changed, 18 insertions, 5 deletions
diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc
index ae99e2c..b031119 100644
--- a/meta/recipes-core/ncurses/ncurses.inc
+++ b/meta/recipes-core/ncurses/ncurses.inc
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://ncurses/base/version.c;beginline=1;endline=27;md5=cbc
6SECTION = "libs" 6SECTION = "libs"
7DEPENDS = "ncurses-native" 7DEPENDS = "ncurses-native"
8DEPENDS_virtclass-native = "" 8DEPENDS_virtclass-native = ""
9INC_PR = "r8" 9INC_PR = "r9"
10 10
11inherit autotools binconfig multilib_header 11inherit autotools binconfig multilib_header
12 12
@@ -107,10 +107,15 @@ do_test() {
107 diff curses-narrowc.h curses-widec.h 107 diff curses-narrowc.h curses-widec.h
108} 108}
109 109
110# Split original _install_opts to two parts.
111# One is the options to install contents, the other is the parameters \
112# when running command "make install"
110_install_opts = "\ 113_install_opts = "\
114 install.libs install.includes install.man \
115"
116_install_cfgs = "\
111 DESTDIR='${D}' \ 117 DESTDIR='${D}' \
112 PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \ 118 PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \
113 install.libs install.includes install.man \
114" 119"
115 120
116python do_install () { 121python do_install () {
@@ -122,11 +127,19 @@ shell_do_install() {
122 # Order of installation is important; widec installs a 'curses.h' 127 # Order of installation is important; widec installs a 'curses.h'
123 # header with more definitions and must be installed last hence. 128 # header with more definitions and must be installed last hence.
124 # Compatibility of these headers will be checked in 'do_test()'. 129 # Compatibility of these headers will be checked in 'do_test()'.
125 oe_runmake -C narrowc ${_install_opts} \ 130 oe_runmake -C narrowc ${_install_cfgs} ${_install_opts} \
126 install.data install.progs 131 install.progs
132
133 # The install.data should run after install.libs, otherwise
134 # there would be a race issue in a very critical conditon, since
135 # tic will be run by install.data, and tic needs libtinfo.so
136 # which would be regenerated by install.libs.
137 oe_runmake -C narrowc ${_install_cfgs} \
138 install.data
139
127 140
128 ! ${ENABLE_WIDEC} || \ 141 ! ${ENABLE_WIDEC} || \
129 oe_runmake -C widec ${_install_opts} 142 oe_runmake -C widec ${_install_cfgs} ${_install_opts}
130 143
131 cd narrowc 144 cd narrowc
132 145