[Coco] CMOC compilation problems

Alex Evans varmfskii at gmail.com
Mon Oct 21 02:50:29 EDT 2019


There is a second copy of cpp that is limited and generally doesn't
cause issues. taking it out of the path solved the issue

On Mon, Oct 21, 2019 at 2:34 AM Alex Evans <varmfskii at gmail.com> wrote:
>
> with verbose:
> [alex at ignoramous stdlib]$ ../cmoc --verbose -c -O2 -DNDEBUG -nostdinc
> -I . -o atol.ecb_o atol.c
> Target platform: CoCo Disk Basic
> Preprocessing: atol.c
> Preprocessor command: cpp -xc++ -U__cplusplus -I'.'
> -D_CMOC_VERSION_=1060 -D_COCO_BASIC_=1 -U__GNUC__ -nostdinc -undef
> -D'NDEBUG' atol.c
> Compiling...
> : illegal option -- x
> : illegal option -- c
> : illegal option -- n
> : illegal option -- o
> : illegal option -- s
> : illegal option -- t
> : illegal option -- d
> : illegal option -- i
> : illegal option -- n
> : illegal option -- c
> : illegal option -- u
> : illegal option -- n
> : illegal option -- d
> : illegal option -- e
> : illegal option -- f
> :1: error: syntax error: #
> Code address: $2800 (10240)
> Data address: after the code
> 1 error(s), 0 warning(s).
> oddly it appears the preprocessor is not generating the errors
>
> On Sun, Oct 20, 2019 at 10:41 PM Pierre Sarrazin <sarrazip at sarrazip.com> wrote:
> >
> > 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>
> >
> > --
> > Coco mailing list
> > Coco at maltedmedia.com
> > https://pairlist5.pair.net/mailman/listinfo/coco


More information about the Coco mailing list