5

Earlier I was in Ubuntu & it was easy to install smlnj using apt-get install smlnj but now I shifted to Arch & I'm finding it difficult to install smlnj.

I tried to find smlnj package through yaourt but I didn't found any. Then I tried to install it by steps given in official site by downloading tar file. I followed given steps and extracted tar file in /usr/local/sml & then compiled by running command config/install.sh.

After doing all this I tried to run sml but was not successful. I tried setting environment variable but again was not successful.

Please tell me whether I'm missing any steps or doing it wrong way. What is correct way to install smlnj in Arch Linux?

LearningGiraffe
  • 145
  • 3
  • 11
  • I'm voting to close this question as off-topic because smlnj is now an official Arch Linux package and this should no longer be a problem. – Alexander Apr 25 '17 at 10:36
  • @Alexander I installed it via `pacman` but sml command didn't worked. So I think I have to go with @Simon 's method. – LearningGiraffe Apr 26 '17 at 17:08
  • if there are issues with a package, please use the bug tracker. /etc/profile.d/smlnj.sh had the wrong file permissions, which is fixed now. Did you try to source /etc/profile.d/smlnj.sh, like the installation message said? – Alexander Apr 27 '17 at 07:42

1 Answers1

5

Update: As Alexander (xyproto) points out, pacman -S smlnj should work again now that SML/NJ is in the [multilib] repository. The solution below would still work, but credit for making installation more convenient should go to him. :-)

Before: It seems that the package became unavailable for x86_64 in Feb 2017, but it doesn't look like it should have happened. I've asked Alexander who maintains the package in [community].

The AUR doesn't contain an smlnj package because it's against AUR policy to overlap with official packages, unless the AUR package is compiled with some tweak that is clearly visible in the package name.

You can still build an Arch package and install that by finding the PKGBUILD and accompanying files at: https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/smlnj (or by cloning the git repo below with those four files in it):

~ $ git clone https://github.com/sshine/smlnj-arch.git
~ $ cd smlnj-arch
~/smlnj-arch $ makepkg
~/smlnj-arch $ sudo pacman -U smlnj-110.80-3-x86_64.pkg.tar.xz
sshine
  • 15,635
  • 1
  • 41
  • 66
  • 3
    `smlnj` is now also in `[multilib]` (I just recently got access there). So from today, `pacman -S smlnj` should be enough. – Alexander Apr 21 '17 at 13:26
  • @Alexander I somehow got `/usr/local/bin/sml: line 60: /usr/local/bin/.arch-n-opsys: No such file or directory sml: unable to determine architecture/operating system ` when executing `sml`. Did I miss anything? – wlnirvana Apr 23 '17 at 08:06
  • 1
    @wlnirvana: After re-installing the smlnj package, `which sml` gives /usr/lib/smlnj/bin/sml. Perhaps this other sml binary is interfering with the newer package's binary. However, this comment section here is ill-suited for forth-and-back troubleshooting. I suggest you try e.g. channel #archlinux on [freenode IRC](http://webchat.freenode.net/). – sshine Apr 23 '17 at 20:37
  • 1
    @wlnirvana /usr/local/bin/sml is unrelated to the official smlnj package. You can use pacman -Qo /usr/local/bin/sml to figure out which package on your system owns it (and then remove that package if you prefer to use smlnj from [community]/[multilib]). – Alexander Apr 25 '17 at 10:34