From my Notebook >
I recently learned about the Seed7 programming language while browsing Reddit, and wanted to try it. Along the way, I thought I’d document my experience of compiling and installing the software in case it can be helpful to others.
Why Try It?
My reasons for wanting to try Seed7 were these:
The Unknowns
Here are some things I didn’t see on the website, that I was curious about:
With that out of the way, let’s get into the installation.
Installing Seed7 in Ubuntu 20.04: Getting Ready
For this install I’m using Ubuntu 20.04. If you have never compiled software before, please install packages needed to do so. The typical install command for this in Ubuntu is:
sudo apt-get install build-essential
Here is an alternative, an example of a “fancy” install command that installs really common packages needed for compiling just about anything:
sudo apt-get install autoconf g++ subversion linux-source linux-headers-`uname -r` build-essential tofrodos git-core subversion dos2unix make gcc automake cmake checkinstall git-core dpkg-dev fakeroot pbuilder dh-make debhelper devscripts patchutils quilt git-buildpackage pristine-tar git yasm checkinstall cvs mercurial
This command does install some extra packages for software versioning systems like subversion, cvs, and mercurial, which you may not need at all.
Extracting the File
The download links took me to the Seed7 Sourceforge Files Section in which I clicked:
This downloaded a .tar.gz file to my system. I moved it to my “Dropbox > Apps > programming” folder so I could keep it organized and automatically share it to my other Ubuntu systems via Dropbox.
Reading the Docs
The Seed7 install package includes several read_me.txt files in different folders. It’s a good idea to review at least the main one in the top-level folder.
Starting the Install
I opened a terminal, which on my system is Windows + T. I hold down the “Windows” key on the keyboard and then tap the ‘t’ key.
I typed cd ~/Dropbox/Apps/programming/seed7/src/
and was ready to start the compiling process.
Compiling
This is my least-favorite part. It always seems like compiling instructions differ from project to project. And I feel like I often do something wrong here, or make a guess that’s incorrect!
First, I try to stick to the documentation in the read_me.txt file. Here are the commands I use:
make depend
make
OK, these went fine. Next, the docs say to run “make s7c”. But a LOT of times, documentation will say this, but later on the project maintainer will tell me, “ah, in your case you should have used sudo” for some reason. Anyway I can’t remember, but there is always this variance in systems, with compiling. It’s really annoying!
So, I decide to run:
sudo make s7c
Even though the documentation simply says to run “make s7c”, so let’s see how it goes…OK, this works fine after some waiting.
Next, the documentation says to run sudo make test
which admittedly feels like a waste of time.
sudo make test
I don’t know if it is a waste of time, but it took a lot of time on my new laptop, enough time that I decided to start this blog post. :-) Let’s say something like 5-10 minutes. I’ve never run this for any compilation process before, ever.
Finally, the test completes. It announces:
Use 'sudo make install' (with your make command) to install Seed7.
Damn! That was the sudo part I guess. I didn’t see that coming. Hopefully my previous use of sudo with “make s7c” above didn’t harm anything. But it seems to work OK anyway.
Also I don’t know what “with your make command” means. Do people have custom make commands? Should I have one? I don’t know. I doubt it. So:
sudo make install
This moves all the files around to where they should be on the system, mostly /usr/local/bin.
Testing the Install
The documentation now says to test out the sample program. I change to the “prg” folder, which contains sample programs.
cd ../prg
Now I test-run the “hello” program. Note that when using Seed7, you can leave off the “.sd7” at the end of the program name, and just type “s7 hello” instead of “s7 hello.sd7”:
s7 hello
And it works!
SEED7 INTERPRETER Version 5.1.632 Copyright (c) 1990-2022 Thomas Mertes
hello world
OK, let’s get a bit fancy and try another program here…
s7 planets
Right on, this works too! Although, the graphics window text is very tiny, using my laptop’s screen resolution of 1920 × 1080. I can barely read the text at all, so I use alt+scrollwheel to use my system’s screen zoom feature. The features seem to work OK! I’m ready to work with graphics.
Here is a non-zoomed screenshot:
(It so happened that my “Robinson Crusoe on Mars” wallpaper was randomly assigned to this desktop, which was fun)
Conclusion
Overall, everything went OK. As you saw, I am not a fan of the compile-to-install method of installing software for various reasons, but the instructions provided seemed to work fine, and the Seed7 tools are functional.
Please note that if you’re installing Seed7, it’s important to review the included read_me.txt files in case this installation routine changes later.
I’d like to thank the author of Seed7, Thomas Mertes, for creating such an interesting project to explore and learn. I am looking forward to getting to know the language better.
And I hope you enjoy using Seed7 on your own systems!