unable to compile 3.0.0 both Linux x86_64 and arm-linux

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

unable to compile 3.0.0 both Linux x86_64 and arm-linux

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

_______________________________________________
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 3.0.0 both Linux x86_64 and arm-linux

Jonas Maebe-2
On 16/07/16 15:23, Giuliano Colla wrote:

> 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
_______________________________________________
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 3.0.0 both Linux x86_64 and arm-linux

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

> 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



_______________________________________________
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 3.0.0 both Linux x86_64 and arm-linux

Jonas Maebe-2
On 16/07/16 16:20, Giuliano Colla wrote:
> 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

_______________________________________________
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 3.0.0 both Linux x86_64 and arm-linux

Giuliano Colla
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

_______________________________________________
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 3.0.0 both Linux x86_64 and arm-linux

Jonas Maebe-2
On 17/07/16 19:50, Giuliano Colla wrote:

> 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

_______________________________________________
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 3.0.0 both Linux x86_64 and arm-linux

Giuliano Colla
Il 17/07/2016 20:01, Jonas Maebe ha scritto:

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

Done.

http://wiki.freepascal.org/Setup_Cross_Compile_For_ARM#Configure_Lazarus_for_cross_Compile

I was planning to edit this page when I was completely done, because
many points are obsolete, but this clean up takes priority.

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 3.0.0 both Linux x86_64 and arm-linux

Giuliano Colla
In reply to this post by Jonas Maebe-2
Il 17/07/2016 20:01, Jonas Maebe ha scritto:

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

Sorry, bad link.
That's the good one:

http://wiki.freepascal.org/Setup_Cross_Compile_For_ARM#Create_custom_fpc.cfg

Giuliano

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal