Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-01

problems building h2pas of 2.0.4 release compiler

5 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marc Santhoff

Hi,

after checking out "release_2_0_4" of fpc the compiler seems to have built correctly, but when it comes to building h2pas the following error occurs:

<snip>
gmake -C h2pas all
gmake[3]: Entering directory `/usr/home/marc/program/fpc-svn/fpc/utils/h2pas' /usr/local/bin/gmkdir -p units/i386-freebsd
/usr/home/marc/program/fpc-svn/fpc/compiler/ppc386 -Ur -Xs -OG2p3 -n -Sg -Fu/usr/home/marc/program/fpc-svn/fpc/rtl/units/i386-freebsd -FE. -FUunits/i386-freebsd -di386 -dRELEASE h2pas.pas scan.pas(963,25) Error: High range limit < low range limit scan.pas(963,25) Error: Upper bound of range is less than lower bound scan.pas(966,2) Error: Illegal expression
scan.pas(966,2) Error: Illegal expression
scan.pas(966,2) Fatal: Syntax error, ")" expected but ";" found scan.pas(30,42) Fatal: Compilation aborted
gmake[3]: *** [h2pas] Fehler 1
gmake[3]: Leaving directory `/usr/home/marc/program/fpc-svn/fpc/utils/h2pas' gmake[2]: *** [h2pas_all] Fehler 2
gmake[2]: Leaving directory `/usr/home/marc/program/fpc-svn/fpc/utils' gmake[1]: *** [utils_all] Fehler 2
gmake[1]: Leaving directory `/usr/home/marc/program/fpc-svn/fpc' gmake: *** [build-stamp.i386-freebsd] Fehler 2
zaphod$ gmake compiler
gmake -C compiler all
gmake[1]: Entering directory `/usr/home/marc/program/fpc-svn/fpc/compiler' gmake -C utils all
gmake[2]: Entering directory `/usr/home/marc/program/fpc-svn/fpc/compiler/utils' gmake[2]: Leaving directory `/usr/home/marc/program/fpc-svn/fpc/compiler/utils' gmake[1]: Leaving directory `/usr/home/marc/program/fpc-svn/fpc/compiler' </snip>

How can I fix this?

(svn told: Revision 6068)

TIA,
Marc

Daniël Mantione
to Marc Santhoff

Op Fri, 19 Jan 2007, schreef Marc Santhoff:

Show quoted text 17 lines
Hi, after checking out "release_2_0_4" of fpc the compiler seems to have built correctly, but when it comes to building h2pas the following error occurs: <snip> gmake -C h2pas all gmake[3]: Entering directory `/usr/home/marc/program/fpc-svn/fpc/utils/h2pas' /usr/local/bin/gmkdir -p units/i386-freebsd /usr/home/marc/program/fpc-svn/fpc/compiler/ppc386 -Ur -Xs -OG2p3 -n -Sg -Fu/usr/home/marc/program/fpc-svn/fpc/rtl/units/i386-freebsd -FE. -FUunits/i386-freebsd -di386 -dRELEASE h2pas.pas scan.pas(963,25) Error: High range limit < low range limit scan.pas(963,25) Error: Upper bound of range is less than lower bound scan.pas(966,2) Error: Illegal expression scan.pas(966,2) Error: Illegal expression scan.pas(966,2) Fatal: Syntax error, ")" expected but ";" found scan.pas(30,42) Fatal: Compilation aborted

Are you sure your file isn't corrupt? This is the code there:

----
const
yynmarks   = 310;
yynmatches = 310;
yyntrans   = 559;
yynstates  = 312;

yyk : array [1..yynmarks] of Integer = (
----

310 is larger than 1, so the compiler should not complain.

Daniël

Marc Santhoff
to Daniël Mantione
Daniël Mantione wrote 37 lines
Op Fri, 19 Jan 2007, schreef Marc Santhoff: > Hi, > > after checking out "release_2_0_4" of fpc the compiler seems to have > built correctly, but when it comes to building h2pas the following error > occurs: > > <snip> > gmake -C h2pas all > gmake[3]: Entering directory `/usr/home/marc/program/fpc-svn/fpc/utils/h2pas' > /usr/local/bin/gmkdir -p units/i386-freebsd > /usr/home/marc/program/fpc-svn/fpc/compiler/ppc386 -Ur -Xs -OG2p3 -n -Sg -Fu/usr/home/marc/program/fpc-svn/fpc/rtl/units/i386-freebsd -FE. -FUunits/i386-freebsd -di386 -dRELEASE h2pas.pas > scan.pas(963,25) Error: High range limit < low range limit > scan.pas(963,25) Error: Upper bound of range is less than lower bound > scan.pas(966,2) Error: Illegal expression > scan.pas(966,2) Error: Illegal expression > scan.pas(966,2) Fatal: Syntax error, ")" expected but ";" found > scan.pas(30,42) Fatal: Compilation aborted Are you sure your file isn't corrupt? This is the code there: ---- const yynmarks = 310; yynmatches = 310; yyntrans = 559; yynstates = 312; yyk : array [1..yynmarks] of Integer = ( ---- 310 is larger than 1, so the compiler should not complain. Daniël

Maybe it is, although I think it is generated, so the source (scan.l ?) must be defect ...

<snip>
const
yynmarks   = 0;
yynmatches = 0;
yyntrans   = 0;
yynstates  = 2;

yyk : array [1..yynmarks] of Integer = (
{ 0: }
{ 1: }
);
</snip>

Looks like the scanner generator does something fishy ...

Marc

Daniël Mantione
to Marc Santhoff

Op Fri, 19 Jan 2007, schreef Marc Santhoff:

Maybe it is, although I think it is generated, so the source (scan.l ?) must be defect ...

I rather think your tplex is broken. However, there is a pregenerated .pas file in svn, so you only need to make sure it won't get regenerated.

Daniël

Marc Santhoff
to Daniël Mantione
Daniël Mantione wrote 10 lines
Op Fri, 19 Jan 2007, schreef Marc Santhoff: > Maybe it is, although I think it is generated, so the source (scan.l ?) > must be defect ... I rather think your tplex is broken. However, there is a pregenerated .pas file in svn, so you only need to make sure it won't get regenerated. Daniël

It wasn't easy to do (fiddling Makefiles, setting r/o wasn't enough) but in the end that did the trick.

Thanks for your help and patience,
Marc