Forum:Building Nethack on OS X for Dummy

From NetHackWiki
Jump to navigation Jump to search


Hello friends! Is anyone interested in writing a walkthrough of building 3.6.1 on Mac OS X? Been looking forward to having Status Hilites with 3.6.1 after failing to figure out how to build 3.6.0, only to find that's the only option with 3.6.1! Also just for the sake of being able to use the new version (who doesn't want to tame monkeys with bananas?).

Cheers, TK (talk) 02:43, 18 May 2018 (UTC)

Install XCode

Open Terminal, type the following:

git clone https://github.com/NetHack/NetHack.git

cd NetHack/sys/unix

sh setup.sh hints/macosx

cd ../..; make all; make install

——Rockola (talk) 16:59, 22 May 2018 (UTC)

Thank you! I'm in your debt, mate. I just tried doing all that, but I think I must still be missing something. There are a bunch of new files, but I'm not sure how to run the new NetHack. I tried the NetHackTerm application that already existed on my computer, and got the error message "Unable to open SYSCF_FILE." Any thoughts?

Best, TK (talk) 22:48, 22 May 2018 (UTC)

Interesting. I believe this is a bug in the current development version of NetHack that is in git. Not sure what the correct fix is; however, you can get past this by editing include/config.h - remove line 193, where it says

#define SYSCF                /* use a global configuration */

Then, in the .../NetHack directory, do

make clean; make all; make install

and see if that helped.

--Rockola (talk) 06:41, 23 May 2018 (UTC)

Hmm. How do I do something in the .../NetHack directory? Thanks!!

Best, TK (talk) 15:46, 23 May 2018 (UTC)


I am very cautious with terminal, since one of my friends once cleared part of a file I was working on by accident. I don't want to do anything I'm not supposed to!

Best, TK (talk) 15:58, 23 May 2018 (UTC)

I noticed there were no "man" and "lib" folders in the new "Nethack" folder. I tried copying the man and lib folders in from the Nethack 3.6.0 folder, and now Nethack 3.6.0 runs when I open NetHackTerm!

Best, TK (talk) 16:36, 23 May 2018 (UTC)

If you want to give up on me at any point I won't hold it against you!

Best, TK (talk) 16:42, 23 May 2018 (UTC)

.../NetHack is shorthand for whatever path your NetHack source directory happens to have. If you executed 'git clone' in your home directory, .../NetHack would be /Users/tk/NetHack (if your username is tk).

I don't know what NetHackTerm is or what it does. I only ever run NetHack from the terminal. Try it:

~/nethackdir/nethack

This should execute your newly compiled/installed version of NetHack.

-- Rockola (talk) 18:30, 27 May 2018 (UTC)

Interesting, thank you!

What should I type in terminal in order to execute "make clean; make all; make install" within the Nethack folder? Should I somehow open the Nethack folder first using terminal? (It doesn't look like something I'd want to run on my whole computer! Although that statement might not even make sense, for all I know.)

Thanks much, TK (talk) 20:53, 27 May 2018 (UTC)

cd /Users/tk/NetHack; make clean; etc. Substitute the path of the source directory as appropriate.

--Rockola (talk) 05:43, 28 May 2018 (UTC)


Remarkable; that has worked!! Thank you very much.

One additional question: do you know if there is a way to move my bones and record files from the old Nethack or nethackdir folders into the new ones? What are those files called?

Thank you, TK (talk) 19:12, 28 May 2018 (UTC)

Locate your old nethackdir and cd to it. Bones files start with 'bones'. Not sure about record, look around (the 'ls' command is your friend). The copy command is called 'cp', so to copy the bones files, you would execute

cp bones* ~/nethackdir/

Note that old bones files may be incompatible with a new version of NetHack.

--Rockola (talk) 19:55, 28 May 2018 (UTC)

Thank you once again!

Cheers, TK (talk) 21:31, 28 May 2018 (UTC)