Sign in Join

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

Mailing lists / fpc-pascal / 2017-01

PascalScript broken by FPC 3.0 ?

7 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Kapibara Pas

Hi there,

The pascalscripts that worked fine with lazarus 1.4 and fpc 2.64 are crashing when I try to run them in apps compiled with laz 1.6.2 or trunk. I get a SIGSEG attempting to call the constructor of any class and suspect it has to do with FPC version 3.0. Using latest fpc trunk didn't help. Installing the PascalScript GITHub version didn't change the behaviour either, and Windows or Linux doesn't matter.

What has happened? Is it possible to get it to work again without going back to Lazarus 1.4 and fpc 2.6.4?

Roger

Bart
to Kapibara Pas
Kapibara Pas wrote
What has happened? Is it possible to get it to work again without going back to Lazarus 1.4 and fpc 2.6.4?

As a workaround you can switch back to fpc 2.6.4 for the time being. Lazarus 1.6 branch should work with the 2.6.4 compiler.

Just install fpc 2.6.4 and 2.6.4 sources.
In Lazarus options set the correct path to the compiler and compiler sources. Then rebuild Lazarus clean.

For projects you need the 3.0 compiler, just switch back the paths, do
a clean rebuild and you're back.

Bart

Mattias Gaertner
to Bart
Show quoted text 11 lines
On 1/15/17, Kapibara Pas wrote: > What has happened? Is it possible to get it to work again without going back > to Lazarus 1.4 and fpc 2.6.4? As a workaround you can switch back to fpc 2.6.4 for the time being. Lazarus 1.6 branch should work with the 2.6.4 compiler. Just install fpc 2.6.4 and 2.6.4 sources. In Lazarus options set the correct path to the compiler and compiler sources. Then rebuild Lazarus clean.

Note:
You can use the Lazarus IDE macro $(FPCVer) in the "FPC source directory". Then you only need to switch the compiler path.

For projects you need the 3.0 compiler, just switch back the paths, do a clean rebuild and you're back.

You can compile normally, because the IDE notices the different compiler and will pass -B automatically.

Mattias

Bart
to Mattias Gaertner: On Sun, 15 Jan 2017 13:36:14 +0100 Note: You can use the Lazarus IDE macro $(FPCVer) in…
Mattias Gaertner wrote
Note: You can use the Lazarus IDE macro $(FPCVer) in the "FPC source directory". Then you only need to switch the compiler path.

This requires the same directory layout for both compilers/sources. Typically the bindled compiler that comes with Lazarus is in $(Lazarus)/fpc/$(FPCVer)/
and a stand alone installation of fpc will default to c:\pp (on Windows).

I install fpc seperately and have all my fpc compilers and their sources in c:\devel\fpc\$(FPCVer), which makes it easier in lazarus to switch.

Bart

Kapibara Pas
to Luiz Americo Pereira Camara: 2017-01-14 21:44 GMT-03:00 Kapibara Pas : A bug report with a sample project showing the…

Thanks for the suggestions and workarounds. I made a bugreport, with sample project: http://bugs.freepascal.org/view.php?id=31234. In the bugreport is a workaround made by Geepster. It may be helpful for finding out how to fix this.

Roger

Earlier message 28 lines
-----Original Message----- From: Luiz Americo Pereira Camara To: FPC-Pascal users discussions Sent: Sun, Jan 15, 2017 2:22 pm Subject: Re: [fpc-pascal] PascalScript broken by FPC 3.0 ? 2017-01-14 21:44 GMT-03:00 Kapibara Pas : Hi there, What has happened? Is it possible to get it to work again without going back to Lazarus 1.4 and fpc 2.6.4? A bug report with a sample project showing the crash would be helpful Luiz
Lars
to Bart: This requires the same directory layout for both compilers/sources. Typically the bindled…
Bart wrote 16 lines
On 1/15/17, Mattias Gaertner wrote: > Note: > You can use the Lazarus IDE macro $(FPCVer) in the "FPC source > directory". Then you only need to switch the compiler path. This requires the same directory layout for both compilers/sources. Typically the bindled compiler that comes with Lazarus is in $(Lazarus)/fpc/$(FPCVer)/ and a stand alone installation of fpc will default to c:\pp (on Windows). I install fpc seperately and have all my fpc compilers and their sources in c:\devel\fpc\$(FPCVer), which makes it easier in lazarus to switch.

Any idea how to manage multiple compilers at the command line...

rename fpc.exe to fpc224 and fpc300 or something?

Or just call the fpc using absolute path, but that may be annoying as it clogs up the command line with verbose full path