Failure noted on the AutoBuilder for running the SDK sanity test on a qemumips64 multi-lib (64/32) build. The error messages are: | In file included from /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-multilib/build/build/tmp/work/qemumips64-poky-linux-gnun32/core-image-minimal/1.0-r0/testimage-sdk//test.cpp:1:0: | /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-multilib/build/build/tmp/work/qemumips64-poky-linux-gnun32/core-image-minimal/1.0-r0/testimage-sdk/tc/sysroots/mips64-n32-poky-linux-gnun32/usr/include/c++/6.1.1/limits:42:28: fatal error: bits/c++config.h: No such file or directory | #include <bits/c++config.h> | ^ | compilation terminated. | test_gpp2_compile (oeqa.sdk.gcc.GccCompileTest) ... ERROR | In file included from /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-multilib/build/build/tmp/work/qemumips64-poky-linux-gnun32/core-image-minimal/1.0-r0/testimage-sdk/tc/sysroots/mips64-n32-poky-linux-gnun32/usr/include/c++/6.1.1/math.h:36:0, | from /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-multilib/build/build/tmp/work/qemumips64-poky-linux-gnun32/core-image-minimal/1.0-r0/testimage-sdk//test.c:2: | /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-multilib/build/build/tmp/work/qemumips64-poky-linux-gnun32/core-image-minimal/1.0-r0/testimage-sdk/tc/sysroots/mips64-n32-poky-linux-gnun32/usr/include/c++/6.1.1/cmath:41:28: fatal error: bits/c++config.h: No such file or directory | #include <bits/c++config.h> | ^ | compilation terminated. | test_gpp_compile (oeqa.sdk.gcc.GccCompileTest) ... ERROR [See https://autobuilder.yoctoproject.org/main/builders/nightly-multilib/builds/903/steps/Running%20SDK%20Sanity%20Tests/logs/stdio for full log] The build configuration is: MACHINE = "qemumips64" require conf/multilib.conf MULTILIBS = "multilib:lib64 multilib:lib32" DEFAULTTUNE = "mips64-n32" DEFAULTTUNE_virtclass-multilib-lib64 = "mips64" DEFAULTTUNE_virtclass-multilib-lib32 = "mips32r2" To duplicate the bug, the steps to add to nightly-multilib.conf on an AB are: {'CreateAutoConf': {'machine': 'qemumips64', 'SDKMACHINE' : 'x86_64', 'buildhistory' : False, 'distro': 'poky', 'atextappend' : '\nrequire conf/multilib.conf\nMULTILIBS = "multilib:lib64 multilib:lib32"\nDEFAULTTUNE = "mips64-n32"\nDEFAULTTUNE_virtclass-multilib-lib64 = "mips64"\nDEFAULTTUNE_virtclass-multilib-lib32 = "mips32r2"\n'}}, {'BuildImages': {'images': '-c populate_sdk core-image-minimal'}}, {'RunSDKSanityTests': {'images': 'core-image-minimal'}},
I tried to reproduce the problem with: MACHINE="qemumips64" SDKMACHINE="x86_64" require conf/multilib.conf MULTILIBS = "multilib:lib64 multilib:lib32" DEFAULTTUNE = "mips64-n32" DEFAULTTUNE_virtclass-multilib-lib64 = "mips64" DEFAULTTUNE_virtclass-multilib-lib32 = "mips32r2" $ bitbake core-image-minimal -c populate_sdk I received a bunch of warnings /data/master5/poky/build-mips-10142/tmp/sstate-control/manifest-qemumips64-glibc-initial.populate_sysroot not found but the SDK built fine. (Did not check the functionality, just build) I will re-try with pristine build.
I forgot to mention I used the commit 2a859db7a29063c63ff317c27c87eba84f6974d7.
Juro: the SDK builds fine, it's the sanity tests that fail.
(In reply to comment #3) > Juro: the SDK builds fine, it's the sanity tests that fail. d'oh!
Created attachment 3362 [details] g++ 6.1 include search paths
The file c++config.h does exist, but it is not found. When dumping CPP search path, I see some anomalies, i.e. non-existent directories. (See the attached file) steps: 1. install sdk 2. source ~/mips-multilib-10142/environment-setup-mips64-n32-poky-linux-gnun32 3. $CPP -E -x c++ - -v < /dev/null
A few additional observations: MACHINE="qemumips64" SDKMACHINE="x86_64" USER_CLASSES += " testsdk " bitbake core-image-minimal -c populate_sdk bitbake core-image-minimal -c testsdk PASS MACHINE="qemumips64" SDKMACHINE="x86_64" DEFAULTTUNE = "mips64-n32" USER_CLASSES += " testsdk " bitbake core-image-minimal -c populate_sdk bitbake core-image-minimal -c testsdk FAIL The fail is identical to the multilib failure: error: bits/c++config.h: No such file or directory | #include <bits/c++config.h> So strictly speaking, not really a multilib problem.
The root cause of the problem is CPP is not looking into the correct directory to find c++config.h, as it is built with incorrect path. The problem is easy to illustrate with a simple MIPS SDK (no multilib) with explicit tuning: DEFAULTTUNE = "mips64-n32" $ $CPP -E -x c++ - -v < /dev/null ... ignoring nonexistent directory: "<path>/sysroots/mips64-n32-poky-linux-gnun32/usr/include/c++/6.1.1/mips64-poky-linux/." ... The directory where the file is actually located is: <path>/sysroots/mips64-n32-poky-linux-gnun32/usr/include/c++/6.1.1/mips64-poky-linux-gnun32/. Once I created the non-existent directory (as a symlink to the existing to the existing directory), then test.cpp compiles without errors. The remedy would be to build the cross-compiler which searches into correct directory, based on multilib/tuning as opposed to fixed location "mips64-poky-linux. (For multilibs, there can be several directories side by side, corresponding to each compiler. These directories have different contents, so the naming is correct and it is not possible to solve this with symlinks as in the simple case pf a single CPP with "modified" tuning)
It is possible to fix this by adding missing symlinks. The fix is only needed when ${TARGET_OS} = linux-gnun32 (Two variations of symlinks are needed, depending if we are building multilib SDK or not.)
patch sent to the mailing list: http://lists.openembedded.org/pipermail/openembedded-core/2016-August/125883.html
Merged in http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=master-next&id=b7716138735bed474c8d17036b81ddb231c088f4