Recent

Author Topic: Error building trunk for FPC on x64 SVN 32958  (Read 3063 times)

delphian

  • New Member
  • *
  • Posts: 39
Error building trunk for FPC on x64 SVN 32958
« on: January 17, 2016, 05:56:04 am »
i am getting this error when building with 2.6.4 FPC X64. the fixes_3_0 works but causes issues with in lazarus.

fgl.pp(1494,21) Error: Identifier not found "Default"
fgl.pp(1690) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
make[7]: *** [buildrtl.ppu] Error 1
make[7]: Leaving directory `C:/LazarusExtras/fpc/Trunk/rtl/win64'
make[6]: *** [win64_all] Error 2
make[6]: Leaving directory `C:/LazarusExtras/fpc/Trunk/rtl'
make[5]: ***
Error 2
make[5]: Leaving directory `C:/LazarusExtras/fpc/Trunk/compiler'
make[4]: *** [next] Error 2
make[4]: Leaving directory `C:/LazarusExtras/fpc/Trunk/compiler'
make[3]: *** [ppc1.exe] Error 2
make[3]: Leaving directory `C:/LazarusExtras/fpc/Trunk/compiler'
make[2]: *** [cycle] Error 2
make[2]: Leaving directory `C:/LazarusExtras/fpc/Trunk/compiler'
make[1]: *** [compiler_cycle] Error 2
make[1]: Leaving directory `C:/LazarusExtras/fpc/Trunk'
make: *** [build-stamp.x86_64-win64] Error 2

Cyrax

  • Hero Member
  • *****
  • Posts: 754
Re: Error building trunk for FPC on x64 SVN 32958
« Reply #1 on: January 17, 2016, 07:20:09 am »
There is patch in this bug report which resolves this issue : http://bugs.freepascal.org/view.php?id=29415

Thaddy

  • Hero Member
  • *****
  • Posts: 8870
Re: Error building trunk for FPC on x64 SVN 32958
« Reply #2 on: January 17, 2016, 08:11:31 am »
@Cyrax: What issues with Lazarus? Then Lazarus should fix it. The starting compiler for trunk fpc should be 3.0 as per documentation. I have no issues after regenerating the makefiles.
Again: WHAT issues with Lazarus? Point me to them...
Did you try my patch and re-generated the makefiles? <fpcmake -Tall  -r (-v/q)> because that patch is more correct.
Again2: WHAT issues with Lazarus. Then I can try and fix them or point devs to how it should be solved.

Your patch is conceptually wrong although it works. My patch is the correct one.

The bug is caused by the use of default(), yes, but that is correct, since it is a feature of fpc 3.0 and trunk must be build with 3.0 as per release build faq and wiki: the last major release, which is 3.0.
This is explicitly done so devs can use features of the release for newer code, in this case a new compiler intrinsic. You should not patch away new code if it is legal, but fix lazarus in a fpc 3 compatible way. Your patch leads to code rot.

The real fix is something like I proposed in http://bugs.freepascal.org/view.php?id=29416 and regerate the makefile. Michael is working on it.
« Last Edit: January 17, 2016, 11:22:41 am by Thaddy »
Most people that want to use threading should learn to patch their jeans first: use a needle.

Thaddy

  • Hero Member
  • *****
  • Posts: 8870
Re: Error building trunk for FPC on x64 SVN 32958
« Reply #3 on: January 17, 2016, 08:30:32 am »
And the answer is thus:
DON'T use 2.6.4 to build fpc trunk. Use 3.0.0 which is the only documented starting compiler for trunk.
Most people that want to use threading should learn to patch their jeans first: use a needle.

Thaddy

  • Hero Member
  • *****
  • Posts: 8870
Re: Error building trunk for FPC on x64 SVN 32958
« Reply #4 on: January 17, 2016, 08:48:03 am »
i am getting this error when building with 2.6.4 FPC X64. the fixes_3_0 works but causes issues with in lazarus.

What issues with Lazarus?
The issue is caused by the use of the new compiler intrinsic Default() introduced in fpc 3.0.0.
It is not for nothing that it documented that you should use 3.0.0 to build trunk and not any older version.
That is precisely why it is specified that it is only guaranteed to build a working  trunk with the latest major release.

Perfect example, by the way....

Show me what is wrong in Lazarus, then I can try to help fix it like it should be fixed.

Also note that this particular case is about a new feature in fgl. (in trunk) A better way to compile with 2.6.4 in this case and for the time being is to revert that patch. At the time of writing this seems the only place where new compiler features are used. The patch is r32942 . After you revert that, FGL compiles again. But this is waiting for more accidents to happen because of what I explained. You should build with 3.0 anyway.
« Last Edit: January 17, 2016, 09:13:25 am by Thaddy »
Most people that want to use threading should learn to patch their jeans first: use a needle.

delphian

  • New Member
  • *
  • Posts: 39
Re: Error building trunk for FPC on x64 SVN 32958
« Reply #5 on: January 17, 2016, 10:27:48 am »
The issue i had with fixed_3_0 was i couldn't save any forms . it would give an error about abstract method called. i will apply the patch and compile with 3.0.0 and see how i go.


Delphian

delphian

  • New Member
  • *
  • Posts: 39
Re: Error building trunk for FPC on x64 SVN 32958
« Reply #6 on: January 17, 2016, 10:55:56 am »
I Applied the patchs and compiled the trunk with FPC 3.0.0 and then compiled lazarus with the fpc i just made and it works properly. i have not tried doing some with fixes_3_0 as i wanted the trunk and it wouldnt work for me before.

Thaddy

  • Hero Member
  • *****
  • Posts: 8870
Re: Error building trunk for FPC on x64 SVN 32958
« Reply #7 on: January 17, 2016, 11:05:14 am »
By now Michael applied my patch (force 3.0.0 as the starting compiler) and was very helpful to you and Cyrax to patch fgl in a more appropriate way: it will build in 2.6.4 again. You will have to use OVERRIDEVERSIONCHECK=1 though.... to build with an old compiler and it is unsupported.

So I am happy (but it is still code rot) ,  are you happy?
« Last Edit: January 17, 2016, 11:19:59 am by Thaddy »
Most people that want to use threading should learn to patch their jeans first: use a needle.