Solution to iOS Delphi build failure


Some Delphi users building iOS applications have been thwarted by a…, well let’s be polite and call it a bit of an annoyance, when building their applications. What should just be an informational message about a warning from the ld linker ends up becoming a build breaker. The failure message looks something like this example (taken from RSP-19759, reported in January 2018):[DCC Error] E2597 ld: warning: unknown dwarf DW_FORM_strp (offset=0xFFFFCEE7) is too big in FBSDKShareKit.a(FBSDKAppInviteContent.o) ld: warning: unknown dwarf DW_FORM_strp (offset=0xFFFF6E38) is too big in C:\Dev\lib\ios\facebook\FBSDKShareKit.framework\FBSDKShareKit.a (FBSDKAppInviteContent.o)The fact that ld is emitting a warning about something is neither here not there. Or rather it *should* be neither here nor there. Unfortunately when Delphi receives this warning it turns it into a fatal error.Oh dear… (・_・、)Delphi 10.3 Rio contains a change to address this issue…. ˚◡˚Unfortunately, however, Embarcadero forgot to mention it to anyone ¯\_(ツ)_/¯This post tries to fix that communications oversight by covering the details of the change, which is an important step as you do need to add in a new compiler / linker switch.The iOS ld linker now supports a new option –bequiet, which stops Delphi being able to wrongly interpret the ld warnings (by silencing them).To use the new option choose Project | Options…  (Shift+Ctrl+F11) and do one of these two things:select Building | Delphi Compiler | Compiling | Other Options and add –linker-option:-bequiet to Additional options to pass to the compiler, orselect Building | Delphi Compiler | Linking and add -bequiet to Options passed to the LD linkerYou should now be able to build your project successfully without this little hindrance.Good luck!

Comments are closed.