Difficulties compiling nethack
Since the game nethack is not in the repos (its a fantastic game, it really should be, its in the repos of all the other distributions like fedora or ubuntu), I am trying to compile it myself, but I get an issue with lex and the build fails when I try to compile it
The error I get when I try to make install:
make: Entering directory '/home/etai/Downloads/nethack-3.6.0/src' make: '../include/date.h' is up to date. make: Leaving directory '/home/etai/Downloads/nethack-3.6.0/src' lex dgn_comp.l make: lex: Command not found make: *** [Makefile:344: dgn_lex.c] Error 127 make: Leaving directory '/home/etai/Downloads/nethack-3.6.0/util' make: *** [Makefile:201: dungeon] Error 2
I can post the full output of the command, but I put what I thought was the relevant part
Is the issue that the flex package provided by solus does not have the lex command?
I would be very grateful for any help
Solus does not have the lex command in the flex package but I have found a workaround.
There should be a file in sys/unix/ called Makefile.utl
Run this command:
cat Makefie.utl | grep -n lex
and you will get a list of lines that have the word “lex” in them [and their associated line numbers].
There should be two lines [near the top] that say:
LEX = lex # LEX = flex
Change the lines to:
# LEX = lex LEX = flex
and try again. Good luck!