Recent

Author Topic: Build Lazarus from main branch source code failed in windows  (Read 2116 times)

hawkx

  • New Member
  • *
  • Posts: 30
Build Lazarus from main branch source code failed in windows
« on: March 14, 2024, 03:00:49 pm »
In the past two days, I built Lazarus through source code from main branch in Windows 10. There was an error occurred,the message is:
Quote
(10001) PPU Loading C:\Develop\Lazarus\components\virtualtreeview\lib\i386-win32-win32\laz.vtideeditors.ppu
(10011) PPU Source: laz.vtideeditors.pas not found
(10028) Recompiling laz.VTIDEEditors, checksum changed for C:\Develop\Lazarus\components\virtualtreeview\lib\i386-win32-win32\laz.virtualtrees.ppu
Fatal: (10022) Can't find unit laz.VTIDEEditors used by laz.RegisterVirtualTreeView
Fatal: (1018) Compilation aborted

Finally, I found that this issue can be corrected through the following modifications:
  • 1. Modify laz.virtualtreeview_package.pas, change the order of laz.VTIDEEditors in the uses statement. change
Code: Pascal  [Select][+][-]
  1. uses
  2.   laz.VirtualTrees, laz.VTHeaderPopup, laz.RegisterVirtualTreeView,
  3.   laz.VTGraphics, laz.VTIDEEditors, LazarusPackageIntf;
to
Code: Pascal  [Select][+][-]
  1. uses
  2.   laz.VirtualTrees, laz.VTHeaderPopup, laz.VTIDEEditors,
  3.   laz.RegisterVirtualTreeView, laz.VTGraphics, LazarusPackageIntf;
I know this file was automatically created by Lazarus, but I had to do this to make the command "make clean all" runs correctly.
  • 2. Modify laz.virtualtreeview_package.lpk, change the order of laz.vtideeditors.pas, change
Quote
      <Item>
        <Filename Value="laz.registervirtualtreeview.pas"/>
        <HasRegisterProc Value="True"/>
        <UnitName Value="laz.RegisterVirtualTreeView"/>
      </Item>
      <Item>
        <Filename Value="laz.vtgraphics.pas"/>
        <UnitName Value="laz.VTGraphics"/>
      </Item>
      <Item>
        <Filename Value="laz.virtualtrees.res"/>
        <Type Value="Binary"/>
      </Item>
      <Item>
        <Filename Value="laz.vtideeditors.pas"/>
        <UnitName Value="laz.VTIDEEditors"/>
      </Item>
to
Quote
      <Item>
        <Filename Value="laz.vtideeditors.pas"/>
        <UnitName Value="laz.VTIDEEditors"/>
      </Item>
      <Item>
        <Filename Value="laz.registervirtualtreeview.pas"/>
        <HasRegisterProc Value="True"/>
        <UnitName Value="laz.RegisterVirtualTreeView"/>
      </Item>
      <Item>
        <Filename Value="laz.vtgraphics.pas"/>
        <UnitName Value="laz.VTGraphics"/>
      </Item>
      <Item>
        <Filename Value="laz.virtualtrees.res"/>
        <Type Value="Binary"/>
      </Item>
This is the real place to change the order of the laz.VTIDEEditors, to prevent Lazarus building fail during install/uninstall packages.

Somebody please verify this issue, and sumbit to Lazarus Gitlab if above modification works properly. Thanks!

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12110
  • FPC developer.
Re: Build Lazarus from main branch source code failed in windows
« Reply #1 on: March 14, 2024, 03:16:32 pm »
Do you also use FPC trunk? Some work is being done there on the unit order.

hawkx

  • New Member
  • *
  • Posts: 30
Re: Build Lazarus from main branch source code failed in windows
« Reply #2 on: March 14, 2024, 03:18:34 pm »
Do you also use FPC trunk? Some work is being done there on the unit order.
I used main branch of FPC too.

dsiders

  • Hero Member
  • *****
  • Posts: 1377
Re: Build Lazarus from main branch source code failed in windows
« Reply #3 on: March 14, 2024, 03:32:14 pm »
Do you also use FPC trunk? Some work is being done there on the unit order.
I used main branch of FPC too.

I just built Lazarus 3.99-1660-g7400dc43b0 using both FPC 3.2.2 and FPC 3.3.1-15189-gae06528db4 (2024-02-18). No issues.

So your problem is not with Lazarus source code.
Preview the next Lazarus documentation release at: https://dsiders.gitlab.io/lazdocsnext

hawkx

  • New Member
  • *
  • Posts: 30
Re: Build Lazarus from main branch source code failed in windows
« Reply #4 on: March 14, 2024, 03:35:56 pm »

I just built Lazarus 3.99-1660-g7400dc43b0 using both FPC 3.2.2 and FPC 3.3.1-15189-gae06528db4 (2024-02-18). No issues.

So your problem is not with Lazarus source code.

This issue only occurred while build for win32-i386, not occurs while "make clean all OS_TARGET=win64 CPU_TARGET=x86_64", are you built for win32-i386

dsiders

  • Hero Member
  • *****
  • Posts: 1377
Re: Build Lazarus from main branch source code failed in windows
« Reply #5 on: March 14, 2024, 03:38:16 pm »

I just built Lazarus 3.99-1660-g7400dc43b0 using both FPC 3.2.2 and FPC 3.3.1-15189-gae06528db4 (2024-02-18). No issues.

So your problem is not with Lazarus source code.

This issue only occurred while build for win32-i386, not occurs while "make clean all OS_TARGET=win64 CPU_TARGET=x86_64", are you built for win32-i386

No... but it's still a compiler issue either way.
Preview the next Lazarus documentation release at: https://dsiders.gitlab.io/lazdocsnext

hawkx

  • New Member
  • *
  • Posts: 30
Re: Build Lazarus from main branch source code failed in windows
« Reply #6 on: March 14, 2024, 03:41:55 pm »
By the way, I was used lazarus-main-7400dc43 (2024-03-13) and FPC Source-main-6e03b247 (2024-03-13)

Thaddy

  • Hero Member
  • *****
  • Posts: 16653
  • Kallstadt seems a good place to evict Trump to.
Re: Build Lazarus from main branch source code failed in windows
« Reply #7 on: March 14, 2024, 03:45:18 pm »
I just build from scratch, including my cross  compilers, no issue.
And that includes the 32 bit version.
« Last Edit: March 14, 2024, 03:51:29 pm by Thaddy »
But I am sure they don't want the Trumps back...

hawkx

  • New Member
  • *
  • Posts: 30
Re: Build Lazarus from main branch source code failed in windows
« Reply #8 on: March 14, 2024, 04:05:51 pm »
I just build from scratch, including my cross  compilers, no issue.
And that includes the 32 bit version.

I guess this issue only occured with default win32-i386 compiler.

By the way, I didn't find a prebuilt win64-x86_64 FPC compiler, I want it :D.

wp

  • Hero Member
  • *****
  • Posts: 12683
Re: Build Lazarus from main branch source code failed in windows
« Reply #9 on: March 14, 2024, 05:03:52 pm »
Did clean checkouts of fpc/main (SHA 2273670aad7eff8fe642bb8737ea50e30f24c13c) and laz/main (SHA b0d10a2a5a9d32e1b1b8de481f7b0824e79d3d0e) into empty directories on Win 11 (64bit). FPC built fine, but building Laz did abort with the laz.VTIDEEditors error reported in the first post.

Switched fpc to some older version (SHA e53620ebdb89140ee851e89d2f3fbdf9ca49a162 of Feb 1 204), and then building Lazarus works fine.

Just noticed that there is already a bug report about it (https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40829)

Bart

  • Hero Member
  • *****
  • Posts: 5538
    • Bart en Mariska's Webstek
Re: Build Lazarus from main branch source code failed in windows
« Reply #10 on: March 14, 2024, 06:27:58 pm »
Switched fpc to some older version (SHA e53620ebdb89140ee851e89d2f3fbdf9ca49a162 of Feb 1 204), and then building Lazarus works fine.

Older version of the compiler or older version of Lazarus?

Bart

wp

  • Hero Member
  • *****
  • Posts: 12683
Re: Build Lazarus from main branch source code failed in windows
« Reply #11 on: March 14, 2024, 06:38:14 pm »
Switched fpc to some older version (SHA e53620ebdb89140ee851e89d2f3fbdf9ca49a162 of Feb 1 204), and then building Lazarus works fine.

Older version of the compiler or older version of Lazarus?
Older version of FPC, sorry.

 

TinyPortal © 2005-2018