Copyright (C) 2000-2012 |
Whole document tree Installing LessTif(last modification: $Date: 2001/11/24 14:06:37 $) IntroductionThis document details configuring, compiling, and installing LessTif on various platforms.
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 ( Readers that are going to install a binary version of LessTif can jump to the according section immediately.
Table of contentsBuilding LessTifPrerequisites (What you need to compile LessTif)To build LessTif from the sources you need a number of installed software packages and utilities. You can find pointers to most of these tools on our links page.
In addition when building from CVS instead of using our source tarballs you will need:
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 ;-) Configuring LessTifConfiguration 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. The end result is that there are a bunch of Makefile.in files, and a "configure" script. 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. 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. LessTif from CVSIf 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!
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 ...
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:
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. LessTif source distributionTo 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. Getting configure to find everythingconfigure identifies a large number of aspects of your computer system, it checks for all those prerequisites listed above.Two things that configure looks for on your machine are:
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. Using configure options to tune the buildAs of LessTif 0.87.2 the build system is capable of building multiple LessTif libraries. The purpose of this is to have several libraries that are compatible with several releases of OSF/Motif®.Starting with 0.93.3 we install our Motif 2.1 version as default. Though some functionality is still missing it sounds more reasonable to use this version nowadays. This was introduced because an increasing number of people are using Motif 2.* functions, and the binary releases of LessTif only supported the 1.2 version of Motif. So if you actually install multiple versions of our libraries the highest one will finally be the default version.
Choosing which versions to compile
Other options
Compiling LessTifAfter configuring LessTif, just typing 'make' should build all the libraries, clients, and (optionally) tests for LessTif. To build libraries or other things only, just cd to the directory in which you want to build things, and type 'make'. Dependencies have been set up so that the libraries will be recompiled if they are old (or haven't been compiled yet), so typing make from within a test directory will rebuild what needs to be rebuilt.Some combinations of compilers and libraries may have code generation bugs. For example, gcc-2.7.0 on a Solaris platform has known problems if the library is compiled with an optimization greater than -O (-O1). 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 (-g for GNU-C), this is not an issue. Platform specific issuesHere we collect various hints and workarounds which help in building on the specific platforms. Many are a bit outdated, since we usually try to get fixes in our configuration system to avoid such workarounds. However they may still be useful to resolve similar problems!OSF, Digital Unix, Tru64Building on Digital Unix from scratch/CVS using the system's CC compiler is known to work after installing GNU flex 2.5.4 and starting configure like 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. HP/UXOn an HP/UX system that we have access to, the commands that we used to configure LessTif are : CC="cc -Ae" export CC ./configure --disable-static OS/2If you want to build LessTif for XFree86 OS/2 you have to use OS/2 specific Makefiles since a build based on the auto*-tools/libtool is not possible (based on recent auto* tools and their ports you may given them a try. However it's not worthwhile and would require quite some work to get a satisfying result). They are available from http://homepages.tu-darmstadt.de/~st002279/os2/lesstif.html. Those Makefiles don't support building any of the supplied example programs in the test/ tree. If you want to easily build some of them check out the REXX script "ble.cmd" in scripts/OS2 .
Further OS/2-specific problems are addressed within our FAQ. Solaris(unknown:)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) WindowsOn windows using Cygwin, U/WIN or Interix, LessTif must be built as static libraries. Because, one of the biggest issues with X on Win32 is the moronic DLL format. Specifically - it is not possible to export data from a Win32 DLL in a form that can be used to statically initialize another global variable. Data access from a DLL requires at least one pointer indirection, and hence executable code. This is why X11R6 doesn't have DLLs for Xt/Xmu/Xaw (and Motif) on Win32. 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. Installing LessTif BinariesLessTif built from sourceInstalling LessTif is as easy as typing 'make install' - given you managed to build it as described above!Check out the related options for configure which control where LessTif gets installed. Binary distributions of LessTifBinary versions of LessTif are built and made available as a service to people who want to use LessTif without having to compile it themselves. As we're concentrating on developing and improving LessTif itself, we consider binary releases to be a side product, which we only generate once in a while - generally at each minor release. Our release policy is detailed in release-policy.html.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. Platform specific issuesFreeBSDStarting 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. LinuxFrom 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:
Matt Simpson OS/2The OS/2 binary distribution is provided as an InfoZip file. Put it into yourX11ROOT 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.
Windows(From: Suhaib Siddiqi)First install Cygwin/Xfree86 in /usr/X11R6 from http://xfree86.cygwin.com Then copy lesstif-0.92.98-cygwin.tar.bz2 to \cygwin directory and open Cygwin bash shell: cd / bunzip2 lesstif-0.92.98.tar.bz2 tar xvf lesstif-0.92.98.tarYou should be set to go. After LessTif (Getting shared libraries to work)Shared library configuration differs from system to system. Here is the lowdown on getting them to work on the systems that support them.
Upgrading LessTifDefault versionsUsually upgrading LessTif from one version to the other is a rather simple task. The challenge is to recognize that the default version of our libraries has changed in the past.
Installation TreeStarting from 0.93.5 we changed the way that LessTif install its files. Earlier releases used to put most of their stuff libraries/headers in their own subdirectory $(prefix)/LessTif and afterwards create symbolic links for libraries and headers. Advantage was that people could more easily switch between different installed versions, i.e. from "Motif 1.2" to "Motif 2.0". Drawback was that this couldn't be done in a fully portable fashion, i.e. at least installation from sources failed on some systems though they were supported by libtool (which is the more crucial factor which limits portability: we can only build our libraries on systems which are supported by this powerful tool, see section Prerequisites).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 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. Xlt and XbaeThe Xlt and Xbae widget sets are two widget sets that used to come with LessTif distributions, but that aren't part of the Motif® clone. Accordingly we finally removed them from the LessTif distribution and promoted them to stand-alone projects which have their own CVS repository!If you want to learn more about them check out the according pages for Xlt and Xbae. Feedback Last modified on $Date: 2001/11/24 14:06:37 $ |