[Buildroot] package "expat" fails to build without a C++ compiler

Damien Riegel damien.riegel at savoirfairelinux.com
Wed Dec 20 20:53:45 UTC 2017


On Wed, Dec 20, 2017 at 09:34:12PM +0100, Peter Korsgaard wrote:
> >>>>> "Damien" == Damien Riegel <damien.riegel at savoirfairelinux.com> writes:
> 
>  > Hi,
>  > I tried to build an image with the "expat" package in it, using a
>  > toolchain without a C++ compiler. It fails with the following error:
> 
>  >   configure: error: in `/home/dkc/src/buildroot/build/build/expat-2.2.4':
>  >   configure: error: C++ preprocessor "/lib/cpp" fails sanity check
> 
>  > Enabling C++ support fixed that error.
> 
> Hmm, can you have a look in expat-2.2.4/config.log to see what exactly
> goes wrong?
> 
> /lib/cpp is from your host toolchain, so enabling or not enabling C++
> support shouldn't matter.

/lib/cpp is the default value for the C++ preprocessor when '$CXX -E'
fails. When activating C++ support, $CXX points to a program that is
actually there, and CXXCPP doesn't default to /lib/cpp. That's why it
builds successfully when I activate C++ support.

I guess you have /lib/cpp on your machine and I don't.

I tried to remove the AC_PROG_CXX macro, but autoreconf complains that
there are C++ sources. They must be in a part of the program that isn't
built by Buildroot.

-- 
Damien


More information about the buildroot mailing list