| Summary: | glibc test suite fails to build some programs | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Juro Bystricky <juro.bystricky> | ||||||
| Component: | core | Assignee: | Juro Bystricky <juro.bystricky> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | Medium | CC: | meta.mr.watcher, meta.watcher | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | 1.8 M4 | ||||||||
| Hardware: | x86 | ||||||||
| OS: | Multiple | ||||||||
| Whiteboard: | |||||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||||
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |||||||
| Attachments: |
|
||||||||
Also tested fine on qemumips. The fix I described previously (but a bit more paranoid) is being tested. The fix is quite safe, it does not affect glibc build at all, it only modifies the testing script. If there are no c++-sysincludes specified in config.make, then the location of the headers is determined by querying the CXX compiler as specified in configparms. If the corresponding folders do exist in the <sysroot> (as specified by configparms as well) then tew value of c++-sysincludes is written to the configparms as well, overriding the previous empty definition. If the config.make contains a value for c++-sysincludes, then it is assumed to be correct and the testing is done as before without any changes. The problem remains also with glibc 2.21. Posted a patch that fixes the problem. Created attachment 2453 [details]
Patch to determine location of g++ system header files
Merged to trunk commit: 47dedbcb52702539b124ecf43cf53e4c3b7b3b33 |
Created attachment 2297 [details] Patch to detect g++ system header files The following programs from the glibc test suite fail to build: /elf/tst-unique3cc /elf/tst-unique4cc /elf/tst-unique3lib.cc /elf/tst-unique3lib2.cc in all cases the error is: fatal error: cstdio: No such file or directory #include <cstdio> The reason is the c++ header files were not found by the g++. g++ was invoked with -nostdinc flag, and in that case the path to system include files must be specified explicitly. The glibc "configure" contains some code to detect the g++ system headers file location, but it does not work correctly. For example, it uses g++ itself to query for the location of the header files, but g++ may not be present at all at the cofigure time. Also, the algorithm used to detect the header file location does not seem to work with g++ anymore. Even if g++ is present the resulting config.log shows: CXX_SYSINCLUDES='' To fix the problem, the location of the include headers should be determined before running the test suite, not before building glibc. The proposed solution modifies /meta/recipes-core/glibc/glibc-testing.inc. The new code cracks "configparms" to get the actual CXX and sysroot used for the glibc test suite, then uses CXX to determine CXX version and CXX machine. Based on the results, it composes a new value for c++-sysincludes and appends "configparms" with the new value. The header locations are assumed to be: sysroot/usr/include/c++/<version> sysroot/usr/include/c++/<version>/<machine> This was so far successfully tested on qemux86-64.