Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

trouble compiling nethack

245 views
Skip to first unread message

hept...@gmail.com

unread,
Nov 3, 2013, 8:01:53 PM11/3/13
to
Hi,

I followed the instructions at nethackwiki for compiling NetHack under linux.

Ended up getting tons of:

warning: format not a string literal and no format arguments [-Wformat-security]

And the compilation attempt ended with:

../sys/share/unixtty.c:41:22: fatal error: curses.h: No such file or directory
compilation terminated.
make[1]: *** [unixtty.o] Error 1
make[1]: Leaving directory `/home/adrian/Desktop/nethack-3.4.3/src'
make: *** [nethack] Error 2

What happened and how can I fix it? I'm running Ubuntu 13.04.

Janis Papanagnou

unread,
Nov 3, 2013, 8:30:17 PM11/3/13
to
On 04.11.2013 02:01, hept...@gmail.com wrote:
> Hi,
>
> I followed the instructions at nethackwiki for compiling NetHack under linux.
>
> Ended up getting tons of:
>
> warning: format not a string literal and no format arguments [-Wformat-security]
>
> And the compilation attempt ended with:
>
> ../sys/share/unixtty.c:41:22: fatal error: curses.h: No such file or directory

Have you installed the curses library?

Have a look into your packet manager or search your file system
find /usr/include -name curses.h

Jonadab the Unsightly One

unread,
Nov 3, 2013, 9:53:26 PM11/3/13
to
> Have you installed the curses library?

The curses library itself is almost certainly installed.
(It's a dependency for pretty much everything.) However,
for _compiling_ against it, having the library installed
is not enough (unless you're on a fully source-based
distro like Gentoo). You have to have the dev package
for the library installed.

Once you track that down and install it, do a
make clean (and maybe make distclean for good
measure) then try compiling again.

Hendrik Weimer

unread,
Nov 4, 2013, 12:45:38 PM11/4/13
to
"hept...@gmail.com" <hept...@gmail.com> writes:

> ../sys/share/unixtty.c:41:22: fatal error: curses.h: No such file or directory
> compilation terminated.
> make[1]: *** [unixtty.o] Error 1
> make[1]: Leaving directory `/home/adrian/Desktop/nethack-3.4.3/src'
> make: *** [nethack] Error 2
>
> What happened and how can I fix it? I'm running Ubuntu 13.04.

# apt-get install libncurses5-dev

Hendrik
0 new messages