This was a fairly difficult task to figure out (no documentation out there), so I thought I’d share how I ended up getting the latest version of the Critical Mass Modula-3 compiler installed.
Please note that I was working an an emulated 32-bit operating system, so if you’re working on a 64-bit installation, make changes where applicable.
- You must first download an actual binary copy of CM3. This isn’t actively mentioned anywhere in the source documentation, but you will notice that as you try to do any of the scripts, you will always fail before anything else happens. If you pay close attention, you will see the script is trying to run “cm3” … which is annoying, because it’s CM3 you’re trying to install :PGo to the URL https://modula3.elegosoft.com/cm3/ and scroll down to the section “Target Platform LINUXLIBC6”. I just downloaded the first file, so it’s the whole shebang.
- Extract the file and run “cminstall” – this will install the cm3 compiler in a place you wouldn’t necessary expect: /usr/local/cm3/bin – this means you won’t be able to invoke cm3 right away, so you must …
- Add the cm3 binary directory to the path thus:
- Next, clone the latest source respository:
git clone https://github.com/modula3/cm3.git
- From the directory cm3/scripts, run the upgrade.sh script
And presto – your CM3 should now be upgraded all the way.
When trying to build all the additional packages (using “do-cm3-all.sh buildship“), even if you have ODBC drivers installed, the process will fail when building the “db” packages. To fix this:
cd /usr/lib/i386-linux-gnu ln -s libodbc.so.2 libodbc.so
This holds true for the UI package, as well, specifically lixXaw and libXmu:
ln -s libXaw.so.7 libXaw.so ln -s libXmu.so.6 libXmu.so