Fixes: http://autobuild.buildroot.net/results/2d5/2d55b5d88a06c7b8e6baeb96973009a451e992d9/ http://autobuild.buildroot.net/results/899/89922e61c583cf1d11bd0bafdd5586c35d8f6e15/ http://autobuild.buildroot.net/results/d5b/d5b8fe66ff8d9ea91e87ef6fbe8274f5e24aa7b0/ http://autobuild.buildroot.net/results/89b/89b136e6dced6ca9842a1f23141b0cb999f783da/ .. and many more. Building OLA with a GCC 6 cross-toolchain fails: ``` /usr/bin/arm-linux-g++ -DHAVE_CONFIG_H -I. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I./include -I./include -Wall -Wformat -W -isystem /usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include -pthread -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -pthread -c -o libs/acn/e131_transmit_test.o libs/acn/e131_transmit_test.cpp /usr/bin/arm-linux-g++ -DHAVE_CONFIG_H -I. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I./include -I./include -Wall -Wformat -W -isystem /usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include -pthread -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -pthread -c -o libs/acn/E131TestFramework.o libs/acn/E131TestFramework.cpp In file included from /opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/6.1.0/ext/string_conversions.h:41:0, from /opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/6.1.0/bits/basic_string.h:5402, from /opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/6.1.0/string:52, from ./tools/ola_trigger/config.ypp:2: /opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/6.1.0/cstdlib:75:25: fatal error: stdlib.h: No such file or directory #include_next <stdlib.h> ^ compilation terminated. ``` The C++ library in GCC 6 now provides its own `<stdlib.h>` header that wraps the C library header of the same name, so in `<cstdlib>` the header include ``` #include <stdlib.h> ``` has become ``` #include_next <stdlib.h> ``` `#include_next` is sensitive to the order of directories in the preprocessor's search path, so if that order is changed with `-isystem` then the compiler can't find the right header: ``` [1] /usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include [2] /opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/6.1.0 [..] End of search list. ``` `<cstdlib>` is located in [2] whereas `<stdlib.h>` (C library header) is in [1]. In this case, the `#include_next <stdlib.h>` statement in `<cstdlib>`, located in [2], is evaluated **after** the search path [1], so the compiler does not find the right system header. The problem here is that the OLA build system replaces the `-I` in the CFLAGS from libprotobuf with `-isystem` to fix some warnings treated as errors in the libprotobuf header files. `-isystem` should be used to suppress warnings in system headers only and the libprotobuf header files are not system files. The correct fix is to compile with less restrictions and remove `-Werror` for the build. This is already done by passing `--disable-fatal-warnings` to OLA. Fix the reordering of the GCC search paths by removing the replacement of `-I` with `-isystem`. Upstream status: https://github.com/OpenLightingProject/ola/pull/1126 Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> |
||
---|---|---|
arch | ||
board | ||
boot | ||
configs | ||
docs | ||
fs | ||
linux | ||
package | ||
support | ||
system | ||
toolchain | ||
.defconfig | ||
.gitignore | ||
CHANGES | ||
Config.in | ||
Config.in.legacy | ||
COPYING | ||
DEVELOPERS | ||
Makefile | ||
Makefile.legacy | ||
README |
Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation. The documentation can be found in docs/manual. You can generate a text document with 'make manual-text' and read output/docs/manual/manual.text. Online documentation can be found at http://buildroot.org/docs.html To build and use the buildroot stuff, do the following: 1) run 'make menuconfig' 2) select the target architecture and the packages you wish to compile 3) run 'make' 4) wait while it compiles 5) find the kernel, bootloader, root filesystem, etc. in output/images You do not need to be root to build or run buildroot. Have fun! Buildroot comes with a basic configuration for a number of boards. Run 'make list-defconfigs' to view the list of provided configurations. Please feed suggestions, bug reports, insults, and bribes back to the buildroot mailing list: buildroot@buildroot.org You can also find us on #buildroot on Freenode IRC. If you would like to contribute patches, please read https://buildroot.org/manual.html#submitting-patches