Unable to determine OS - smlnj

When I go on terminal (i installed smlnj) and i type sml it gives me the error sml: unable to determine architecture/operating system. What does this mean???
I installed sml like this at this website, but I'm not sure -- are the instructions wrong?

The problem with recent OS X binary installers still persist just the focus moved to 10.9 Mavericks and 10.10 Yosemite versions of OS X. Although the root cause is solved in the recent source code version.
That is why from some time now solving this issue is just about having a freshly compiled binary package. And for that you might be better of installing smlnj through homebrew. You can do it with these commands:
brew update
brew cask install smlnj
As of 2021, the command to install with cask is
brew install --cask smlnj
This will compile the package for you so you can spare the trouble of checking out the source code and doing the compilation yourself.
Just to clean up your system and avoid duplication you can remove the previous installation simply by doing the following:
sudo rm -rf /usr/local/smlnj*
For the asterisk: I had one bare smlnj folder with the 110.76 inside it and one smlnj-110.75 folder I guess I had tried to install two different versions earlier...
You might need to remove any softlinks that you created yourself that point to the older smlnj folder directly under /usr/local/ removed in the previous step.

If you're using OSX 10.8 or later (uname -r gives you something starting with 12 or higher), SML/NJ pre 110.75 doesn't work too well without some extra tweaking. It's a known issue that can be fixed by adding the 10.8 choice (see the 12 line below) to the OS detection code in .arch-n-opsys:
:
10*) OPSYS=darwin; HEAP_OPSYS=darwin ;; # MacOS X 10.6
11*) OPSYS=darwin; HEAP_OPSYS=darwin ;; # MacOS X 10.7
12*) OPSYS=darwin; HEAP_OPSYS=darwin ;; # MacOS X 10.8
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
16*) OPSYS=darwin; HEAP_OPSYS=darwin ;; # MacOS X 10.12 Sierra
17*) OPSYS=darwin; HEAP_OPSYS=darwin ;; # MacOS X 10.13 High Sierra
*) exit 1;;
esac;;

As an update to paxdiablo's answer, if you're running macOS Sierra (version 10.12) you need to input the following line to get sml running:
16*) OPSYS=darwin; HEAP_OPSYS=darwin ;; # macOS 10.12 Sierra
So with more context it will look like this:
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
16*) OPSYS=darwin; HEAP_OPSYS=darwin ;; # macOS 10.12 Sierra
17*) OPSYS=darwin; HEAP_OPSYS=darwin ;; # macOS 10.13 High Sierra
*) exit 1;;
esac;;
SML/NJ version 110.79 had the OS X up to El Capitan configured, but Sierra was still missing.

Sierra 10.12.6
Install SML through Homebrew brew install smlnj
Edit your .bash_profile and add export PATH=/usr/local/Cellar/smlnj/110.81/bin:$PATH to the end of the file.
After that source ~/.bash_profile to apply the new path so your system adds the new locations and then knows where to find the file it needs when you type sml

I was struggling with this for hours after upgrading my Macbook. Previously I was on OSX 10.8 Maverick on Macbook Air for which the distribution https://www.smlnj.org/dist/working/current/index.html#macos-installer actually worked fine.
After upgrading to a Macbook Pro running OSX 10.14 Mojave, running sml after installing and adding to PATH would give me OP's error message.
After struggling to find some solution including the one marked as accepted here, what ended up working was brew cask install smlnj.

I ran into this issue after I accidentally installed an older version of SML/NJ. I removed my previous install by trashing /usr/local/smlnj and reinstalled using the pre-built system of OS X for SML/NJ 110.78. The most recent download is available under Downloads here, which is what future seekers should consult, as the particulars of my solution will likely be out of date by the time they come around.

Related

Unable to install/enable gmp on mac os php#7.1

I am trying to install gmp extension for mac as I get this Problem while fetching some dependencies from github
Problem 1
- mdanter/ecc v0.3.2 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
I have tried brew formulas like
brew install php71-gmp
Have followed the link but unable to get it to work.
I am using Xampp, which php is /Applications/XAMPP/xamppfiles/bin/php
OS - macOS Sierra 10.12.6

Is Canopy compatible with OS X Yosemite?

Is Canopy (version 1.4.1 seems to be current) compatible with Mac OS X 10.10 (Yosemite)?
We have not seen any problems such as plagued the transition to Mavericks, but statistics will tell for sure.

Command line tools on Mavericks

As many have pointed out this should work, xcode-select --install
I however consistently get
I have XCODE Version 5.0.1 (5A2053) installed.
What am i missing please and how can I get command line tools installed?

Installing mongodb with homebrew in mac mountain lion ( 10.8.5 ) never ends

I'm in 10.8.5 and traying to install mongodb but it just never ends, here is the output:
~ r01010010$ brew reinstall mongodb
==> Reinstalling mongodb
==> Downloading http://downloads.mongodb.org/src/mongodb-src-r2.4.7.tar.gz Already
downloaded: /Library/Caches/Homebrew/mongodb-2.4.7.tar.gz
==> Downloading patches
################################################################## 100,0%
==> Patching patching file src/third_party/v8/SConscript
==> scons install --prefix=/usr/local/Cellar/mongodb/2.4.7 -j4 --64 --cc=/usr/bin/clang --cxx=/usr/bin/clang++
So the las line is the last thing i get and still there like open (maybe an infinite loop).
For me, I also got this message:
Warning: No developer tools installed.
You should install the Command Line Tools.
Run xcode-select --install to install them.
and actually running the following command solved the issue.

sudo port install cmake trouble (for MGTwitterEngine)

I am following This Tutorial on installing MGTwitterEngine on my MAC osx 10.6.2.
I am stuck on this step:
sudo port install cmake
it gives me the following error:
dlopen(/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib, 10): no suitable image found. Did find:
/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib: no matching architecture in universal wrapper
while executing
"load /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib"
("package ifneeded Pextlib 1.0" script)
invoked from within
"package require Pextlib 1.0"
(file "/opt/local/bin/port" line 40)
Rex-MacBook-Pro:~ Rex$
Thus, I cannot use TERMINAL to install YAJL to get my app to build. Help needed.
P.S.
In terminal preferences, Shells Open With is either /usr/bin/login or /bin/bash
YAJL is supposedly installed at /Users/Rex
I am using OSX 10.6.2
Solution was that my OS is snow leopard and the version of Xcode i was using was not. Re-installing the proper xcode update solved it.