/usr/local/include/ncurses is on the include path, but *not* /usr/local/include, which may explain the failure. ------------------------------------------------------- cc -o cgps.o -c -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 5 warnings generated. cc -o gpxlogger -Wl,-rpath=//usr/local/lib gpxlogger.o -L. -L/usr/local/lib -lrt -lgps -lm 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 gpspipe -Wl,-rpath=//usr/local/lib gpspipe.o -L. -L/usr/local/lib -lrt -lgps -lm 1 error generated. cc -o gpsdctl -Wl,-rpath=//usr/local/lib gpsdctl.o -L. -L/usr/local/lib -lrt -lgps -lm scons: *** [cgps.o] Error 1 scons: building terminated because of errors. *** Error code 2 ------------------------------------------------------- Fix: Possibly this is just the include path not including /usr/local/include. Is having /usr/local/include/ncurses on the include path correct? How-To-Repeat: I think this should be as simple as running e.g. "portmaster -D astro/gpsd" with ncurses already installed. In my case, ncurses was pulled in by python27 and python33 so was already present. gpsd was pulled in as an x11/kde4 dependency when running "portmaster -D x11/kde4" Regards, Roger
Responsible Changed From-To: freebsd-ports-bugs->glebius Over to maintainer (via the GNATS Auto Assign Tool)
*** Bug 190460 has been marked as a duplicate of this bug. ***
gpsd-3.14 that is in ports does not have this problem, FYI [1]. Maybe this should be closed OBE? [1] But does have a different ncurses link-time problem - see bug 178732, discusson starting at comment 4. That one should probably be fixed in devel/ncurses per comment 9 there (pending upstream accepting patch from comment 12).
If we don't hear back from reporter, I recommend we close with "Can't reproduce" or "OBE".
I tried to reproduce with the current ports free on current 10.2. On a clean system with no other ports installed, I installed ncurses (disabled docs/examples) and then gpsd (default config): Script started on Wed Feb 24 18:37:36 2016 root@merrilin:/usr/ports/astro/gpsd # make install ===> Building for gpsd-3.14_3 scons: Reading SConscript files ... Checking if compiler accepts -Wextra ...yes Checking if compiler accepts -Wall ...yes Checking if compiler accepts -Wno-uninitialized ...yes Checking if compiler accepts -Wno-missing-field-initializers ...yes Checking if compiler accepts -Wcast-align ...yes Checking if compiler accepts -Wmissing-declarations ...yes Checking if compiler accepts -Wmissing-prototypes ...yes Checking if compiler accepts -Wstrict-prototypes ...yes Checking if compiler accepts -Wpointer-arith ...yes Checking if compiler accepts -Wreturn-type ...yes Checking if compiler accepts -pthread ...yes Checking whether the C++ compiler works... yes Checking for ncurses... yes Checking for libusb-1.0... yes Checking for C library librt... yes Checking for dbus-1... no Turning off dbus-export support, library not found. Checking for bluez... no Turning off Bluetooth support, library not found. Checking for C type in_port_t... yes Checking whether SUN_LEN is declared... yes Checking for C header file linux/can.h... no You do not have kernel CANbus available. Checking for C header file stdatomic.h... yes Checking if compiler supplies __ORDER_BIG_ENDIAN__ ...yes Checking if compiler supplies __ORDER_LITTLE_ENDIAN__ ...yes Checking if compiler supplies __BYTE_ORDER__ ...yes Your compiler has built-in endianness support. Checking for C function daemon()... yes Checking for C function strlcpy()... yes Checking for C function strlcat()... yes Checking for C function clock_gettime()... yes Checking for C header file sys/timepps.h... yes Checking if sys/ioctl.h supplies TIOCMIWAIT ...no Checking that xsltproc can make man pages... yes Checking for QtNetwork... no Altered configuration variables: mtk3301 = False (default True): MTK-3301 support nmea2000 = False (default True): NMEA2000/CAN support pps = False (default True): PPS time syncing support dbus_export = False (default True): enable DBUS export support bluez = False (default True): BlueZ support for Bluetooth devices qt = False (default True): build QT bindings mandir = man (default share/man): manual pages directory pkgconfig = libdata/pkgconfig (default lib/pkgconfig): pkgconfig file directory TypeError: Directory /usr/local/lib found where file expected.: File "/usr/ports/astro/gpsd/work/gpsd-3.14/SConstruct", line 1063: parse_flags=gpsdlibs + ncurseslibs + ['-lm']) File "/usr/local/lib/scons-2.4.1/SCons/Environment.py", line 260: return MethodWrapper.__call__(self, target, source, *args, **kw) File "/usr/local/lib/scons-2.4.1/SCons/Environment.py", line 224: return self.method(*nargs, **kwargs) File "/usr/local/lib/scons-2.4.1/SCons/Builder.py", line 625: env = env.Override(env_kw) File "/usr/local/lib/scons-2.4.1/SCons/Environment.py", line 636: if merges: env.MergeFlags(merges) File "/usr/local/lib/scons-2.4.1/SCons/Environment.py", line 814: args = self.ParseFlags(args) File "/usr/local/lib/scons-2.4.1/SCons/Environment.py", line 800: do_parse(arg) File "/usr/local/lib/scons-2.4.1/SCons/Environment.py", line 671: for t in arg: do_parse(t) File "/usr/local/lib/scons-2.4.1/SCons/Environment.py", line 730: dict['LIBS'].append(self.fs.File(arg)) File "/usr/local/lib/scons-2.4.1/SCons/Node/FS.py", line 1413: return self._lookup(name, directory, File, create) File "/usr/local/lib/scons-2.4.1/SCons/Node/FS.py", line 1392: return root._lookup_abs(p, fsclass, create) File "/usr/local/lib/scons-2.4.1/SCons/Node/FS.py", line 2405: result.diskcheck_match() File "/usr/local/lib/scons-2.4.1/SCons/Node/FS.py", line 2603: "Directory %s found where file expected.") File "/usr/local/lib/scons-2.4.1/SCons/Node/FS.py", line 398: return self.func(*args, **kw) File "/usr/local/lib/scons-2.4.1/SCons/Node/FS.py", line 419: raise TypeError(errorfmt % node.get_abspath()) ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1
(In reply to Roger Leigh from comment #5) For information on that scons error (and the fix for it), see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=178732. If you fix pkgconfig/ncurses.pc or grab an upstream version of ncurses that includes the fix (e.g., http://invisible-mirror.net/archives/ncurses/current/ncurses-6.0-20160305.tgz) and build from that (current ports version does not have the fix) you should get past that error.
Closing this. ncurses was finally fixed to avoid the tricky the pkg-config/scons/freebsd issue that caused this trouble (bug 209526).