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