| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This creates a header for os_compat.c, and moves the related
prototypes into it from gpsd_config.h (as created by SConstruct),
after adding references to it to gpsd.h (via gpsd.h-tail) and a few
other sources that need it but don't include gpsd.h.
It also removes includes of <time.h> in the places where they were
only needed for the code now removed from gpsd_config.h.
TESTED:
Ran "scons build-all check" on OSX 10.9 (with strlcat/strlcpy but no
clock_gettime), OSX 10.12 (with strlcat/strlcpy and clock_gettime),
and Ubuntu 14 (with clock_gettime but no strlcat/strlcpy). Also
verified that fallback versions were not being included where
unnecessary.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change:
1) Makes a few comment-only edits to os_compat.c.
2) Updates the build procedure to use os_compat.c in libgps and
in the Python extensions.
3) Deletes the now-obsolete clock_gettime.c, daemon.c, and strl.c.
TESTED:
Ran "scons build-all check" on OSX 10.9 and Ubuntu 14.
|
|
|
|
|
|
|
|
|
|
| |
Temporarily reinstating the CheckFunc hack, pending further
investigation.
TESTED:
Verified that the only differences in SConstruct across the
revert/unrevert are the minor intervening changes. Ran "build-all
check" on OSX.
|
| |
|
|
|
|
| |
Otherwise we get mysterious failures on Raspberry Pis.
|
|
|
|
|
|
|
|
|
|
|
| |
This changes the default value of the target_python option to
'python', i.e. the system default Python. The former blank default
based the selection on the SCons Python, which is guaranteed not to be
the system default Python if the latter is any Python 3.
TESTED:
Running xgps now works when the default Python is Python 3, without
explicitly specifying target_python.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although the exact nature of the original problem is neither
fully understood nor easily reproducible, the change that
moved the warning setup toward the end of the Configure section
makes the "CheckFunc for strict prototypes" hack almost certainly
unnecessary.
TESTED:
Ran "scons build-all check" on four versions of OSX and two versions
of Linux, as well as FreeBSD, OpenBSD, and NetBSD.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The MAGIC_HAT code was always pointless without KPPS support, but the
recent change to skip the "fake PPS" device caused it to reference a
function which is not defined without KPPS support. The fix is to
disable MAGIC_HAT altogether in this case.
Doing this required moving the PPS-related configure checks earlier,
so that the magic_hat option can be turned off before it gets exported
to the config file.
TESTED:
Built (on Ubuntu) both with and without sys/timepps.h, and verified
correct setup in gpsd_config.h, as well as successful builds. Also
ran "scons check" for good measure (in both cases).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a build option called 'magic_hat', and makes the code for
MAGIC_HAT_GPS and MAGIC_LINK_GPS conditional on it. It currently
defaults to True on Linux and False otherwise. It's meaningless on
non-Linux platforms, though at present there are no
conditionally-present options, so this one is also present on all
platforms.
TESTED:
Tested on a Beaglebone Black with suitable symlinks added (and running
a kernel with PPS_CLIENT_KTIMER turned off. Verified that the kludge
behaves as intended when enabled, and is inoperative when disabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although the LIBPATH override removal wasn't bad per se, it
exacerbated a bug where the standard LIBPATH setup was being bypassed
in the "cleaning or helping" cases, causing many targets to mismatch
for cleanup. That was missed due to not including a "cleanup test" in
the testing. The fix is simply to move the LIBPATH setup out of the
conditional area.
TESTED:
Ran scons "build-all check" followed by "scons -c" and then "git clean
-dxf", and verified that now only the usual scons-internal files
remain after cleanup.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 6e1d6bd6 added "LIBPATH='.'" overrides to most build setups,
though the purpose was unclear. The SConstruct script already sets up
LIBPATH to include the current directory, as well as the sysroot
directory when that option is being used. It also includes the
directory for the dbus library when applicable, though that is also
passed via the dbusflags variable where needed.
That change used to break dbus linking on non-Linux platforms. It no
longer does so after fixing the dbusflags setup, but cross-linking may
still be broken by the sysroot removal. In any case, it seems rather
pointless to both set up and then discard a proper LIBPATH value.
It's also worth noting that commit 6e1d6bd6 also switched from dynamic
linking to static linking, eliminating any long-term effect of the
LIBPATH choice. The LIBPATH overrides may have been an unsuccessful
attempt to make dynamic linking work without chrpath.
TESTED:
Tested builds and ran regression tests on all OSX versions from 10.5
through 10.12, as well as Ubuntu 14.04.1, CentOS 7, FreeBSD 10.3,
OpenBSD 5.6, and NetBSD 6.1.5.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change defers the conditional enabling of various compiler
warnings until after various other Configure checks are performed,
for a couple of reasons:
1) It reduces the noise in config.log, by not having warnings
come from the more substantive Configure checks.
2) It *may* avoid the CheckFunc problem with -Wstrict_prototypes
without having to rewrite it, though that hasn't been confirmed.
TESTED:
Ran "scons build-all check" with this change successfully. Also
compared before and after versions of config.log, seeing expected
improvements and nothing unreasonable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The two flags -Wmissing-prototypes and -Wmissing-declarations were
being both conditionally included after a validity test, and then
unconditionally included later. In cases where they were acceptable,
that resulted in doubly including them, and in cases where they
were unacceptable, that meant breaking the build.
The fix is simply to remove the unconditional adds. This is a
necessary but not sufficient condition for building with CC=c99
to work.
TESTED:
Ran "scons build-all check" on OSX, and verified that the two
flags were still present in the appropriate commands, but now
only once. Also verified that building with CC=c99 no longer
fails in a manner related to those flags.
|
|
|
|
|
|
|
|
|
| |
Debug level 3 makes macro definitions available to the debugger, which
can be useful. Given that debug=yes is only used when necessary,
there's no reason to be stingy with the debug info when it is.
TESTED:
Ran a debug build and observed "-g3" in the command lines.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code that generates the version string for development versions
tries to identify the specific code state in one of two ways. When
the build is within a git repo, it uses "git describe" output. When
the build is not within a git repo, it uses the date and time.
Before this change, the applicable date and time was the current date
and time, causing revision.h and everything that depends on it to be
rebuilt every time, even if no sources changed. This change causes it
to use the latest mtime among the relevant sources instead, thus still
having the desired effect without unnecessary changes in the version
string.
Since git doesn't preserve mtimes, the resulting date/time may reflect
the last checkout of the relevant files rather than the last actual
change, but this is still a vast improvement. And recent versions of
git avoid clobbering the mtimes of files that are not actually altered
by the checkout.
This change also alters the version format somewhat in this case, both
to incorporate the actual version number, and to eliminate some
truncation which was probably slightly incorrect, anyway.
A sample new format is:
"3.17~dev-2016-09-24T19:06:46"
TESTED:
Tested both git and non-git cases. Did not test the non-"dev" case,
but that code path is untouched.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The clock_gettime() function was originally a "second-tier" library
function in Linux, implemented in librt and requiring "-lrt" when
linking. Later versions moved it to libc, with the "-lrt" being
unnecessary. The build recipe for test_gpsmm here was failing to
account for the optional need for the "-lrt", causing it to fail
to build on debian Wheezy.
TESTED:
Now passes "scons build-all check" on a Beaglebone Black running
Debian Wheezy, where test_gpsmm formerly failed to build. Also
retested on OSX 10.9 (where librt doesn't exist) for good measure.
|
| |
|
|
|
|
| |
Sigh...
|
|
|
|
| |
All regression tests pass.
|
|
|
|
|
|
|
|
| |
Wow, that smoked out a ton of deprecated stuff.
bcopy(), bzero, usleep(), etc.
Better now at leasure than when under the gun later.
All regressions pass.
|
|
|
|
| |
Sadly, gpsd fails when these are enabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For cleaning (and helping) purposes, tiocmiwait can be set
unconditionally true, since the (usually nonexistent) program
can be cleaned on any platform.
This change also avoids building (and installing) the ppscheck
manpage when the program isn't being built.
TESTED:
Ran "scons build-all check", "sudo scons install",
"sudo scons uninstall", "scons -h", and "scons -c" on both OSX and
Linux, verifying correct behavior.
Signed-off-by: Gary E. Miller <gem@rellim.com>
|
| |
|
| |
|
|
|
|
|
| |
This tool makes it easy for the newbie to unambiguous verify that
his GPS has PPS.
|
|
|
|
| |
...so the GPS can be monitored when ntod is running.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
...will work on BeagleBone and Odroid.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Scons' CheckFunc does not work with recent compiler versions and
-Wstrict-prototypes being enabled.
|
|
|
|
|
| |
Enhance the check for struct timespec as building in
Debian unstable fails otherwise.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Uninstall was removing the contents of the Python package directory,
but not the directory itself. There's an asymmetry where an
unmentioned directory is created automatically when needed, but not
removed when it's rendered empty.
In Python 2, this is a fairly harmless error, albeit slightly unclean,
since directories lacking an __init__.py file are ignored by the
import logic. But in Python 3, which allows the init file to be
omitted, leaving the empty directory around causes "import gps" to
apparently succeed and create an empty "namespace" module. Not only
does this confuse programs attempting to detect import failures, but
it also prevents a future import from working even after adjusting
sys.path, since reimporting an already imported module is a NOP.
The fix is simply to include the directory explicitly in the list for
python_install. This has no actual effect on the install, but
includes the directory in the uninstall.
TESTED:
Ran install/uninstall and verified that the directory is now removed
by the uninstall.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The CheckProg function is a relatively recent addition to scons, and
is missing from, e.g., scons 2.3.0. It's worth using it to simplify
the error case, but fallback code is needed to allow building with a
nonempty target_python option and an older scons. This fix makes it
work correctly in the non-error case, and also avoids crashing the
build in the common error case, albeit without avoiding duplicate
error messages.
TESTED:
Ran "scons -c" with blank, valid, and invalid target_python values
both on OSX with scons 2.4.1 and Linux with scons 2.3.0.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because the new Python config setup wasn't being run in the cleaning
or helping cases, certain variables that were still being referenced
weren't being defined, causing scons to crash. There are two
different cases:
1) In the cleaning case, it's actually necessary to run the Python
config code, because some of the filenames to be cleaned may be
affected by the config values. This reworks things to run that
portion of the config section even in the cleaning case, though with a
slight tweak to make a couple of the messages less verbose.
2) In the helping case, nothing related to building is actually
needed, but providing valid values is easier than fixing all the
places that need them. To avoid having to run a possible external
target Python, it obtains the values unconditionally from the scons
Python in this case.
Also, the minimal build was broken due to a couple of lines of code
being inappropriately included in the python=no case. That is now
fixed as well.
TESTED:
Ran "scons build-all check", "scons -c" and "scons -h", with and
without a target_python specified, and with and without minimal=yes.
All cases work, and no "cleaning leaks" were observed. Also ran the
broken-build checker up through length 1, seeing only the two
long-standing failures, plus two (relatively) new ones that are almost
certainly unrelated to this change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a target_python option to allow building for a specific
Python version which may differ from the Python running scons. If
blank (currently the default), it uses the scons Python as before, but
otherwise it's expected to be a command to launch some version of
Python. In the latter case, all Python-related configuration
parameters are obtained by running the specified Python as an external
program.
The primary effect of this is to allow the C extensions to be built
appropriately for a given Python version, but it also means that all
Python code used for tests is executed with the target Python (which
is necessary in some cases, and desirable for consistency in all
cases). However, any Python programs executed purely as build helpers
are executed with the scons Python for consistency.
Note that any "pure Python" programs run from the build directory can
be run with any compatible Python version, but programs using the C
extensions will only work with Python versions compatible with the
target_python used when building. The built C extensions may or may
not use versioned naming, depending on how the target Python specifies
the configuration.
The default value of python_libdir is no longer the libdir for the
scons Python, but instead the default blank value specifies that the
actual value should be obtained from the target Python. It should
rarely be appropriate to modify this value.
TESTED:
Ran "scons build-all check valgrind-audit" with the default Python
(2.7) and with all six available compatible versions (2.6-2.7 and
3.2-3.5). Also ran gegps, gpscat, gpsprof, xgps, and xgpsspeed in the
same circumstances. Except for xgps and xgpsspeed with 2.6, which
doesn't work due to py-gobject3 unavailability for 2.6, everything
worked correctly.
|
|
|
|
| |
It grabs packets, but does not decode any yet.
|
| |
|
|
|
|
|
|
|
| |
Upstream SCons tests have no space before the ellipses and a space
after, bring gpsd tests in line with that for the visual consistency.
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
|
|
|
|
|
| |
TESTED:
Verified that "scons -c" now removes all of gps/__pycache__.
|
| |
|
| |
|