Archive for Mac

Install Erlang on Mac OSX from sources

If you don’t want to use Flink or MacPorts to get you up and running with Erlang environment then you can follow these steps to compile and install Erlang from sources on your Mac.

First make sure you have installed latest Apple’s Xcode Developer Tools which will provide gcc compiler among the other toys.

The next step is to download Erlang sources and man pages. At the time of writing this post the latest version of Erlang was R12B-5. Consult the Erlang download page for details of current release. Let’s get the above mentioned files :

%  wget http://erlang.org/download/otp_src_R12B-5.tar.gz
%  wget http://erlang.org/download/otp_doc_man_R12B-5.tar.gz

Untar the sources and change current directory:

%  tar xzvf otp_src_R12B-5.tar.gz
%  cd otp_src_R12B-5

What we have to do now is to do usual configure/make/make install steps of compilation. To check available configuration options run:

%  ./configure --help

I will configure Erlang with:

%  ./configure --prefix=/sw/erlang --enable-threads
--enable-smp-support --enable-kernel-poll

Next steps are creating the target directory, compilation and installation, uncompressing the man pages:

%  sudo mkdir /sw/erlang
%  make
%  sudo make install
%  sudo cp ../otp_doc_man_R12B-5.tar.gz /sw/erlang/
%  cd /sw/erlang
%  sudo tar xzvf otp_doc_man_R12B-5.tar.gz
%  sudo rm otp_doc_man_R12B-5.tar.gz

The last step will create man folder in /sw/erlang. Everything almost ready. We should add Erlang to the PATH and man pages to the MANPATH i.e. in ~/.bashrc.

export PATH=$PATH:/sw/erlang/bin
export MANPATH=$MANPATH:/sw/erlang/man

The last step is to load the updated .bashrc file:

%  . ~/.bashrc

Everything should be up and running now. Try:

%  man erlang
%  erl

Popularity: 63% [?]

Comments (2)

Installing Midnight Commander on Mac OSX

Midnight Commander (mc) is one of the tools which I always like to see on *nix systems I use. I just can’t understand why Orthodox file managers like good old Norton Commander on DOS or more up to date excellent Total Commander on Windows are not more popular, but nevertheless I am not here to convince anyone to use them, just want to mention that even if you are a deep command line devotee you could find the tools useful. And certainly if you are deep mouse devotee you should try.

I will explain quickly how to install mc on mac (Mac OSX Leopard 10.5.6) using Fink. Installation with Fink should be painless and this blog post should not exist but I experienced an issue with the process I wanted to share quick solution:

1. If you don’t have Fink yet install it
2. Run:

sudo apt-get install mc

3. Try to start Midnight Commander:

mc

4. Fink should install all dependencies but if you encounter following error go to step 5, if not you are done:

dyld: Library not loaded: /sw/lib/libintl.1.dylib  Referenced from: /sw/bin/mc

Reason: image not found

5. Small dirty hack to fix the previous problem:

sudo ln -s /sw/lib/libintl.3.4.3.dylib /sw/lib/libintl.1.dylib

I know that there are more clean solutions than this one. Share this with me! What’s your favourite OFM?

Popularity: 50% [?]

Comments (3)

Close
E-mail It