Lisp HUG Maillist Archive

FLI template needs to be compiled (?)

A user of the Linux version of my Regex Coach[1] reported that the
application crashed on his machine and he got a backtrace[2] that said
"FLI template needs to be compiled."  I'm 100% sure that I don't use
the FLI at all in the app so I'm wondering what might be the cause for
this.  Any ideas?

(FWIW, the app was built with 4.3.7 and the crash happened on Ubuntu
Linux 5.04.)

Thanks,
Edi.

[1] <http://weitz.de/regex-coach/>

[2] The rest of the backtrace isn't very helpful because the app was
    delivered with level 5.


Re: FLI template needs to be compiled (?)

Edi Weitz wrote:

> A user of the Linux version of my Regex Coach[1] reported that the
> application crashed on his machine and he got a backtrace[2] that said
> "FLI template needs to be compiled."  I'm 100% sure that I don't use
> the FLI at all in the app so I'm wondering what might be the cause for
> this.  Any ideas?

You know about template files, right?

In my experience, older versions of Lispworks often required small
template files to make sure that delivered applications functioned
correctly, especially when my applications used Windows API functions.
This is (or used to be, I haven't looked it up recently) documented
in the Delivery Manual somewhere.

Creating template files was a rather annoying part of application
delivery, mostly because you would only discover what templates were
needed by running the app until it crashed with an error message about
missing templates.

Nowadays I don't seem to need those template files anymore.  (I'm not
sure why.  I suppose that newer Lispworks versions have more precompiled
templates or something like that.)

> I'm 100% sure that I don't use the FLI at all in the app so I'm
> wondering what might be the cause for this.

Even if you don't use the FLI explicitly, you may still need these
templates because the Lispworks runtime obviously uses the FLI too.

My guess is that your app may need a template file with a couple of
FLI declarations that are needed for interfacing with Linux.
Alternatively, you could recompile your app with LW 4.4.5 and hope
that the problem disappears.

Hope this helps.

Arthur


 --
Here's an example of a template file that I use for an app that I wrote
6 years ago:

;; Template file to keep delivery happy.

(in-package "CLOS")

(FLI::DEFINE-PRECOMPILED-FOREIGN-OBJECT-SETTER-FUNCTIONS
 (((WIN32:STR :LENGTH 80)
   :SIZE COMMON-LISP:NIL)))


(FLI::DEFINE-PRECOMPILED-FOREIGN-OBJECT-ACCESSOR-FUNCTIONS
 (((WIN32:STR :LENGTH 32)
   :NO-ALLOC-P COMMON-LISP:NIL
   :SIZE COMMON-LISP:NIL)))



Updated at: 2020-12-10 08:50 UTC