[DCC Error] ld: warning: alignment (4) of atom - iOS Minimum Version Issue

Hello,

So I am running onto the famous “iOS Minimum Version Issue” using Delphi 12.2 (Patch 1), when compiling my project I get the following error:
[DCC Error] ld: warning: alignment (4) of atom '__ZTRZN3Fmx16Tmsfnchtmlengine10HTMLDrawExEPNS_14Tmsfncgraphics15TTMSFNCGraphicsEN6System13UnicodeStringERKNS4_5Types6TRectFEiiiiibbbbbbbbS5_dNS4_7Uitypes11TAlphaColorESB_SB_SB_RS5_SC_SC_RfSD_RiSE_RS7_SF_SC_SC_SC_SE_iPNS_21Tmsfncbitmapcontainer22TTMSFNCBitmapContainerEfbSB_SB_NS4_3SetINSA_10TFontStyleELSK_0ELSK_3EEEE11TFloatStyle' is too small and may result in unaligned pointers

I am aware that the workaround for this is to change the iOS Minimum Version to 11.0 onto the project, however if I do that, another component I am using on the same project (PDFium) will give me an error that it was compiled with iOS 17.0

[DCC Error] ld: warning: object file (D:\XE12.2\Components\PDFium\Library\iOSDevice64\libpdfium.a(binary_buffer.o)) was built for newer iOS version (17.0) than being linked (11.0)

So I`m stuck between those, I`ve just checked for updates on my TMS Dashboard and downloaded all of them but I still get this, any ideas on how to either fix the issue with the TMS component or even recompile the other component .a file for 11.0?

Hi,

I can’t really see a reason why there is a linker error with our code, but iOS 11 is an 9 year old operating system so I would recommend to target a newer iOS version. it could be possible that the compiler is compiling against iOS 17, and outputs different binaries not able to link with iOS 11, so it’s unclear how to exactly solve this on our end…

If I up the Minimum iOS Version I get the “alignment (4) of atom" error related to it seems TMS FNC Graphics libraries, I tried updating them all through the dashboard to see if that would fix it but doesn`t seem to do, about iOS 17 it seems that Delphi 12 IDE has a known bug with it

Doing some research I found vague troubleshooting about messing with more linker settings but that doesn`t seem very trustable and it could break something else I fear

Still, I cannot see the link between our sources and the linker error. It doesn’t make sense. We never saw such issues in the past. Can you share some more details about the error when linking against iOS 17? Is there something you can find on Embarcadero QC?

That`s the output I get when attempting to build or compile and change the Minimum iOS Required Version to 17.0
I am using the iPhoneOS 26.2 SDK, even if I change to an older SDK (18.0) I still get the same results

If I revert the minium iOS version to 11.0 it fixes that but conflicts with another component on this specific project that uses both, some google research came up with “t happens because a specific variable—in this case, a TFloatStyle within the HTMLDrawEx function of the TMS FNC framework—is aligned to 4 bytes, but the 64-bit ARM or Intel architecture expects 8-byte alignment for certain pointer-related data“ but I am not sure if that is reliable info

What if you move TFloatStyle just under the implementation section, and change it to:

TTMSFNCHTMLEngineFloatStyle ?

Worth experimenting it, I was actually downgrading my Xcode on the iOS side from 26 to 15.4 and doing lots of changes, apparently something with the Delphi 12.2 LD linker is having known bugs with modern SDKs and XCode too