The original version of this document is written in HTML;
the LessTif build process uses one of the text mode web browsers
lynx
or
links
to convert it into plain text.
Both the HTML (doc/www.lesstif.org/INSTALL.html
)
and the plain text (Install
) formats should be in a distribution.
Readers that are going to install a binary version of LessTif can jump to the according section immediately.
cp
, cp
, install
, rm
,
sed
A large variety of systems fulfill these requirements as our (incomplete!) list of supported platforms shows. And installing the missing software shouldn't be too hard (except for the compiler and X11, perhaps ;-)
Configuration of LessTif is now handled by automake, autoconf and libtool. They are GNU development tools which the LessTif developers use to generate the distribution's build scripts and makefiles. Normally this shouldn't bother you.
If you obtained a copy of LessTif from our CVS repository, then you need to perform some additional steps which will create the "configure" script and all the "Makefile.in" files (and some other files). configure is a shell script which is meant to be run by people who compile LessTif (you, probably). It looks at your system and tries to figure out how exactly to compile. It may need a little help through command-line options, though.
If you obtained your LessTif sources directly from CVS, you'll have to perform some of the steps which the LessTif developers normally perform when creating a distribution. (So, if you did get a real distribution you don't need to do this and you can go on to the next section.)
The following table lists the current versions of the
auto* tools which we use currently for development.
Note that the latest official release may still be based on a
different set!
Tool | Version |
---|---|
automake | 1.9.6 |
autoconf | 2.63 (2.50 at least) |
libtool | 2.2.6 |
We have two places where you need to run the auto* commands. These are
The whole process of running the auto tools and make is now automated
by the CVSMake script which is present in LessTif's top directory.
Use of CVSMake is mandatory! Don't bother us if you run the auto* tools
in your own way and run into problems afterwards ...
Note that due to a bug in current versions of those tools you may see
an error or warning message while running CVSMake.
(In some versions,
it'll complain about installing some files in the LessTif directories,
in other versions, it says AC_PROG_LEX is called multiple times.)
If things run well afterwards you may ignore this, of course.
(so please try to continue first!)
CVSMake needs to be run in the top source directory of LessTif, it figures out which directories need its attention and then does its thing. After running CVSMake, the source tree should be ready for running the configure command.
The CVSMake scripts now feature some command line flags which may be useful:
clean
by default CVSMake cleans up a couple of files in the current
toplevel directory. If this flag is specified it tries to
run make maintainer-clean
local
-
if applied to the toplevel CVSMake it won't run recurse
into the non-core directories (test/
)
nodist
-
enables generation of dependencies in Makefiles.
This does only work on systems which are supported by
GNU automake/libtool.
Starting with automake 1.5 finally more compilers than just
gcc are supported!
Note that you may get a warning about the INSTALL file missing in some cases. Don't worry, it is now a generated file. If you have Lynx/links on your system, it'll convert doc/INSTALL.html into INSTALL. This only happens during the build process (and we're now in the configuration phase which is still before the build); that's why you can get this message. By the way: it's harmless.
The commands above are also the commands that you need to run if you have modified some of the Makefiles yourself.
Once you've done all the above, you can continue with the next section.
To configure LessTif for your system, just type 'configure'. This should do a reasonable job of locating the stuff it needs, and gives rather verbose output should something fail.
The configure script has a lot of command line options which you might need or want to use for two main reasons :
You can type
configure --helpto get the list of all options, with a short description of each. We'll cover most if not all of the options in the next sections of this document.
Now many people who have Motif® on their system don't use LessTif. Hmm. Wonder why that is. Anyway, it wouldn't make much sense if you needed Motif® in order to build LessTif. The good news is: you don't need it. The only reason why you can tell configure where to find Motif® is so it can configure the Makefiles under test/ to be capable of building LessTif as well as Motif® tests.
configure will tell you where it has found them if it found them. If it didn't find X, you'll have to specify the path on configure's command line. Use these two options:
--x-includes --x-libraries
And to specify the Motif® stuff, use these:
--with-motif-includes --with-motif-librariesTo specify the location of the various bits, you have to set these flags equal to something. An example on how to do this is:
configure --x-includes=/usr/local/X11R6/includeThe other flags behave identically.
--enable-shared
--enable-static
--with-dbmalloc
--with-dmalloc
--enable-maintainer-mode
--enable-debug
--enable-editres
--enable-nonstandard-conversions
--enable-production
_LtDebug*()
calls which print all kinds of debugging info depending on some
environment variables)
--enable-scrollbar-verbose
--enable-verbose
--prefix=XXX
Some combinations of compilers and libraries may have code generation bugs. If you see weird problems when you debug library code, try a lower (or no) optimization. For the vast majority who compile with the default flags this is not an issue.
CC="cc -std1" LEX="/usr/local/bin/flex" ./configureBuilding releases (i.e. source distributions) doesn't require an installation of flex, and versions from 0.92.32 should even work without specifying the "-std1" compiler flag.
CC="cc -Ae" export CC ./configure --disable-static
mkdef_emx.cmd
script (see scripts/OS2/
).
test/
tree yet. If you want to easily build some of them
check out the REXX script "ble.cmd" in scripts/OS2/
.
#define VOID_SPRINTFto get the code built. You might put it in by hand in the
config.h
.
On a Sun Solaris 2.6 SPARC with the SUNWspro compiler. In order to get past an undefined _Xconst in lesstif-0.88.1/lib/Xm/AtomMgr.c, I hacked in the following lines at the front of lesstif-0.88.1/include/LTconf.h:
#define FUNCPROTO 1 #include <X11/Xfuncproto.h>(This might be obsolete meanwhile)
LessTif compiles almost out of the box under Cygwin. However you will need to install XFree86 4.x or higher from http://xfree86.cygwin.com.
For U/WIN you will need to install GCC, libtools, automake, and autoconf etc. Please check the URL ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/uwin/.
For Interix, you will need GCC from Microsoft Interix URL. After installing GCC, download automake, autoconf and libtools, compile and install them.
Binary versions usually exist for Linux (various versions), FreeBSD and OS/2, others may be created occasionally as well, e.g. Windows binaries based on Cygwin.
Specifically for Linux, the binaries that we provide are RPM files. A LessTif release has more than one RPM file, each containing a part of LessTif. The Download page explains the difference between them. Important to know is that the "main" RPM is really only a runtime, whereas the stuff needed for development is in a separate RPM.
Starting with the 0.80a (0.80 pre-release), the FreeBSD binary distribution is provided as a pkg_add installable file.
Pkg_add(8) is FreeBSD's installation tool.
Installation of LessTif with pkg_add creates a directory /usr/lesstif, under which all of LessTif is placed. As the file /usr/lesstif/README explains, you should put /usr/lesstif/bin in your $path, add /usr/lesstif/lib to your LD_LIBRARY_PATH or to the options of ldconfig in /etc/rc, and point your compiler to include files and libraries by adding
-I/usr/lesstif/include -L/usr/lesstif/libto its command line. See also below.
From Matthew Simpson (matthewsimpson@home.com)
LessTif Binary Installation
The following procedure worked for installing the binary version 0.82 LessTif onto my Redhat 4.2 Linux system. I did not have a previous installation of either the source or binary LessTif, so this works from scratch. I am documenting this days later, so please correct as needed. The binary installation is simple:
gunzip lesstif-0.82-linux.tar.gz
tar -xvf lesstif-0.82-linux.tar
The result will be this directory:
/usr/lesstif
rm lesstif-0.82-linux.tar
/etc/ld.so.conf
and add the following line for the untarred LessTif library:
/usr/lesstif/lib
ldconfig
LessTif Window Manager:
To ignore your default window manager and instead load mwm, make or copy these files as yourself or root (whichever you use) to your home directory:
eval "exec /usr/lesstif/bin/mwm"Or for better tracking, use this line instead:
eval "exec /usr/lesstif/bin/mwm" -debug >"$HOME"/.MWM-errors 2>&1(The redirections rules for
>
and 2>&1
syntax are specific to sh, which is what my startx script uses.
The rules are slightly different for tcsh.) This will dump any errors to a
file in your home directory called .MWM-errors
.
If no errors occur, this file will not get created. If this file already exists,
new errors will be appended to it. To get a new file each time you log in or
start X,
add this to your .login
or startx
file:
rm -f $HOME/.MWM-errorsTo automatically execute your window manager upon login, add this to the end of your .login file (this is using tcsh syntax):
if ( ! -e /tmp/.X0-lock ) then echo "Starting X Windows..." rm -f $HOME/.MWM-errors startx endif
cp /usr/lesstif/lib/X11/app-defaults/Mwm .
Mwm*doubleClickTime: 1000
Mwm*keyboardFocusPolicy: pointer
cp /usr/lesstif/lib/X11/mwm/system.mwmrc .mwmrc
/usr/X11R6/bin
for most of the already-installed
applications you like to execute through the root window pull-down menus.
More menus and sub-menus can be added as desired. Since
/usr/X11R6/bin
is in your path, you need not type the full
path names into .mwmrc
. Applications in other directories will
need paths or soft links set up.
When setting up these two files I did not have a LessTif mwm manual page
available. However, if you have Unix and Motif® available at work
(such as on SGI products), just do a man mwm
and print it
out for reference. Most will apply to LessTif mwm. (Even though SGI uses
their own version called 4Dwm, they still provide the mwm manual pages
with the IRIX 6.2 release.)
startx
Matt Simpson
X11ROOT
directory and unzip the archive.
This installs all libraries and executables (Xm.dll, Xm_20.dll, mwm.exe, ...).
It puts everything in place to be used within a valid XFree86 OS/2
configuration, so you don't have to adjust anything manually.
cd / bunzip2 lesstif-0.92.98.tar.bz2 tar xvf lesstif-0.92.98.tarYou should be set to go.
LD_LIBRARY_PATH
environment variable.
ldconfig
.
LD_LIBRARY_PATH
variable.
The LD_LIBRARY_PATH
variable is to contain a colon separated
list of paths to be searched for shared libraries. This variable is consulted
before the information compiled by ldconfig, so even if you have LessTif
already installed on your system you can use this variable to force the
use of the newly built library. Below is an example:
Assume you told configure to install LessTif in your home directory "/home/lesstifuser". To keep any existing settings in that variable we put our new setting in front of older ones. The syntax used below assumes that you're usig a bash shell:
$ LD_LIBRARY_PATH=/home/lesstifuser:$LD_LIBRARY_PATH $ export LD_LIBRARY_PATHIn case you didn't specify any prefix check where "make install" actually puts the libraries.
/etc/ld.so.conf
. Then (as root) type
ldconfig -vto make them available.
If you're not sure which library is being used (either the system-wide
installed one, or one you've just compiled), use the 'ldd' command. After
generating an executable linked dynamically with LessTif, type
ldd <executable-name>
.
This will output a list of the paths to all the shared libraries
this executable depends on.
LessTif Version | Motif Compatibility |
---|---|
<0.92 | 1.2 (1.2.x) |
0.92.x, 0.93.1, 0.93.2 | 2.0 |
>=0.93.3 | 2.1 |
>=0.93.96 | Only 2.1 is available |
To simplify this whole process for the maintainers (who have to deal with all the bug reports ;-) and to enhance portability we abandoned this approach. We now install directly in the proper directories below $(prefix) and only put documentation and non-Motif standard stuff in $(prefix)/LessTif.
Having said this we have to acknowledge that upgrading an
older release to 0.93.5 (or better) may fail for some reasons:
installation tools may fail or refuse to remove the old symbolic
links to now obsolete locations.
So before doing the upgrade remove your whole old $(prefix)/LessTif
tree and in addition the following symbolic links (if they exist)
below $(prefix).
However ensure that you know und understand what you are doing,
don't remove a non-LessTif installation this way!
(e.g. if your system has libraries with a different extension
than .so
those links were not created by a LessTif installation
from sources, but perhaps a very different installation!)
bin/mwm bin/uil bin/xmbind include/Dt include/Mrm include/Xm include/uil lib/libDt.so* lib/libDtPrint.so* lib/libMrm.so* lib/libUil.so* lib/libXm.so*The asterisk is the usual wildcard which indicates different suffixes here.