<p dir="ltr">whats native glibc version on build host</p>
<p dir="ltr">-Khem</p>
<div class="gmail_quote">On Mar 25, 2014 6:19 PM, "Robert Yang" <<a href="mailto:liezhi.yang@windriver.com">liezhi.yang@windriver.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Hi Khem,<br>
<br>
I got an error on CentOS 5.10, seems caused by this patch:<br>
<br>
| /home/build/lyang1/testre/<u></u>bitbake_build/tmp/work/x86_64-<u></u>linux/util-linux-native/2.24.<u></u>1-r0/util-linux-2.24.1/sys-<u></u>utils/unshare.c: In function 'main':<br>
| /home/build/lyang1/testre/<u></u>bitbake_build/tmp/work/x86_64-<u></u>linux/util-linux-native/2.24.<u></u>1-r0/util-linux-2.24.1/sys-<u></u>utils/unshare.c:151: error: 'MS_PRIVATE' undeclared (first use in this function)<br>
| /home/build/lyang1/testre/<u></u>bitbake_build/tmp/work/x86_64-<u></u>linux/util-linux-native/2.24.<u></u>1-r0/util-linux-2.24.1/sys-<u></u>utils/unshare.c:151: error: (Each undeclared identifier is reported only once<br>
| /home/build/lyang1/testre/<u></u>bitbake_build/tmp/work/x86_64-<u></u>linux/util-linux-native/2.24.<u></u>1-r0/util-linux-2.24.1/sys-<u></u>utils/unshare.c:151: error: for each function it appears in.)<br>
| /home/build/lyang1/testre/<u></u>bitbake_build/tmp/work/x86_64-<u></u>linux/util-linux-native/2.24.<u></u>1-r0/util-linux-2.24.1/sys-<u></u>utils/unshare.c:151: error: 'MS_REC' undeclared (first use in this function)<br>
| make[2]: *** [sys-utils/unshare.o] Error 1<br>
<br>
We can add the following lines to util-linux/sys-utils/unshare.c as a<br>
workaround:<br>
<br>
#ifndef MS_PRIVATE<br>
#define MS_PRIVATE (1<<18) /* 262144 Private*/<br>
#endif<br>
<br>
#ifndef MS_REC<br>
#define MS_REC 0x4000 /* 16384: Recursive loopback */<br>
#endif<br>
<br>
#ifndef MS_NOSUID<br>
#define MS_NOSUID 2 /* Ignore suid and sgid bits */<br>
#endif<br>
<br>
#ifndef MS_NOEXEC<br>
#define MS_NOEXEC 8 /* Disallow program execution */<br>
#endif<br>
<br>
#ifndef MS_NODEV<br>
#define MS_NODEV 4 /* Disallow access to device special files */<br>
#endif<br>
<br>
Do you have any ideas, please ?<br>
<br>
// Robert<br>
<br>
On 03/16/2014 01:42 PM, Khem Raj wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This patch actually makes sense for uclibc more than glibc<br>
since if we did not cache scanf_cv_alloc_modifier configure<br>
test will determine it correctly for glibc but the test does<br>
not do proper job when uclibc is involved the reason is it<br>
depends on define __GLIBC_ and uclibc unfortunately poses as<br>
glibc and defines this variable.<br>
<br>
%m is implemented in uclibc as well and we enable it so caching value of<br>
'ms' specifier is going to work across all libcs<br>
<br>
This fixes mounting errors we see with util-linux/mount on<br>
uclibc/systemd<br>
<br>
Mar 16 01:46:40 qemux86 systemd-remount-fs[124]: /bin/mount: /proc/self/mountinfo: parse error: ignore entry at line 21.<br>
Mar 16 01:46:40 qemux86 systemd-remount-fs[124]: /bin/mount: /proc/self/mountinfo: parse error: ignore entry at line 22.<br>
Mar 16 01:46:40 qemux86 systemd-remount-fs[124]: /bin/mount: can't find / in /etc/fstab<br>
<br>
Signed-off-by: Khem Raj <<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>><br>
---<br>
meta/recipes-core/util-linux/<a href="http://util-linux_2.24.1.bb" target="_blank">u<u></u>til-linux_2.24.1.bb</a> | 3 ++-<br>
1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/meta/recipes-core/util-<u></u>linux/<a href="http://util-linux_2.24.1.bb" target="_blank">util-linux_2.24.1.bb</a> b/meta/recipes-core/util-<u></u>linux/<a href="http://util-linux_2.24.1.bb" target="_blank">util-linux_2.24.1.bb</a><br>
index b08d68d..aa98b65 100644<br>
--- a/meta/recipes-core/util-<u></u>linux/<a href="http://util-linux_2.24.1.bb" target="_blank">util-linux_2.24.1.bb</a><br>
+++ b/meta/recipes-core/util-<u></u>linux/<a href="http://util-linux_2.24.1.bb" target="_blank">util-linux_2.24.1.bb</a><br>
@@ -17,7 +17,8 @@ SRC_URI += "file://util-linux-ng-replace-<u></u>siginterrupt.patch \<br>
SRC_URI[md5sum] = "<u></u>88d46ae23ca599ac5af9cf96b53159<u></u>0f"<br>
SRC_URI[sha256sum] = "<u></u>835eb6232cfab0118ef2e4fd649de0<u></u>ba9f5bd1b8cbf9a7d4d84594541dec<u></u>8410"<br>
<br>
-CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=as"<br>
+CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"<br>
+<br>
EXTRA_OECONF_class-native = "${SHARED_EXTRA_OECONF} \<br>
--disable-fallocate --disable-use-tty-group \<br>
"<br>
<br>
</blockquote>
</blockquote></div>