# gpsd fails to build because of missing ncurses



## EmeraldBot (Jun 1, 2014)

Hi everyone,

Alrighty, so I'm trying to build KDE. One of the many, many sub dependencies is gpsd. Here's the build log:

```
===>  Building for gpsd-3.9
scons: Reading SConscript files ...
Checking if compiler accepts -Wextra ...(cached) yes
Checking if compiler accepts -Wall ...(cached) yes
Checking if compiler accepts -Wno-uninitialized ...(cached) yes
Checking if compiler accepts -Wno-missing-field-initializers ...(cached) yes
Checking if compiler accepts -Wcast-align ...(cached) yes
Checking if compiler accepts -Wmissing-declarations ...(cached) yes
Checking if compiler accepts -Wmissing-prototypes ...(cached) yes
Checking if compiler accepts -Wstrict-prototypes ...(cached) yes
Checking if compiler accepts -Wpointer-arith ...(cached) yes
Checking if compiler accepts -Wreturn-type ...(cached) yes
chrpath is not available or use of it has been disabled.
Checking whether the C++ compiler works(cached) yes
Checking for ncurses... (cached) yes
Checking for libusb-1.0... (cached) yes
Checking for C library librt... (cached) yes
Checking for C library libcap... (cached) no
Checking for bluez... (cached) no
Checking for C header file sys/timepps.h... (cached) no
You do not have kernel PPS available.
Checking for C header file linux/can.h... (cached) no
You do not have kernel CANbus available.
Checking for C function daemon()... (cached) yes
Checking for C function strlcpy()... (cached) yes
Checking for C function strlcat()... (cached) yes
Checking for C function clock_gettime()... (cached) yes
Checking for C function pselect()... (cached) yes
Checking for C header file endian.h... (cached) no
Checking for C header file sys/endian.h... (cached) yes
Checking that xsltproc can make man pages... (cached) yes
Checking for QtNetwork... (cached) yes
Altered configuration variables:
nmea2000 = False (default True): NMEA2000/CAN support
bluez = False (default True): BlueZ support for Bluetooth devices
chrpath = False (default True): use chrpath to edit library load paths
mandir = man (default share/man): manual pages directory
pkgconfig = libdata/pkgconfig (default lib/pkgconfig): pkgconfig file directory
scons: done reading SConscript files.
scons: Building targets ...
cc -o cgps.o -c -O2 -pipe -fno-strict-aliasing -D_GNU_SOURCE -Wextra -Wall -Wno-uninitialized -Wno-missing-field-initializers -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -O2 -I/usr/local/include/ncurses cgps.c
cc -o gpsmon.o -c -O2 -pipe -fno-strict-aliasing -D_GNU_SOURCE -Wextra -Wall -Wno-uninitialized -Wno-missing-field-initializers -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -O2 -I/usr/local/include/ncurses gpsmon.c
In file included from cgps.c:93:
In file included from /usr/include/curses.h:141:
/usr/local/include/ncurses/unctrl.h:54:10: fatal error: 'ncurses/ncurses.h' file not found
#include <ncurses/ncurses.h>
         ^
cc -o monitor_italk.o -c -O2 -pipe -fno-strict-aliasing -D_GNU_SOURCE -Wextra -Wall -Wno-uninitialized -Wno-missing-field-initializers -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -O2 -I/usr/local/include/ncurses monitor_italk.c
1 error generated.
cc -o monitor_nmea.o -c -O2 -pipe -fno-strict-aliasing -D_GNU_SOURCE -Wextra -Wall -Wno-uninitialized -Wno-missing-field-initializers -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -O2 -I/usr/local/include/ncurses monitor_nmea.c
scons: *** [cgps.o] Error 1
In file included from gpsmon.c:32:
In file included from ./gpsmon.h:11:
In file included from /usr/include/curses.h:141:
/usr/local/include/ncurses/unctrl.h:54:10: fatal error: 'ncurses/ncurses.h' file not found
#include <ncurses/ncurses.h>
         ^
1 error generated.
scons: *** [gpsmon.o] Error 1
In file included from monitor_italk.c:10:
In file included from ./gpsmon.h:11:
In file included from /usr/include/curses.h:141:
/usr/local/include/ncurses/unctrl.h:54:10: fatal error: 'ncurses/ncurses.h' file not found
#include <ncurses/ncurses.h>
         ^
1 error generated.
In file included from monitor_nmea.c:19:
In file included from ./gpsmon.h:11:
In file included from /usr/include/curses.h:141:
/usr/local/include/ncurses/unctrl.h:54:10: scons: *** [monitor_italk.o] Error 1
fatal error: 'ncurses/ncurses.h' file not found
#include <ncurses/ncurses.h>
         ^
1 error generated.
scons: *** [monitor_nmea.o] Error 1
scons: building terminated because of errors.
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/astro/gpsd
*** Error code 1

Stop.
make: stopped in /usr/ports/astro/gpsd
```
As you can see, it has to due with a missing ncurses. I installed the ncurses port, but that didn't change anything. Any thoughts?


----------



## fonz (Jun 1, 2014)

Have you tried setting

```
MAKE_JOBS_UNSAFE=yes
```
as suggested? If so, did it make any difference?


----------



## EmeraldBot (Jun 1, 2014)

Wow, that was a fast reply! I did try setting it, but it didn't change anything.


----------



## EmeraldBot (Jun 1, 2014)

Alrighty, so I got around the issue by going to /usr/ports/x11/kde4-workspace and removing the option for gpsd (since I don' t use a GPS on my desktop computer). This isn't a fix, it's just sidestepping around the issue, but it works so far. I'd be interested to know, though, if anyone else has this problem.


----------



## fonz (Jun 1, 2014)

EmeraldBot said:
			
		

> I'd be interested to know, though, if anyone else has this problem.


I tried to build astro/gpsd and I'm getting the same problem. You might want to consider posting to freebsd-ports@ or submitting a PR.


----------



## EmeraldBot (Jun 1, 2014)

Okay, I submitted a PR. I'll post its number as soon as I get my confirmation email.


----------

