Sign in Join

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

Mailing lists / fpc-pascal / 2016-07

unable to compile 3.0.0 both Linux x86_64 and arm-linux

8 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Giuliano Colla

Hello,

I'm trying to upgrade from fpc 2.6.4 to 3.0.0 but make all fails both in Linux x86_64 platfoms and in arm-linux (Raspbian) plaform.

I've downloaded a precompiled 3.0.0 in order to be able to compile. I have also tried using fpcup, but the result is the same in all cases:

while compiling package paszlib, in file zbase.pas it fails with:

zbase.pas(446,7) Error: Illegal expression
where the offending line is a simple
       str(err,zerror);

and with

zbase.pas(447,36) Error: Operator is not overloaded: "Constant String" +
"zError(LongInt):AnsiString;"
where the offending line is
     zerror:='Unknown zlib error '+zerror;

If I try to continue by patching the offending lines, the unit compiles but then I get tons of errors from the trees.pas unit.

Any idea? Do I need to add some options previously unneeded besides '-gl -O3p3' ?

Giuliano

Reply by email

Jonas Maebe
to Giuliano Colla
Giuliano Colla wrote 21 lines
I'm trying to upgrade from fpc 2.6.4 to 3.0.0 but make all fails both in Linux x86_64 platfoms and in arm-linux (Raspbian) plaform. I've downloaded a precompiled 3.0.0 in order to be able to compile. I have also tried using fpcup, but the result is the same in all cases: while compiling package paszlib, in file zbase.pas it fails with: zbase.pas(446,7) Error: Illegal expression where the offending line is a simple str(err,zerror); and with zbase.pas(447,36) Error: Operator is not overloaded: "Constant String" + "zError(LongInt):AnsiString;" where the offending line is zerror:='Unknown zlib error '+zerror;

These errors suggest you are not compiling that unit in FPC mode. If you use the top level Makefile in the fpcsrc directory, it will compile the packages directory with RELEASE=1, which in turn causes -n to be added to the FPC command line options so that it ignores any default (.)fpc.cfg files (that may otherwise contain -Mdelphi or so). The default compiler mode in FPC (including 3.0) is plain FPC mode.

Jonas

Reply by email

Giuliano Colla
to Jonas Maebe

Il 16/07/2016 15:52, Jonas Maebe ha scritto:

Show quoted text 6 lines
These errors suggest you are not compiling that unit in FPC mode. If you use the top level Makefile in the fpcsrc directory, it will compile the packages directory with RELEASE=1, which in turn causes -n to be added to the FPC command line options so that it ignores any default (.)fpc.cfg files (that may otherwise contain -Mdelphi or so). The default compiler mode in FPC (including 3.0) is plain FPC mode.

I'm using the top level Makefile, while buildin All. Everything else, before that package, compiles properly (compiler, LCL, other packages, etc.) Should I locate something specific which might turn off FPC mode in the affecting package Makefiles or fpmake or whatever, or in the upper folder (packages)?

Thanks,

Giuliano

Reply by email

Jonas Maebe
to Giuliano Colla
Giuliano Colla wrote 6 lines
I'm using the top level Makefile, while buildin All. Everything else, before that package, compiles properly (compiler, LCL, other packages, etc.) Should I locate something specific which might turn off FPC mode in the affecting package Makefiles or fpmake or whatever, or in the upper folder (packages)?

Try adding OPT=-va FPMAKEOPT=-v to the make invocation and check the output to see whether the compiler is picking up any extra configuration files or options somehow.

Jonas

Reply by email

Giuliano Colla
to Jonas Maebe

Il 17/07/2016 17:34, Jonas Maebe ha scritto:

Try adding OPT=-va FPMAKEOPT=-v to the make invocation and check the output to see whether the compiler is picking up any extra configuration files or options somehow.

That's it! I had just pasted from the wiki page an extra fpc.cfg for cross compiling, and I had failed to notice that it had an extra -Sd added, which has nothing to do with cross-compiling, but which generates troubles around.
Thanks a lot for your help!

Giuliano

Reply by email

Jonas Maebe
to Giuliano Colla
Giuliano Colla wrote 10 lines
Il 17/07/2016 17:34, Jonas Maebe ha scritto: > Try adding OPT=-va FPMAKEOPT=-v to the make invocation and check the > output to see whether the compiler is picking up any extra > configuration files or options somehow. That's it! I had just pasted from the wiki page an extra fpc.cfg for cross compiling, and I had failed to notice that it had an extra -Sd added, which has nothing to do with cross-compiling, but which generates troubles around.

Could you edit that wiki page and remove the -Sd so other people won't run in the same problem? Thanks.

Jonas

Reply by email