Illinois Institute of Technology


Building X-GEN

Building the X-GEN package is generally easy. The most secure way to build it is to compile it from source on your target computer, as follows. In each of the commands shown below, the "%" is intended to show a system prompt. Commands that you type are in typewriter font:

  1. Download the source tarball, http://xgen.iit.edu/xgen-5.8.0.tgz
  2. Move the tarball to an appropriate top-level directory. Thus if you plan to keep the software in /opt/xgen but it was originally downloaded into /home/johnsmith, then:
    % cd /home/johnsmith
    % mv xgen-5.8.0.tgz /opt/xgen
  3. Unpack the tarball:
    % tar xzvf xgen-5.8.0.tgz
    n.b.: On some systems you may have to use gtar instead of tar; on others you may have to do the uncompression separately from the unpacking, e.g.
    % mv xgen-5.8.0.tgz xgen-5.8.0.tar.gz
    % gunzip xgen-5.8.0.tar.gz
    % tar xvf xgen-5.8.0.tar
  4. Configure the package for your local system:
    % sh ./configure
  5. Compile and link it:
    % make
    n.b.: On some systems, including many Irix and Solaris systems, you will need to use gmake, gnumake, or even /usr/sfw/bin/gmake instead of make.
  6. Install it. There are three cases of how you can do this.
    1. If you are a superuser, you can do this simply:
      make install
      n.b.: If you had to complile with gmake or gnumake or /usr/sfw/bin/gmake,
      you'll have to do this step the same way.
    2. If you are not the superuser, but you are set up to obtain superuser privileges using sudo:
      sudo make install
    3. If you are not the superuser, and you are not set up to obtain superuser privileges using sudo, then do the following:
      su
      Password:(your system's root password)
      make install

That's the whole story. The executables will be installed in /usr/bin.
If you have a 32-bit system, the libraries will be in /usr/lib.
If you have a 64-bit system, the libraries will be in /usr/lib64.
The system resources (specificially, the pixel-to-centimeter conversion files for specific detector types) will be in /usr/share/xgen, and the documentation will be in /usr/share/doc/xgen.

If you prefer to use the pre-compiled binaries, you can download the appropriate gzipped tarball for your system and insert the binaries in /usr/bin or some other directory in your users' path. If you want to use the shared-library versions, put the shared libraries in /usr/lib. Currently, X-GEN is not set up for downloading the 64-bit Linux libraries from the website; you'll have to compile and link those as described above. If you'd prefer to use static libraries, then you don't need to do anything special with the library systems.

X-GEN in its full version requires Motif, curses (or ncurses), libz, and a working version of the library call for setenv. If your system lacks one or more of those packages, you should build X-GEN from source; the configure script handles the absence of any of these packages. Irix is a special case: the X-GEN package as built for Irix provides a setenv functionality. Of course, if you build X-GEN without Motif, curses, or libz, the functionalities associated with missing packages will be missing in the X-GEN package that you build.

I would be happy to attempt a port of X-GEN to other operating systems. Please email me if you want to participate in a porting effort.

Last updated by Andrew Howard on Thursday 28 December 2006.