Linux build doc and a comment update

This commit is contained in:
nhmall
2026-08-30 09:59:10 -04:00
parent 845be15439
commit 9c8b8249eb
3 changed files with 73 additions and 76 deletions
+1 -1
View File
@@ -153,7 +153,7 @@ SYSOBJ ?= $(TARGETPFX)ioctl.o $(TARGETPFX)unixmain.o $(TARGETPFX)unixtty.o \
# flags for Linux
# compile normally
# CFLAGS = -O2 -fomit-frame-pointer -I../include
# LFLAGS = -L/usr/X11R6/lib
# LFLAGS = -L/usr/lib64
# OR compile backwards compatible a.out format
# CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include
# LFLAGS = -b i486-linuxaout -L/usr/X11R6/lib
+1 -1
View File
@@ -89,7 +89,7 @@ SRCDIR = $(NHSROOT)/src
# flags for Linux
# compile normally
# CFLAGS = -O2 -fomit-frame-pointer -I../include
# LFLAGS = -L/usr/X11R6/lib
# LFLAGS = -L/usr/lib64
# OR compile backwards compatible a.out format
# CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include
# LFLAGS = -b i486-linuxaout -L/usr/X11R6/lib
+71 -74
View File
@@ -83,80 +83,77 @@ Note that curses, X11, and Qt will almost certainly require the installation
of prerequisite packages in order to successfully build with support for
additional interfaces. See below.
+----------+-------+-----------------+--------------------------------------+
| Platform |Interf.| Build Variable | Prerequisite package |
|----------+-------+-----------------+--------------------------------------|
| MacOS | tty | WANT_WIN_TTY | none |
|----------+-------+-----------------+--------------------------------------|
| MacOS | curses| WANT_WIN_CURSES | ncurses development libraries |
|----------+-------+-----------------+--------------------------------------|
| MacOS | X11 | WANT_WIN_X11 | You will need to obtain and |
| | | | install XQuartz if you want X11 |
| | | | support in your build. |
| | | | (Attempting to run X11.app will |
| | | | describe where to get it) |
| | | | |
| | | | One possible way: |
| | | | brew install xquartz |
| | | | brew install libxft |
| | | | brew install fontconfig |
| | | | brew install freetype |
|----------+-------+-----------------+--------------------------------------|
| MacOS | Qt | WANT_WIN_QT | You will need to obtain and |
| | | | install Qt if you want Qt |
| | | | support in your build. |
| | | | |
| | | | One possible way: |
| | | | brew install pkg-config |
| | | | brew install Qt6 |
|----------+-------+-----------------+--------------------------------------|
| Linux | tty | WANT_WIN_TTY | |
| (Ubuntu) | | | |
|----------+-------+-----------------+--------------------------------------|
| Linux | curses|WANT_WIN_CURSES=1| If it isn't already included |
| (Ubuntu) | | | in your distribution, here is one |
| | | | possible way: |
| | | | |
| | | | sudo apt-get install libncurses-dev |
|----------+-------+-----------------+--------------------------------------|
| Linux | X11 | WANT_WIN_X11=1 | Here is one possible way to obtain |
| (Ubuntu) | | | the required packages: |
| | | | |
| | | |sudo apt-get install libx11-dev |
| | | |sudo apt-get install libmotif-dev |
| | | |sudo apt-get install libxaw7-dev |
| | | |sudo apt install xfonts-utils |
| | | |(That last one is for bdftopcf and |
| | | | mkfontdir utils) |
| | | | |
|----------+-------+-----------------+--------------------------------------|
| Linux | Qt5 | WANT_WIN_QT=1 | Here is one possible way to obtain |
| (Ubuntu) | | | the required packages: |
| | | | |
| | | |sudo apt-get install qtbase5-dev |
| | | |sudo apt-get install qtmultimedia5-dev|
| | | | |
| | | |Another odd note about Qt on Linux is |
| | | |that if you find you are getting the |
| | | |following error trying to run NetHack |
| | | |after you build it with Qt support: |
| | | |"error while loading shared |
| | | |libraries: libQt5Core.so.5: cannot |
| | | |open shared object file: No such file |
| | | |or directory", |
| | | |you may have to fix that (one-time) |
| | | |by issuing the command below: |
| | | | |
| sudo strip \ |
| --remove-section=.note.ABI-tag/usr/lib/x86_64-linux-gnu/libQt5Core.so.5 |
|----------+-------+-----------------+--------------------------------------|
| Linux | Qt6 | WANT_WIN_QT6=1 | Here is one possible way to obtain |
| (Ubuntu) | | | the required packages: |
| | | | |
| | | |sudo apt-get install qt6-base-dev |
| | | |sudo apt-get install \ |
| | | | qt6-multimedia-dev |
+----------+-------+-----------------+--------------------------------------+
+----------+-------+------------------+-------------------------------------+
| Platform |Interf.| make variable | Prerequisite package |
|----------+-------+------------------+-------------------------------------|
| MacOS | tty | WANT_WIN_TTY=1 | none |
|----------+-------+------------------+-------------------------------------|
| MacOS | curses| WANT_WIN_CURSES=1| ncurses development libraries |
|----------+-------+------------------+-------------------------------------|
| MacOS | X11 | WANT_WIN_X11=1 | You will need to obtain and |
| | | | install XQuartz if you want X11 |
| | | | support in your build. |
| | | | (Attempting to run X11.app will |
| | | | describe where to get it) |
| | | | |
| | | | One possible way: |
| | | | brew install xquartz |
| | | | brew install libxft |
| | | | brew install fontconfig |
| | | | brew install freetype |
|----------+-------+------------------+-------------------------------------|
| MacOS | Qt | WANT_WIN_QT=1 | You will need to obtain and |
| | | | install Qt if you want Qt |
| | | | support in your build. |
| | | | |
| | | | One possible way: |
| | | | brew install pkg-config |
| | | | brew install Qt6 |
|----------+-------+------------------+-------------------------------------|
| Linux | tty | WANT_WIN_TTY=1 | sudo apt install libncurses-dev |
| (Ubuntu) | | | |
|----------+-------+------------------+-------------------------------------|
| Linux | tty | WANT_WIN_TTY=1 | sudo dnf install make gcc g++ |
| (Fedora) | | | sudo dnf install ncurses-devel |
|----------+-------+------------------+-------------------------------------|
| Linux | curses|WANT_WIN_CURSES=1 | If it isn't already included |
| (Ubuntu) | | | in your distribution, here is one |
| | | | possible way: |
| | | | |
| | | | sudo apt install libncurses-dev |
|----------+-------+------------------+-------------------------------------|
| Linux | X11 | WANT_WIN_X11=1 | Here is one possible way to obtain |
| (Ubuntu) | | | the required packages: |
| | | | |
| | | | sudo apt install libx11-dev |
| | | | sudo apt install libmotif-dev |
| | | | sudo apt install libxaw7-dev |
| | | | sudo apt install xfonts-utils |
| | | | (That last one is for bdftopcf |
| | | | and mkfontdir utils) |
| | | | |
|----------+-------+------------------+-------------------------------------|
| Linux | X11 | WANT_WIN_X11=1 | Here is a possible way to obtain |
|(Fedora) | | | all prerequisite packages required |
| | | | (in addition to those needed for |
| | | | tty above) on a fresh installation |
| | | | of Fedora 44 workstation: |
| | | | |
| | | | sudo dnf install libX11-devel |
| | | | sudo dnf install libXt-devel |
| | | | sudo dnf install libXaw |
| | | | sudo dnf install libXaw-devel |
| | | | sudo dnf install libXft-devel |
| | | | sudo dnf install xorg-x11-font-utils|
| | | | sudo dnf install mkfontscale |
| | | | |
|----------+-------+------------------+-------------------------------------|
| Linux | Qt | WANT_WIN_QT=1 | Here is one possible way to obtain |
| (Ubuntu) | | | the required packages: |
| | | | |
| | | |sudo apt install qt6-base-dev |
| | | |sudo apt install qt6-multimedia-dev |
+----------+-------+------------------+-------------------------------------+
There are other hints file options that are meant to impact your NetHack build
in various other ways too. A reference list can be found in