[racket-dev] Racket head fails to compile

From: Paulo Matos (paulo at matos-sorge.com)
Date: Wed Mar 12 16:37:14 EDT 2014

On 20/02/14 14:19, Matthew Flatt wrote:
> At Sun, 09 Feb 2014 08:35:03 +0000, "Paulo J. Matos" wrote:
>> On 09/02/14 00:03, Matthew Flatt wrote:
>>> There should be many more flags passed to `gcc`, including some -I
>>> flags and some -D flags.
>>>
>>> Is something in your environment overriding the CFLAGS definition in
>>> the makefile? Normally, a definition in the makefile would take
>>> precedence over an environment variable, but maybe something else is
>>> taking precedence over the definition?
>>>
>>
>>
>> Doh, right. I assumed for no good reason racket would behave the same
>> way my usual project does and use env CFLAGS as the optimization flags
>> used for compilation. Any other env variable the racket build system
>> uses for me to add additional compilation flags? (for example to build
>> with `-O2 -ftree-vectorize` or `-O0 -g3`)
>>
>> After some thought shouldn't -D... and -I... flags be controlled by
>> CPPFLAGS and not CFLAGS such that overriding CFLAGS would still leave
>> CPPFLAGS intact?
>
> I've changed the makefiles so that setting CFLAGS (or CPPFLAGS) will
> hopefully work the way you expect.
>

I might have spoken too soon:

make[7]: Entering directory `/home/pmatos/projects/BUILDS/racket/foreign'
gcc -O3 -Wall -Werror -c ../../../racket/racket/src/foreign/foreign.c -o 
foreign.o
../../../racket/racket/src/foreign/foreign.c:9:21: fatal error: 
schpriv.h: No such file or directory
  #include "schpriv.h"

When compiling foreign with CFLAGS="-O3 -Wall -Werror", the include 
paths disappear.

-- 
PMatos


Posted on the dev mailing list.