Building on Ubuntu 18.04

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
jasonlefler
Posts: 7
Joined: Mon Jul 21, 2014 6:23 pm America/New_York
Answers: 0

Building on Ubuntu 18.04

by jasonlefler » Thu Jun 21, 2018 1:43 pm America/New_York

That would do it.  Shell scripts use a single equals sign for string matching.  I know there's a couple more of those floating around, we'll see if we can patch them up.

Tags:

bruce
Posts: 85
Joined: Thu Mar 17, 2005 4:36 pm America/New_York
Answers: 0

Building on Ubuntu 18.04

by bruce » Thu Jun 21, 2018 2:15 pm America/New_York

There's another one as the last 'if' in the BuildIt in opt/src

jasonlefler
Posts: 7
Joined: Mon Jul 21, 2014 6:23 pm America/New_York
Answers: 0

Building on Ubuntu 18.04

by jasonlefler » Fri Jun 22, 2018 3:58 pm America/New_York

Just for some extra closure, this problem is caused by inconsistent default shells between OSes.  Of the /bin/sh links/binaries, these are the most common (as far as I can tell):

- symlink to bash shell
- symlink to bash shell in compatibility (POSIX?) mode
- dash shell binary
- there's a few others like ash, etc, that I've never personally seen in the wild but I know they're out there

Officially, using == is invalid, but Bash will (sometimes, usually, always?) allow it.  Dash won't (usually or ever?), which Ubuntu uses in 18.04.  There's a movement for OSes to switch away from Bash for their default /bin/sh to speed up boot times, etc.  I'm guessing that's why the invalid syntax went unnoticed for so long; OSX, which most of those blocks are for, probably set /bin/sh to Bash.

rakeshs
Posts: 9
Joined: Mon Oct 01, 2012 8:13 am America/New_York
Answers: 0

Building on Ubuntu 18.04

by rakeshs » Fri Jun 29, 2018 5:07 am America/New_York

Hey Bruce,

If this problem still exists, delete all the libraries in "ocssw/opt/lib" and re-run  ./Buildit.

Rakesh

Post Reply