Ubuntu 16.(04|10) - Not supported by sh6

Wednesday, 2017/01/18, 18:00 UTC By V6Shell (Jeff)

Ubuntu 16.(04|10) - Not supported by sh6

Or in other words, Ubuntu 16.(04|10) doesn’t support sh6 (and its external goto utility)…

It should but doesn’t; it seems to be an Ubuntu lseek(2) problem (see Description for more info). In any case, when building / compiling sh6 from osh-current on this particular system, you will get a cpp error referring you to this blog post (see this commit for more info). OK. So, now what?

In short, there are 2 options:

  1. Don’t use Ubuntu 16.xx .. Use OpenBSD instead;

  2. If you must use Ubuntu 16.xx but also want to run sh6 (and goto), simply run osh instead;

Number 1 - Pretty self explanatory. The last time I used Ubuntu for anything of consequence (except for debugging the problem described here on Ubuntu 16.10 - I don’t trust Ubuntu1, BTW), it was Ubuntu 10.04.[34] LTS. I do everything with OpenBSD these days; it’s where the Osh Project was born after all, and everything works perfectly here. But Ubuntu 16.xx? Forget it! Well, except osh works fine there.. So…

Number 2 - Simply build & install osh via the oshall & install-oshall targets, and then run it instead of sh6 and its external utilities. If you want to invoke it by typing sh6, just make sh6 a symbolic link to osh. Done. You should be ready to roll now.

Ubuntu 16.(04|10) Problems

Further details about why sh6 (and goto) no longer work on this Ubuntu release .. For the record, it has been reported that they work fine on 14.04 …


It’s not just an lseek(2) problem though. Specifically, it’s that Ubuntu 16.(04|10) is losing the correct offset set by goto on the standard input. The tests I did pointed to some sort of problem with fork(2)/lseek(2)/execve(2). <-

But let’s pin it down more precisely… Somewhere in the Ubuntu nightmare, it’s barfing up a lung in the following transition:

child process (goto) <-> execve(2) <-> parent process (sh6)

… See ... for details I collected while debugging this Ubuntu 16.(04|10) issue / problem .. But I really can’t afford the time to dig any further since Ubuntu isn’t a BSD operating system .

Thanks & Enjoy & Cheers ! =^)


  1. systemd is a disease ( the name even says so, haha! X^D System D == System Disease (^; ) in my eyes; it is the antithesis of everything that UNIX is supposed to be. As such, I cannot trust any so-called UNIX-like operating system using it. This includes Ubuntu, which I never really trusted in the first place.