* * *

Author Topic: I always get "Fatal: Compilation aborted" error the first time, ...  (Read 2471 times)

markus_ja

  • New member
  • *
  • Posts: 39
Hello,

since today, I always get an "Fatal: Compilation aborted" error, when I compile my project after I did some changes. When I "re-compile" the project, it compiles fine.

The last days it was just randomly, but since today it's always. Does anybody know, what the issue is here.

I use generics in delphi mode, maybe that is the issue? I remember when CodeGear/Emb introduced generics/closuers I had a similar problem.

Lazarus 1.6
Win7 + 64Bit

Thaddy

  • Hero Member
  • *****
  • Posts: 3664
Re: I always get "Fatal: Compilation aborted" error the first time, ...
« Reply #1 on: June 17, 2016, 11:34:20 am »
I remember when CodeGear/Emb introduced generics/closuers I had a similar problem.
Well then, give us some code that reproduces the issue.
If you had similar issues with Delphi, chances are your code "doesn't meet standards"  >:D.
Why do the Danish always try to fuck up any programming language?

markus_ja

  • New member
  • *
  • Posts: 39
Re: I always get "Fatal: Compilation aborted" error the first time, ...
« Reply #2 on: June 17, 2016, 11:43:06 am »
I will try to isolate the issue. I also use ZeosLib and mORMot in my project.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4251
    • wiki
Re: I always get "Fatal: Compilation aborted" error the first time, ...
« Reply #3 on: June 17, 2016, 01:06:23 pm »
right click the message window, and get ALL and Hidden messages. That may give more info on the error

markus_ja

  • New member
  • *
  • Posts: 39
Re: I always get "Fatal: Compilation aborted" error the first time, ...
« Reply #4 on: June 17, 2016, 01:15:57 pm »
These are the messages, but don't see any hint, for that issue:

Nachrichten, Hinweise: 154
Note: Duplicate unit "ZSybaseToken" in "zcore 7.1", orphaned ppu "C:\Development\lazarus_external_lib\ZeosLib\packages\lazarus\lib\x86_64-win64\ZSybaseToken.ppu"
...
Projekt kompilieren, Ziel: _bin\x86_64-win64\DbSrvForm.exe: Exit code 1, Fehler: 1, Hinweise: 2
Hint: Start of reading config file C:\Development\lazarus\fpc\3.0.0\bin\x86_64-win64\fpc.cfg
Hint: End of reading config file C:\Development\lazarus\fpc\3.0.0\bin\x86_64-win64\fpc.cfg
Verbose: Free Pascal Compiler version 3.0.0 [2016/02/14] for x86_64
Verbose: Target OS: Win64 for x64
Verbose: Compiling DbSrvForm.lpr
Fatal: Compilation aborted
Verbose: C:\Development\lazarus\fpc\3.0.0\bin\x86_64-win64\ppcx64.exe returned an error exitcode

I also tried to use my delphi mode generic code in a new project, but there it works fine. The only thing I recognized is, that in the project where the error occuers, the compiler doesn't complain when I use my generic class the delphi way without declaring that unit as {$mode delphi}.

e.g.:

var
  x: TSimpleDict<Integer>; //compiles without {$mode delphi}

But adding that compiler mode, doesn't change anything.




« Last Edit: June 17, 2016, 01:22:59 pm by markus_ja »

markus_ja

  • New member
  • *
  • Posts: 39
Re: I always get "Fatal: Compilation aborted" error the first time, ...
« Reply #5 on: June 17, 2016, 02:14:24 pm »
I added some more code lines (proceeded with my work), and now the fatal error is gone.

Strange  :o


chentung

  • New member
  • *
  • Posts: 7
Re: I always get "Fatal: Compilation aborted" error the first time, ...
« Reply #6 on: April 20, 2017, 05:16:31 am »
my condition:

  if I set the default vale of one var parameter , like this :
 
  function   xSelectSQL( _sql: string; var _ErrMsg:String=''):Boolean;

  then Compilation aborted .
 


Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4251
    • wiki
Re: I always get "Fatal: Compilation aborted" error the first time, ...
« Reply #7 on: April 20, 2017, 04:44:32 pm »
When you get the error: copy All/original ... See image (scroll image right)


chentung

  • New member
  • *
  • Posts: 7
Re: I always get "Fatal: Compilation aborted" error the first time, ...
« Reply #8 on: April 20, 2017, 04:59:45 pm »
Martin_fr :  Thanks !

that really describe what happened .

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4251
    • wiki
Re: I always get "Fatal: Compilation aborted" error the first time, ...
« Reply #9 on: April 20, 2017, 07:55:34 pm »
So what error did you get then?

chentung

  • New member
  • *
  • Posts: 7
Re: I always get "Fatal: Compilation aborted" error the first time, ...
« Reply #10 on: April 21, 2017, 03:38:00 pm »
---------------------------------------------------------------------
Hint: (11030) Start of reading config file C:\lazarus164\fpc\3.0.2\bin\i386-win32\fpc.cfg
Hint: (11031) End of reading config file C:\lazarus164\fpc\3.0.2\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 3.0.2 [2017/02/27] for i386
Copyright (c) 1993-2017 by Florian Klaempfl and others
(1002) Target OS: Win32 for i386
(3104) Compiling ct.pas
(3104) Compiling sTable.pas
C:\lazarus164\L1\sTable.pas(212,69) Error: (3337) Default values can only be specified for value, const and constref parameters
C:\lazarus164\L1\sTable.pas(408,1) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: C:\lazarus164\fpc\3.0.2\bin\i386-win32\ppc386.exe returned an error exitcode
-----------------------------------------------
I set default value to a var parameter !

Leledumbo

  • Hero Member
  • *****
  • Posts: 7580
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: I always get "Fatal: Compilation aborted" error the first time, ...
« Reply #11 on: April 23, 2017, 05:51:46 am »
C:\lazarus164\L1\sTable.pas(212,69) Error: (3337) Default values can only be specified for value, const and constref parameters
-----------------------------------------------
I set default value to a var parameter !
The error message clearly doesn't mention var parameters and that is logical (it's passed by reference, default value conceptually doesn't have memory address to be passed as reference).

chentung

  • New member
  • *
  • Posts: 7
Re: I always get "Fatal: Compilation aborted" error the first time, ...
« Reply #12 on: April 24, 2017, 09:41:20 am »
Thanks !
hu !  so I see .
it's a reference, a memory address, can't be initialized .

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus