[csw-maintainers] Use of <stdbool.h> is valid only in a c99 compilation environment.

Sebastian Kayser skayser at opencsw.org
Sun Jul 8 16:28:16 CEST 2012


Hi Romeo,

* Romeo Theriault <romeotheriault at opencsw.org> wrote:
> Hello, I'm trying to build a python package called msgpack-python.
> There are some parts in C that are compiled during the build. Using
> the the Sun 'cc' I get this error when building it:
> 
> "/usr/include/stdbool.h", line 42: #error: "Use of <stdbool.h> is
> valid only in a c99 compilation environment."
> 
> I've googled extensively and have tried piles of different
> "EXTRA_CFLAGS" (e.g.-std=c99, -xc99=all, -D_STDC_C99 ) but to no
> avail. I can't seem to get past this. Does anyone have any suggestion
> on how I might work past this problem?

I am not too familiar with the c99 details, but if changing the flags is
actually the cure to your problem, here's what I'd do. The error message
looks like it's emitted by the preprocessor invocation which can be
tweaked with EXTRA_CPPFLAGS (EXTRA_CFLAGS is passed to the compiler
only). Using that should already give you better results. You can use
"mgar modenv" to verify the invocation flags without actually running
the build.

For how exactly to tweak the flags. Usually there's a good chance that
other people have already run into a similar problem and have solved it.
Try searching the existing build recipes for "99", maybe that gives you
the solution right away.

HTH

Sebastian


More information about the maintainers mailing list