Unable to compile fpc 3.0.4

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to compile fpc 3.0.4

Giuliano Colla
I've stumbled into a problem.

On one platform (linux x86_64, distro is CentOs6) I'm unable to compile
fpc packages of fpc 3.0.4

The compiler is successful but the package compilation fails on package
paszlib. The error given is

zbase.pas(446,7) Error: Illegal expression
zbase.pas(447,36) Error: Operator is not overloaded: "Constant String" +
"zError(LongInt):AnsiString;"
zbase.pas(506) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted

The affected lines are:

       str(err,zerror);
       zerror:='Unknown zlib error '+zerror;

if I patch those lines, sort of:

       //str(err,zerror);
       zerror:='Unknown zlib error ';//+zerror;

then compilation fails in trees.pas: all occurences of tree[n].xx give
raise to an error

trees.pas(871,18) Error: Array type required

(followed by 30 more similar messages)

I have no clue of where could be the problem.

Any hint will be greatly appreciated.

Giuliano

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Unable to compile fpc 3.0.4

Pierre Muller
Hi Giuliano,

Le 09/12/2017 à 20:43, Giuliano Colla a écrit :

> I've stumbled into a problem.
>
> On one platform (linux x86_64, distro is CentOs6) I'm unable to compile
> fpc packages of fpc 3.0.4
>
> The compiler is successful but the package compilation fails on package
> paszlib. The error given is
>
> zbase.pas(446,7) Error: Illegal expression
> zbase.pas(447,36) Error: Operator is not overloaded: "Constant String" +
> "zError(LongInt):AnsiString;"
> zbase.pas(506) Fatal: There were 2 errors compiling module, stopping
> Fatal: Compilation aborted
>
> The affected lines are:
>
>        str(err,zerror);
>        zerror:='Unknown zlib error '+zerror;
>
> if I patch those lines, sort of:
>
>        //str(err,zerror);
>        zerror:='Unknown zlib error ';//+zerror;
This looks like a problem of mode selection.

> then compilation fails in trees.pas: all occurences of tree[n].xx give
> raise to an error
>
> trees.pas(871,18) Error: Array type required
>
> (followed by 30 more similar messages)
>
> I have no clue of where could be the problem.
>
> Any hint will be greatly appreciated.

It could be due to some configuration option in
the configuration file that gets loaded  automatically.

On linux systems, this is typically $HOME/.fpc.cfg

There is a very important switch that prevents loading those implicit configuration file:
-n

when confronted to some error with public sources, you should always check if adding -n to options
does not change the outcome of your make run.

Simply try to run make but adding -n to Free Pascal compiler options,
simply by using

make OPT=-n
or
make OPT="-n ALL_OPTIONS_YOU_USED_BEFORE"

  Please report if this solves the compilation failure for
Free Pascal 3.0.4 sources for x86_64-linux.


Pierre

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Unable to compile fpc 3.0.4

Giuliano Colla
Il 09/12/2017 22:06, Pierre Muller ha scritto:

> Simply try to run make but adding -n to Free Pascal compiler options,
> simply by using
>
> make OPT=-n
> or
> make OPT="-n ALL_OPTIONS_YOU_USED_BEFORE"
OPT=-n did the trick.

It remains obscure to me while paszlib did origin to the problem, while
other packages did compile properly, but as long as it works...

Merci beaucoup.

Giuliano

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Unable to compile fpc 3.0.4

Marco van de Voort
In our previous episode, Giuliano Colla said:
> > make OPT="-n ALL_OPTIONS_YOU_USED_BEFORE"
> OPT=-n did the trick.
>
> It remains obscure to me while paszlib did origin to the problem, while
> other packages did compile properly, but as long as it works...

Many packages force delphi dialect. Paszlib as original TP source upgraded
to 32-bit doesn't change mode, since it uses the default.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal