[Coco] CMOC compilation problems

Pierre Sarrazin sarrazip at sarrazip.com
Sun Oct 20 22:41:21 EDT 2019


Hi Alex,

Dixit Alex Evans (2019-10-20 12:49):
> When the build comes to trying to create atol.ecb_o it reacts as if
> there is a malformed option passed to cmoc:
> 
> ../cmoc -c -O2 -DNDEBUG -nostdinc -I . -o atol.ecb_o atol.c
> : illegal option -- x
> : illegal option -- c
> : illegal option -- n
    [...]
> :1: error: syntax error: #
> 
> This is on Arch Linux where my default compiler is gcc 9.2.0

I've never seen those error messages.

You could run cmoc with the --verbose option to see how cmoc calls the
C preprocessor. That would allow you to check if it's the cpp command
that generates those errors.

The output of that cpp command may present lines that cmoc doesn't
expect. Lines that start with '#' are expected to be of these forms:

    # 1 "foo.c"
    # 1 "foo.c" 42

On my system, I'm using cpp 4.8.4.

-- 
Pierre Sarrazin <sarrazip @ sarrazip . com>


More information about the Coco mailing list