Build Delphi Linux64 10.3 Rio linker error

When building a Delphi console application for Linux64 using the 10.3 Rio compiler, FB 8.0.0.2496 is not adding the SDK path to the linker command line, resulting in errors such as lgcc_s not found. This works using the 10.2 Tokyo compiler, in which case the linker command line does include the SDK path.

I just tested this here with a fresh ubuntu 18.04LTS vm and it worked first time. That said, when I added multiple linux sdk’s to Rio, I discovered the action was always choosing the default sdk rather than the one selected in the delphi project due to a typo (only for Linux64, MacOS worked as expected).

Do you have more than one SDK defined, if not then it should have worked, as it would have just chosen the default sdk. I looked at the code around where the libpaths are added, and you would have seen an error if the sdk file was not able to be loaded. The sdk file is typically in

C:\Users\[user name]\AppData\Roaming\Embarcadero\BDS\20.0

with a .sdk file extension, e.g

ubuntu18.04.sdk

A reboot of the computer solved the problem. Restarting the IDE wasn’t enough.

This project has multiple targets and is same source for both OSX and Linux64. The BDSPLATFORMSDKSDIR was set in the IDE when I tested first time (I checked), and the project was built OK in the IDE, but, at that time, not by the FB action.

“Did you try to turn it off and on again?” Duh!

Not the first time in my career that has been the case with the Delphi IDE, reboot after install shouldn’t be needed, but I’ve experienced this issue many times over the years.

This build has the fix for the sdk selection issue I found

https://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800_2497.exe