diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-09-19 16:51:09 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-09-19 16:51:09 -0400 |
commit | c754e3e093866fd4546b78f9e8cccd0a6a06a49c (patch) | |
tree | 0354572dc5f0b95c3c70ada7bea790f89cd759af /INSTALL | |
parent | 8457d412f88a53c1fe12b8ae38b63ad99f58b9ae (diff) | |
download | gpsd-c754e3e093866fd4546b78f9e8cccd0a6a06a49c.tar.gz |
Split out build instructions so we can add a detailed section on cross-build.
Diffstat (limited to 'INSTALL')
-rw-r--r-- | INSTALL | 120 |
1 files changed, 8 insertions, 112 deletions
@@ -2,6 +2,9 @@ Here are the steps for installing GPSD and verifying its performance: +Instructions for building GPSD from source (including cross-building) +are in the file "build.txt" + == Check that your GPS is live and you can get data from it == Start by making sure you can get data from your GPS, otherwise the later @@ -100,120 +103,13 @@ will need Python 2.6 or 2.4+ & simplejson. The Python code in GPSD is 2.4-compatible except that you need either the json library module from 2.6 or the functionally equivalent simplejson backport. -== Check your build prerequisites == - -(Skip this if you are installing GPSD from a binary package rather -than building from a source tree.) - -Necessary components for any build: - -C compiler -> gpsd and client library are written in C -Python -> some code is generated from python scripts -scons -> for the build recipe - -C99 conformance is required in the compiler. The C code depends on one -non-C99 feature: anonymous unions. We could eliminate these, but the -cost would be source-level interface breakage if we have to move -structure members in and out of unions. - -GPSD is normally built and tested with GCC. The shared-memory -interface relies on one GCCism, but the code is otherwise pretty -compiler-agnostic. It is reported that clang produces a gpsd that -passes all regression tests. If -Wmissing-field-initializers or -its non-gcc equivalent is set you will get a lot of warnings; -this is due to generated code and cannot be fixed. - -You will need scons version 1.2.0 or later to build the code. The -autotools build from 2.96 and earlier versions has been dropped. - -Having the following optional components on your system will enable -various additional capabilities and extensions: - -C++ compiler -> libgpsmm C++ wrapper for the library -chrpath -> prevents a potential security hole in built binaries - -If you have libusb-1.0.0 or later, the GPSD build will autodetect -this and use it to discover Garmin USB GPSes, rather than groveling -through /proc/bus/usb/devices (which has been deprecated by the -Linux kernel team). - -For working with DBUS, you'll need the DBUS development -headers and libraries installed. Under Debian/Ubuntu these -are the packages libdbus-1-dev and libdbus-glib-1-dev. - -Under Ubuntu, the ncurses package you want is libncurses5-dev. - -For building from the source tree, or if you change the man page -source, xslt and docbook xsl style files are used to generate nroff --man source from docbook xml. The following packages are used in this -process: - -libxslt -> xsltproc is used to build man pages from xml -docbook-xsl -> style file for xml to man translation - -The build degrades gracefully in the absence of any of these. You should -be able to tell from configure messages which extensions you will get. - -Under Ubuntu and most other Debian-derived distributions, an easy way -to pick up the prerequisites is: "apt-get build-dep gpsd" - -== How to build the software from source == - -(Skip this if you are installing GPSD from a binary package rather -than building from a source tree.) - -To build gpsd from source, simply call 'scons' in a working-directory -copy. - -Note: if you are going to use the RTCM-104 support, you should compile -with gcc4; if you don't have it installed as your default -compiler, do this by specifying CC=gcc4 before the configure -command. The rtcm2.c file confuses the gcc-3.4.[23] optimizer -at -O2 level, making it generate incorrect code. - -Note: If your scons fails with the complaint "No tool named 'textfile'", -you need to upgrade it. This feature was introduced during the long -interval after the 1.2.0 release; 1.2.1 and later versions will have it. - -By giving command-line options to scons you can configure certain rarely-used -optional features in, or compile standard features out to reduce gpsd's -footprint. "scons --help" will tell the story; look under "Local Options" -and consult the source code if in doubt. - -In particular, small embedded systems and those without threading. It is -possible to build gpsd without thread support if you configure with -pps=no. You'll lose support for updating the clock from PPS pulses. - -Also, for systems using DBUS: gpsd includes support for shipping fixes -as DBUS notifications, but it is not compiled in by default. Configure -with the option "dbus=yes" to get it working. - -If your linker run fails with missing math symbols, see the FIXME comment -relating to implicit_links in the scons recipe; you probably need to -build with implicit_link=no. And report your platform, ideally along -with a way of identifying it from Python, to the gpsd maintainers. - -libQgpsmm is a Qt version of the libgps/libgpsmm pair. Thanks to -the multi-platform approach of Qt, it allows the gpsd client library -to be available on all the Qt supported platforms. Please see -http://qt.nokia.com/doc/4.6/supported-platforms.html for a status of -Qt supported platforms as of version 4.6. - -You can build libQgpsmm if you have Qt (specifically the (specifically -QtCore and QtNetwork modules) version 4.5.3 or higher. You will also -need a C++ compiler supported by Qt (tested on GCC 4.4.0/mingw on -Windows and GCC 4.1.2 on linux). - -Specifically for linux: You can specify the installation prefix by -running "scons prefix=<installation_root>". Default value is -"/usr/local". +== Building and installing the software == -Please refer to Qt's documentation at -http://qt.nokia.com/doc/4.6/platform-specific.html for platform specific -building documentation +If you are have GPSD available as a binary package, its name is almost +certainly "gpsd"; simply hand that to your installer and go to the +next step. -After buiulding, run 'scons testregress' to test the correctness of the -build. +Instructions for building from source are in the file "build.txt". == How to test the software == |