February 16, 2008

Steps to Compile and Run Midnight Commander on OSX 10.5


With a complete lack of a "good" commander on OSX (yes it is my opinion and I have run many of them) a few months ago with a fress install of OSX 10.5 installed, I decided to give the old Midnight Commander a try.
I used it a few years ago when toying with linux, but never on a mac. It works, it is fast, it has good keyboard shortcuts (a key feature), but alas after a couple weeks I don't have it installed anymore.



Anyway, today I stumbled across the notes I took as I compiled MC that day and I thought I'd share them here...




Download mc and put in ~/bin/mc . Then start up a terminal and begin the "install" process (don't *nix guys know there are installers for *nix?).


% cd ~/bin/mc
% ./configure


Fails, requires pkg-config (simply invaluable useful little "thing"). Download pkg-config, put in ~/bin/pkg-config .


% cd ~/bin/pkg-config
% ./configure
% make
% sudo make install

% cd ~/bin/mc
% ./configure


Fails, requires GLib.

Download GLib, put in ~/bin/glib-2.12.13 .


% cd ~/bin/glib-2.12.
% ./configure


Fails! requires get-text.


Download get-text, put in ~/bin/gettext-0.17.


% cd ~/bin/gettext-0.17
% ./configure
% sudo make # (takes forever)
% sudo make install

% cd ~/bin/glib-2.12.13
% ./configure
% sudo make
% sudo make install

% cd ~/bin/mc/
% ./configure
% make


Fails! Says:

slsmg.c:76: error: ‘SLtt_Has_Alt_Charset’ undeclared here (not in a function)
slsmg.c:78: error: ‘SLtt_Use_Blink_For_ACS’ undeclared here (not in a function)
make[2]: *** [slsmg.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


So I start fresh with the following:

% sudo make clean
% sudo make


Says:

slsmg.c:76: error: ‘SLtt_Has_Alt_Charset’ undeclared here (not in a function)
slsmg.c:78: error: ‘SLtt_Use_Blink_For_ACS’ undeclared here (not in a function)
make[2]: *** [slsmg.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


Then I google for mc SLtt_Has_Alt_Charset and found www.nabble.com/Compiling-under-OS-X-10.4-got-an-error-t997833.html
Also googled for compile mc on OSX and found http://www.macosxhints.com/article.php?story=20040112172024838 .

Next, I type:

% cd ~/bin/mc/
% ./configure --with-screen=ncurses
% make
% sudo make install
% mc



Horray!!! It works! Remember it requires X11 extensions for OSX. That is a good thing for OSX and a bad thing for running X11 apps on OSX (experience is just lousy for various reasons, especially when using two different keyboard languages). If MC had a Cocoa front-end it would probably be the perfect file manager for osx.

2 comments:

Anonymous said...

thanks for the notes and steps. came up with the same SLtt errors.

scott said...

Did you figure it all out then? Did I miss any steps?