All Manuals > Delivery User Guide

8 Delivery on Linux, FreeBSD and x86/x64 Solaris

This chapter describes issues relevant to delivery with LispWorks for Linux, LispWorks for FreeBSD and LispWorks for x86/x64 Solaris.

8.1 GTK+ considerations

The section describes issues relevant to delivery of CAPI applications running on GTK+.

8.1.1 GTK+ libraries on the target machine

A suitable version of the GTK+ libraries must be installed on the target machine for your CAPI/GTK application to run. The version requirements are as for LispWorks itself, as mentioned in the Release Notes and Installation Guide.

8.1.2 Fallback resources

If your CAPI/GTK application needs fallback resources then it should pass the :application-class and :fallback-resources arguments when calling capi:display and/or capi:convert-to-screen.

See capi:convert-to-screen in the CAPI User Guide and Reference Manual for a full description of these arguments.

You could use the LispWorks resources as a starting point when constructing your application's resources. You can see the LispWorks fallback resources (these are for application class Lispworks) as described under "Using X resources" in the CAPI User Guide and Reference Manual.

You can override the default resource name using the capi:element initarg :widget-name or the accessor (setf capi:element-widget-name). There is an example in:

(example-edit-file "capi/elements/gtk-resources")

8.2 X11/Motif considerations

The section describes issues relevant to delivery of CAPI applications running on X11/Motif.

Note that the X11/Motif GUI is deprecated, because the alternative GTK+ GUI library is now supported.

8.2.1 Loading Motif

On LispWorks platforms supporting pthreads, the supplied image contains the GTK GUI only, and therefore GTK is the default graphical library for applications. To build a Motif application on these platforms you need to include:

(require "capi-motif")

in your delivery script.

You may wish to consider building a GTK version of your application too.

8.2.2 Motif on the target machine

A suitable version of the OpenMotif library must be installed on the target machine for your CAPI/Motif application to run. The version requirements are as for LispWorks itself, as mentioned in the Release Notes and Installation Guide.

8.2.3 Fallback resources

If your CAPI/Motif application needs fallback resources then it should pass the :application-class and :fallback-resources arguments when calling capi:display and/or capi:convert-to-screen.

See capi:convert-to-screen in the CAPI User Guide and Reference Manual for a full description of these arguments.

You could use the LispWorks resources as a starting point when constructing your application's resources. You can see the LispWorks fallback resources (these are for application class Lispworks) as described under "Using X resources" in the CAPI User Guide and Reference Manual.

You can override the default resource name using the capi:element initarg :widget-name or the accessor (setf capi:element-widget-name).

8.2.4 X resource names use Lisp symbol names

The default color and other attributes for each CAPI pane on X11/Motif is computed as an X resource using the symbol name of the pane's class. Therefore obtaining the correct X resources depends on the application containing these symbol names.

Symbol names are removed at delivery level 5, but you can retain specific names in the delivered image by passing a list of the class names to deliver as the value of the keyword argument :keep-symbol-names.

8.3 LispWorks executable corrupted

After an initially successful installation of LispWorks for Linux, the LispWorks executable may appear to be corrupted:

$ lispworks-8-0-0-amd64-linux
Lisp executable apparently corrupted. (Truncated?) Cannot restart.

The executable is reduced in size, typically to a few 10Kb. This problem, which has been seen on various Linux machines, is caused by the prelink cron job, which does not understand Lisp executables.

Another error message seen attempting to run a saved LispWorks executable on Fedora 14 was:

Reading LispWorks file lw-6-0-1: failed to find trailer, error -101

To prevent this happening, add descriptions of your LispWorks executables to the end of the file /etc/prelink.conf. For example, this will match the default names:

-b lispworks-*-linux

Then the truncated LispWorks executables need to be reinstalled.

The LispWorks for Linux rpm installer writes a line in /etc/prelink.conf which protects the released image. However this does not protect LispWorks images or runtime executables that you have saved, because the name will differ. If you distribute LispWorks for Linux runtimes you should consider protecting them adding a suitable line in /etc/prelink.conf at installation time.

8.4 Logging debugging messages

Log files are recommended for any complex application as they make it easier for you to get information back from your users. The log should contain any debugging messages, and can also contain information from your program.

You can use dbg:log-bug-form for logging errors. See the LispWorks® User Guide and Reference Manual for details.

8.5 Editor emulation

If your application uses capi:editor-pane or its subclasses, your should consider the input style. The editor in the delivered application can emulate Emacs or KDE/Gnome style editing. The deliver keyword :editor-style controls which emulation is used.

8.6 Products supporting dynamic library delivery

You can deliver a dynamic library using LispWorks on Linux, FreeBSD and x86/x64 Solaris.

During delivery of a dynamic library, LispWorks links a small C executable that loads Lisp and also defines the exported foreign symbols. As a result, when this is loaded it may have some dependency on the system libraries that you have on the machine where you delivered it. That means that the delivered image may not work on older versions of the operating system. It is therefore recommended that you deliver on the oldest version of the operating system that you need to support.

On Linux, LispWorks requires specific versions of symbols in the C library which reduces the chance of problems like this.


Delivery User Guide - 01 Dec 2021 19:35:04