1

I tried to install SML on OS X El Capitan (currently PB 6).

Unfortunately the command sml in the Terminal gives me the following error message:

sml: unable to determine architecture/operating system

I used this question from stack overflow

and changed the _arch-n-opsys file, so that it would recognize El Capitan:

  i386) ARCH=x86;
case `uname -r` in
  9*) OPSYS=darwin;  HEAP_OPSYS=darwin ;; # MacOS X 10.5 Leopard
  10*) OPSYS=darwin;  HEAP_OPSYS=darwin ;; # MacOS X 10.6 Snow Leopard
  11*) OPSYS=darwin;  HEAP_OPSYS=darwin ;; # MacOS X 10.7 Lion
  12*) OPSYS=darwin;  HEAP_OPSYS=darwin ;; # MacOS X 10.8 Mountain Lion
  13*) OPSYS=darwin;  HEAP_OPSYS=darwin ;; # MacOS X 10.9 Mavericks
  14*) OPSYS=darwin;  HEAP_OPSYS=darwin ;; # MacOS X 10.10 Yosemite
  15*) OPSYS=darwin;  HEAP_OPSYS=darwin ;; # MacOS X 10.11 El Capitan
  *) exit 1;;
esc;;

But I still get the same error message:

sml: unable to determine architecture/operating system

Any idea how to solve this?

Community
  • 1
  • 1
0Jannik0
  • 111
  • 4

2 Answers2

1

You said you changed the _arch-n-opsys. You mean .arch-n-opsys, right? Do you have multiple versions of sml installed? If so, run which sml from your command line, and make sure that the .arch-n-opsys file you are editing is in the same directory. As a last (but non portable) resort, you should be able to replace

*) exit 1;;

with

*) OPSYS=darwin;  HEAP_OPSYS=darwin ;; # MacOS X 10.11 El Capitan
Matt
  • 4,029
  • 3
  • 20
  • 37
  • Well, the file is actually called `_arch-n-opsys` in my version of SML.. it's located in `/usr/local/smlnj/config`. Furthermore `which sml` gives me `/usr/local/smlnj/bin/sml`, so I'd say the directory should be the right one. Furthermore I only have one version of SML installed (it's the 110.78, the newest version). Replacing `*) exit 1;;` with your line also doesn't help.. – 0Jannik0 Sep 01 '15 at 04:25
  • So I take it there is not a `.arch-n-opsys` file in your `/usr/local/smlnj/bin/sml` directory? If you open up the `sml` file you should find something that looks like `ARCH_N_OPSYS="$BIN_DIR/.arch-n-opsys"`. This is the config file that your `sml` file is using, I'd just like to verify that we are modifying the correct one. – Matt Sep 01 '15 at 15:27
  • I think the best way is to show you a screenshot: http://tinyurl.com/qgs78ws. The screenshot shows you the content of `/usr/local`. I've edited the file which is marked in blue. – 0Jannik0 Sep 01 '15 at 15:57
  • Alright, I figured it out! This was actually the wrong file, to find the arch-n-opsys which starts with the . and not with the _, I had to enable that hidden files are visible. Thanks for your help! :) – 0Jannik0 Sep 02 '15 at 21:32
  • 1
    man, I'm somewhat appalled that OP didn't upvote and accept considering it obviously solved it for him... Saved my ass with this for sure! – Brad Allred Oct 09 '15 at 01:32
1

You need to update brew to the latest version with brew update first.

Then reinstall smlnj with brew remove smlnj and brew install smlnj, or brew upgrade smlnj.

prosseek
  • 182,215
  • 215
  • 566
  • 871