Software Tools

Do one thing well, and work together.

How to compile and run Inferno on Ubuntu 14.04

with 2 comments

Download Inferno from Vita Nuova’s web site.

Create /usr/inferno and make it writable by other.

Expand the inferno tgz file with tar xzf while the current directory is /usr.

Update the file mkconfig to set SYSHOST to Linux, uncomment OBJTYPE=386, and comment out OBJTYPE=$objtype.  Run ./makemk.sh.

export PATH=/usr/inferno/Linux/386/bin:$PATH
mk nuke

mk install will fail to find sys/cdefs.h, so add -I/usr/include/x86_64-linux-gnu\ to CFLAGS in mkfiles/mkfile-Linux-386.

mk install will fail to find gnu/stubs-32.h, so run sudo apt-get install libc6-dev-i386 to install 32-bit libraries.

mk install will produce a floating point exception when limbo tries to compile runt.m.  Commenting out the line that sets NaN will avoid the exception.  Instead of trying to find a solution to this problem in the code from 2010, update it with hg pull -uv and hg update to see whether the problem was resolved. (Install mercurial with the command sudo apt-get install mercurial.)  Accept the changed *.dis files.  Resolve conflicts in mkfiles/mkfile-Linux-386, by allowing the new -I option, and deleting the X11R6 include.

hg resolve –mark
hg resolve –all
hg pull -uv # gives no more output

mk install will fail to find X11/Xlib.h, so run sudo apt-get install libx11-dev and libxext-dev to install X11 headers.

mk install will fail to find X11 and Xext, so run sudo apt-get install libx11-6:i386, libxext-dev:i386 to install 32-bit versions of the same.

So we now get far enough to see some code that needs the NaN we earlier removed.

calc.b:135: ‘NaN’ is not a member of ‘Math’ of type Math
calc.b:352: Nan’s value cannot be determined
calc.b:62: cannot index ‘conw’
calc.b:63: cannot index ‘conw’
calc.b:63: cannot index ‘conw’
mk: limbo -I/usr/inferno/module -gw calc.b : exit status=exit(1)

Let’s put it back in and see what happens: we’re back to a floating-point exception, so updating to the most recent version of code didn’t fix it.

Added the keyword volatile and the “=a” output constraint to fpuctl.h:setfcr, per this discussion.

mk nuke, and then mk install appears to complete successfully.

emu wm/wm starts a window manager session within the emulator.

 

Written by catena

11 June 2014 at 0017

Posted in Uncategorized

2 Responses

Subscribe to comments with RSS.

  1. Of course, there’s no guarantee that age will make us any wiser! But we can hope. Click https://twitter.com/moooker1

    fondaprince32375

    8 April 2016 at 0835


Leave a comment