Tags

hardware
ovirt
3d printing
raspberry pi
refs
filesystems
ruby
rubygems
polisher
ldap
fedora
rails
screencasting
hackerspace
vnc
meditation
legaleese
travel
brno
selenium
testing
vim
ssh
sshfs
puppet
html5
jruby
fudcon
conference
aeolus
ohiolinuxfest
jquery
svg
redmine
plugins
haikus
poetry
gsoc
apache
qpid
cloud
miq
db
snap
pygtk
android
nethack
bitcoin
projects
sig315
book review
hopex
conferences
linux
crypto
syrlug
presentation
pidgin
gnome-shell
deltacloud
music
massive attack
fosscon
xmlrpc
retro gaming
sinatra
qmf
webdev
libvirt
virtualization
isitfedoraruby
bundler_ext
slackware
xpath
tips
mercurial
x3d
git
aikido
jsonrpc
rjr
backups
google code in
gaming
svn
yum
xsd
rxsd
virtfs
design patters
rome
europe
project
gcc
compiler
omega
simulator
lvm
storage
engineering expo
rpm
rake
notacon
grep
sed
distros
philosophy
splix
gtk
python
autotools
passenger

Apr 9 2017 nethack gcc compiler fedora

Compiling / Playing NetHack 3.6.0 on Fedora

The following are the simplest instructions required to compile NetHack 3.6.0 for Fedora 25.

Why might you want to compile NetHack from source, instead of simply installing the package (sudo dnf install nethack)? For many reasons. Applying patches for custom game mechanics. Running an alternate frontend. And more!

While the official Linux instructions are complete, they are pretty involved and must be followed exactly for things to work. To give the dev team credit, they’ve been supporting a plethora of platforms and environments for 20+ years (and the number is still increasing). While a consolidated guide was written for compiling NetHack from scratch on Ubuntu/Debian but nothing exists for Fedora… until now!


# On a fresh Fedora installation (with updates) install the dependencies:

$ sudo dnf install ncurses-devel libXt-devel libXaw-devel byacc flex

# Download the NetHack (3.6.0) source tarball from the official site and unpack it:

$ tar xzvf [download]
$ cd nethack-3.6.0/

# Run the base setup utility for Linux:

$ cd sys/unix
$ ./setup.sh hints/linux
$ cd ../..

# Edit [include/unixconf.h] to uncomment the following line…

#define LINUX

# Edit [include/config.h] to uncomment the following line…

#define X11_GRAPHICS

# Edit [src/Makefile] and update the following lines…

WINSRC = $(WINTTYSRC)
WINOBJ = $(WINTTYOBJ)
WINLIB = $(WINTTYLIB)

# …to look like so

WINSRC = $(WINTTYSRC) $(WINX11SRC)
WINOBJ = $(WINTTYOBJ) $(WINX11OBJ)
WINLIB = $(WINTTYLIB) $(WINX11LIB)

# Edit [Makefile] to uncomment the following line

VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xpm rip.xpm

# In previous line, apply this bugfix by changing…

pilemark.xpm

# …to

pilemark.xbm

# Build and install the game

$ make all
$ make install

# Finally create [~/.nethackrc] config file and populate it with the following: OPTIONS=windowtype:x11


# To play:

$ ~/nh/install/games/nethack

Go get that Amulet!