<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 14, 2014, at 6:25 AM, Juro Bystricky <<a href="mailto:jurobystricky@hotmail.com" class="">jurobystricky@hotmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">I filed a bug report<span class="Apple-converted-space"> </span><br class=""><a href="https://bugzilla.yoctoproject.org/show_bug.cgi?id=7081" target="_blank" class="">https://bugzilla.yoctoproject.org/show_bug.cgi?id=7081</a><br class=""><br class="">I also proposed a fix. The fix is quite safe, it does not affect glibc build,<br class="">only modifies the testing script glibc-testing.inc. <span class="Apple-converted-space"> </span><br class="">Incidentally, I believe there is a tiny bug in glibc-testing.inc:<br class=""><br class="">fgrep tcbootstrap ${B}/config.make > ${B}/configparms<br class=""><br class="">should be<span class="Apple-converted-space"> </span><br class=""><br class="">fgrep tcbootstrap ${B}/config.make >> ${B}/configparms<br class=""><br class="">Otherwise the just entered comments in configparms get immediately wiped-out.<br class=""></div></div></blockquote><div><br class=""></div><div>does it also take care of a case when test are run multiple times from same source base ?</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="">Juro<br class=""><div class=""><hr id="stopSpelling" class="">Subject: Re: [OE-core] Problems running glibc test suite...<br class="">From: <a href="mailto:raj.khem@gmail.com" class="">raj.khem@gmail.com</a><br class="">Date: Tue, 9 Dec 2014 09:39:55 -0800<br class="">CC: <a href="mailto:openembedded-core@lists.openembedded.org" class="">openembedded-core@lists.openembedded.org</a><br class="">To: <a href="mailto:jurobystricky@hotmail.com" class="">jurobystricky@hotmail.com</a><br class=""><br class=""><br class=""><div class=""><blockquote class=""><div class="">On Dec 9, 2014, at 9:08 AM, Juro Bystricky <<a href="mailto:jurobystricky@hotmail.com" class="">jurobystricky@hotmail.com</a>> wrote:</div><br class="ecxApple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><div dir="ltr" class="">I tried to run the glibc test suite and encountered various problems.<br class="">I build glibc as a part of core-image-minimal with libgcc and libstdc++,<span class="ecxApple-converted-space"> </span><br class="">both additional libraries are needed by the glibc test suite.<br class=""><br class="">By far most tests run just fine, but there are several tests that fail<br class="">to build at all. The offenders are:<br class=""><br class="">/elf/tst-unique3cc<br class="">/elf/tst-unique4cc<span class="ecxApple-converted-space"> </span><br class="">/elf/<a href="http://tst-unique3lib.cc/" target="_blank" class="">tst-unique3lib.cc</a><span class="ecxApple-converted-space"> </span><br class="">/elf/<a href="http://tst-unique3lib2.cc/" target="_blank" class="">tst-unique3lib2.cc</a>.<span class="ecxApple-converted-space"> </span><br class=""><br class="">They all fail with an error:<br class=""><br class=""> fatal error: cstdio: No such file or directory<br class=""> #include <cstdio><br class=""><br class="">The obvious reason is that the c++ header files were not found by the g++.<br class="">g++ was invoked with -nostdinc flag, and in that case the path to system include<br class="">files must be specified explicitly.<br class=""><br class="">The failed build is a consequence of a series of unfortunate events.<br class=""><br class="">First, when building the glibc for the first time, configure cannot find g++<span class="ecxApple-converted-space"> </span><br class="">compiler at all. config.log states:<br class=""><br class="">line 1594: arm-poky-linux-gnueabi-g++: command not found<br class="">configure:3165: $? = 127<br class=""><br class="">Secondly, the g++ (which is not found) is then used to determine the location of the<br class="">include headers, resulting in<br class="">CXX_SYSINCLUDES=''<br class=""><br class="">Thirdly, even if g++ is found (it is found when re-building glibc, see below),<br class="">the algorithm used to detect the CXX_SYSINCLUDES does not seem to work and<span class="ecxApple-converted-space"> </span><br class="">the headers are not detected. I "fixed" this by adding the following to git/configure:<br class=""><br class="">@@ -5184,6 +5197,14 @@<br class=""> test "x$cxxheaders" != x &&<br class=""> CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders"<br class=""> done<br class="">+ if test -z "$CXX_SYSINCLUDES"; then<br class="">+ cxxversion=`$CXX -dumpversion`<span class="ecxApple-converted-space"> </span><br class="">+ cxxmachine=`$CXX -dumpmachine`<span class="ecxApple-converted-space"> </span><br class="">+ CXX_SYSINCLUDES=" -isystem $sysheaders/c++/$cxxversion \<br class="">+-isystem $sysheaders/c++/$cxxversion/$cxxmachine"<br class="">+ { $as_echo "$as_me:${as_lineno-$LINENO}: guessing CXX_SYSINCLUDES: $CXX_SYSINCLUDES" >&5<br class="">+$as_echo_n "guessing CXX_SYSINCLUDE: $CXX_SYSINCLUDES... " >&6; }<br class="">+ fi<br class=""> fi<br class=""> fi<br class=""><br class="">After the core-image-minimal is built, by the time the test suite is run, g++ is present,<span class="ecxApple-converted-space"> </span><br class="">but CXX_SYSINCLUDES is still not correct (unless the "fix" above is applied). However,<span class="ecxApple-converted-space"> </span><br class="">not all c++ tests require c++ headers, so some will build correctly. I tested the "fix"<span class="ecxApple-converted-space"> </span><br class="">successfully with qemux86-64, qemumips and qemuarm.<span class="ecxApple-converted-space"> </span><br class="">(qemuarm exposed some additional problems though).<br class=""><br class="">The "fix" is just a proof of concept: with correct CXX system header paths all<span class="ecxApple-converted-space"> </span><br class="">the offending programs build correctly. But this "fix" only works when re-building<span class="ecxApple-converted-space"> </span><br class="">glibc after the core-image-minimal is built.<br class=""><br class="">The g++ compiler is not needed for glibc at all, it is only needed to build<span class="ecxApple-converted-space"> </span><br class="">some of the tests in the testsuite. <span class="ecxApple-converted-space"> </span><a href="https://bugzilla.yoctoproject.org/show_bug.cgi?id=7003%29" target="_blank" class=""></a>Probably worth noting is that glibc cannot DEPEND on<span class="ecxApple-converted-space"> </span><br class="">g++ due to circular dependencies.<br class=""></div></div></div></blockquote><div class=""><br class=""></div><div class="">thats right. glibc is built using a bootstapped cross compiler where we disable c++ support. This is to solve the catch-22 that glibc and gcc have. hence the reason why you miss most of c++ probes.</div><br class=""><blockquote class=""><div class=""><div dir="ltr" style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><div dir="ltr" class=""><br class="">The proper way to fix this would be to initialize CXX_SYSINCLUDES before building/running the test suite<span class="ecxApple-converted-space"> </span><br class="">and not before building the glibc.<br class="">A suitable place for this seems to be recipes-core/glibc/glibc-testing.inc<br class=""></div></div></div></blockquote><div class=""><br class=""></div><div class="">yes. Running the test suites should be done after gcc-cross is built and staged. I would not prefer to doubly build glibc</div><div class="">thats just waste of build time. </div><br class=""><blockquote class=""><div class=""><div dir="ltr" style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><div dir="ltr" class=""><br class="">Any thoughts?<br class=""><br class="">Thanks<br class=""><br class="">Juro<br class=""><br class=""><br class=""></div></div><span style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; display: inline !important;" class="">--<span class="ecxApple-converted-space"> </span></span><br style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><span style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><span style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; display: inline !important;" class="">Openembedded-core mailing list</span><br style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><a href="mailto:Openembedded-core@lists.openembedded.org" style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">Openembedded-core@lists.openembedded.org</a><br style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" target="_blank" style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a></div></blockquote></div></div></div></div></blockquote></div><br class=""></body></html>