Finalbuilder will not build Delphi FMXLinux projects

After moving my projects to Windows 11 ARM on a Macbook M1 my FMXLinux projects will no longer build in FinalBuilder. I have tried two clean VMs with fresh installations of Delphi 11.0 and Finalbuilder 8.0.0.3067 and both fail. I have tried using some previous versions of FinalBuilder but they also fail to build the project. Here’s the FB log.

Build Delphi Linux64 [ C:\Projects\Github\fb-fmxlinux-issue\Project1.dpr ]
    Status: 
      Date: 2/9/2022
      Time: 10:08:45:398
       End: 10:08:45:997
  Duration: 00:00:00:599

Action Messages:
Compiler selected is : C:\Program Files (x86)\Embarcadero\Studio\22.0\bin\dcclinux64.exe
Generating compiler configuration file...
Saving compiler configuration file : C:\Projects\Github\fb-fmxlinux-issue\Project1.cfg
Running Delphi compiler....
Using Command Line :  /B C:\Projects\Github\fb-fmxlinux-issue\Project1.dpr /Q
Embarcadero Delphi for Linux 64 bit compiler version 35.0
Copyright (c) 1983,2021 Embarcadero Technologies, Inc.
C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\FmxLinux-1.69\source\FMX.Gestures.Linux.pas(217) Fatal: F2051 Unit FMX.Gestures was compiled with a different version of FMX.Gestures.Linux.TPlatformGestureEngine

There has only ever been one version of Delphi and FMXLinux installed on the VM. The same project builds fine in Delphi 11.0.

Steps to reproduce:

  • Install Delphi 11.0
  • Install FMXLinux from GetIt.
  • Create a Linux connection and import a Linux SDK.
  • Open the attached Delphi project and check that it builds.
  • Open and run the Finalbuilder project and check that it fails.

I will PM Vincent a link to the Ubuntu SDK I’m using - maybe you can then skip step 3.

fb-fmxlinux-issue.7z (12.0 MB)

I can get the project compiling in FB if I remove the FMXLinux source folder from Delphi’s search path.

C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\FmxLinux-1.69\source

Why would this affect FB, but not the Delphi IDE?

I will look at this tomorrow, however I suspect the problem is that getit adds both the source and the lib folder to the search path - it really should just add one or the other.

Hi Paul

Having taken a look at the files provided with FmxLinux, there is no way it would compile with the source - it’s not the complete source - if you compare the lib folders to the source you will see the lib folder has way more files in it.

As for the difference between the IDE and FinalBuilder - the major difference is we do not call MSBuild - we call the command line compiler directly, as we have done since FB1. That does mean more work for us but it means we can support more versions of Delphi, and have better control over the build process. I can only guess that the IDE only uses one of the paths when passing to the compiler… I would need to see the msbuild output from the IDE to confirm that.

Hi Vincent,

Having taken a look at the files provided with FmxLinux, there is no way it would compile with the source - it’s not the complete source - if you compare the lib folders to the source you will see the lib folder has way more files in it.

The lib folder contains files that come from the imported SDK. I sent you a link in case you want to download it. Normally you need to set up a Linux machine running PAServer and import the SDK from there.

As for the difference between the IDE and FinalBuilder - the major difference is we do not call MSBuild - we call the command line compiler directly, as we have done since FB1. That does mean more work for us but it means we can support more versions of Delphi, and have better control over the build process. I can only guess that the IDE only uses one of the paths when passing to the compiler… I would need to see the msbuild output from the IDE to confirm that.

This could certainly be the issue. I’ll try to find the msbuild log.