[Buildroot] package "expat" fails to build without a C++ compiler
Vivien Didelot
vivien.didelot at savoirfairelinux.com
Wed Jan 3 16:06:57 UTC 2018
Hi Peter,
Damien Riegel <damien.riegel at savoirfairelinux.com> writes:
>> >> > 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.
>>
>> Ok. CXX actually also points to an available program when C++ support
>> isn't available (it points to 'false').
>>
>> > I guess you have /lib/cpp on your machine and I don't.
>>
>> :/
>>
>> Out of interest, what Distribution are you using?
>
> Arch Linux
I have the same issue for months now and my local fix is the following:
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -266,6 +266,7 @@ TARGET_CONFIGURE_OPTS = \
GCC="$(TARGET_CC)" \
CPP="$(TARGET_CPP)" \
CXX="$(TARGET_CXX)" \
+ CXXCPP="/usr/bin/cpp" \
FC="$(TARGET_FC)" \
F77="$(TARGET_FC)" \
RANLIB="$(TARGET_RANLIB)" \
How would you like this to be properly fixed?
Thanks,
Vivien
More information about the buildroot
mailing list