The Foreign Language Interface requires pieces of compiled code to convert foreign objects to lisp objects and backwards, and it is difficult to know in advance which pieces of code are needed. Most of these pieces are already available in the image, and most applications do not need anymore templates, so you need to deal with it only if your application gives an error of missing templates after delivery.
When a new template is required, it is compiled. In a delivered image, where the compiler has been removed, this causes an error. To solve this you need to find which templates your application uses that are not already avaliable, compile them, and load them before delivering.
To find which templates your application needs, do the following:
This prints all the templates that are dynamically generated by using your application. These have to be put into a file and compiled.
FLI:PRINT-COLLECTED-TEMPLATE-INFO takes a keyword
:OUTPUT-STREAM to make this easier, for example:
(with-open-file (stream "fli-templates.lisp" :direction :output)
:OUTPUT-STREAM stream ))
Once you have compiled the file containing the templates, it should be loaded as part of your application.