Step-by-step guide to setting up inform6-test (Ubuntu Linux)

NOTE: This thread is specific to Ubuntu environments (and possibly other Debian derivatives). Please see other threads for other operating systems.

Can anyone assist in putting together a step-by-step guide (i.e. showing terminal commands) to setting up zarf’s inform6-test environment (see GitHub - erkyrath/inform6-test: Collection of unit tests for the Inform 6 library) in Ubuntu Linux? The readme instructions assume a high degree of familiarity with compiling from source in a way that links several new and/or pre-installed libraries, which is a fair step up from the requirements of getting an I6 compiler running.

Reducing this barrier might promote progress on zarf’s very worthwhile initiative to create a test suite for Standard Library 6/11, which has been stalled for years.

One thread might have been sufficient.

The difference between Linux and MacOS will, I think, be limited to “how do I install libxml2” and “where does it get installed”. (You’ll have to update to refer to it.)

  1. Install pre-cursors (if necessary)

You will need to have python3 installed on your system in order to use the inform6-test script. I am pretty sure that it is installed on most new Ubuntu family systems by default. You can check if it is on your system with:

python3 --version

If this produces a response like “Python 3.6.9”, it’s present. If this response isn’t produced, install the program with:

sudo apt-get python3                     (included by default; skip if command python3 --version responds correctly)

You will also need the basic C/C++ compiler and libraries. These are a pain to hunt down individually, and they may not be installed by default on your system. The Ubuntu repositories include a package called build-essential that will automatically install the basic setup. You can check whether it is installed using command:

apt-cache policy build-essential

If the response produced by this includes a line that begins with three asterisks, like

  Installed: 12.4ubuntu1
  Candidate: 12.4ubuntu1
  Version table:
 *** 12.4ubuntu1 500

then the package is already installed. If there is no line with three asterisks, install it with:

sudo apt-get install build-essential     (a package that includes all the basics for compiling C and C++ programs)

The step-by-step instructions provided by zarf (on which these are based) make use of a popular tool for managing software collaboration projects called git. It is not essential to use git, as the files that it is used to retrieve can be downloaded manually by visiting the provided URLs with a web browser. However, it cuts out some steps if you do use git, so it’s recommended to install it:

sudo apt-get install git          (the standard software development git, not zarf's interpreter)

Finally, in the places where zarf’s walkthrough indicates how to manually edit certain files, these instructions use sed to make the changes so that you can just copy-and-paste each command. The sed package is most likely part of your default installation, but as with python3, you can test with command sed --version. If it’s not installed on your system, install it with:

sudo apt-get sed

Once all of the above has been completed, you’re ready to install inform6-test, which is not in the repository and must be built manually. These are the steps successfully used to compile it on a virtual machine running an Ubuntu-family OS today:

  1. Install the development versions of required libraries from repositories
sudo apt-get install libxml2-dev
  1. Create working directory and use git to retrieve necessary source code
mkdir i6test
cd i6test
git clone
git clone
git clone
git clone
git clone
  1. Build I6 compiler and copy it to inform6-test/ directory
cd Inform6
cc -o inform *.c                            (ignore assorted compilation warnings)
cp inform ../inform6-test/inform
../inform6test/inform -V                    (should report version number)
cd ..
  1. Build remglk
cd remglk
cd ..
  1. Build glulxer executable and copy it to inform6-test/ directory
cd glulxe
sed -i 's/^GLK.*cheapglk/\#&/' Makefile    (comments out cheapglk lines)
sed -i 's/^#\(GLK.*remglk\)/\1/' Makefile  (uncomments remglk lines)
cp glulxe ../inform6-test/glulxer
../inform6-test/glulxer -version           (should report RemGLK version number)
cd ..
  1. Build fizmor executable and copy it to inform6-test/ directory
cd fizmo
sed -i 's/^LIBXML2_NONPKG.*$/\#&/'                   (comments out NONPKG lines for libxml2)
sed -i 's/^#\(LIBXML2.*xml-2.0\)/\1/'                (uncomments pkg-config lines for libxml2)
sed -i 's/^#\(LIBFIZMO_REQS\)/\1/'                   (uncomments requirements line for libxml2)
sed -i 's/\(^NCURSES.*=.\)\(-lncurses\)/\1/'         (removes unnecessary ncurses dependency)
sed -i 's/^LIBGLKTERMW_NONPKG_LIBS.*remglk/& -lm/'   (adds missing -lm parameter)
cd fizmo-glktermw/src/fizmo-glktermw
sed -i 's/-lglktermw/-lremglk/' Makefile
cd ../../..                                                    (back to fizmo directory)
make fizmo-glktermw                                            
cp ./fizmo-glktermw/fizmo-glktermw ../inform6-test/fizmor
../inform6-test/fizmor -version                                (should report RemGLK version number)
cd ..
  1. Install the approved version of I6 Standard Library 6/11
cd inform6-test
git submodule init
git submodule update     (remain in inform6-test/ directory)
  1. Validate correct installation
python3 --compiler ./inform --terp ./glulxer dm4/*.inf    (all tests should pass)
python3 -Z --compiler ./inform --terp ./fizmor dm4/*.inf  (1 error should be reported)

Questions for @zarf:

  1. These instructions result in Inform 6.35 (the current development version) being installed as the compiler for use in testing. Would it be preferable to use 6.34 (the current release) or of any value to use 6.33 (latest release in Ubuntu repositories) or 6.31 (the contemporary release for the version of 6/11 installed, I think)?
  2. Would it theoretically be possible to use any of the current fizmo-related libraries available at the author’s site (fizmo download) to build the gluxer and fizmor executables? Would there be any value in doing so? If so, can you provide some hints as to how to modify the step-by-step process that you laid out for MacOS?
  3. Will you please post a notice here if you update the file contents so that I can update/remove the various sed statements that modify it?

Do make fizmo-glktermw in the fizmo top-level directory.

…Oops, that’s a mistake in the instructions! I said to type make rather than make fizmo-glktermw. (Fixed the doc.)

If you do make fizmo-glktermw, it should avoid the ncurses error. I think. Give it a try.

It’s still reporting the same error for the same conditions (with respect to whether or not libncurses-dev is installed). I’ve updated the steps taken and the question list in response to your changes. Do you mind to look over the questions again?

EDIT: It took another modification to to clear up the error (see above), but the build was successful! Thank you for marking out the trail well enough to follow, and for putting together inform6-test in the first place.

@zarf, I just updated the instructions and did a validation run on an entirely fresh virtual machine. The most recent modification that you specified (removing the libncurses dependency in does eliminate the need to install the libncurses-dev package. However, it was still necessary to add an -lm parameter to the LIBGLKTERMW_NONPKG_LIBS line in to get the make fizmo-glktermw build complete successfully. Regardless, the process is working as is, so thanks again!