build.adoc 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360
  1. = Building GPSD from source
  2. :date: 17 November 2021
  3. :description: Steps for Building GPSD from source
  4. :docinfodir: www
  5. :keywords: GPSD, GPS, installation
  6. :robots: index,follow
  7. :sectlinks:
  8. :toc: macro
  9. include::www/inc-menu.adoc[]
  10. This is a guide to building GPSD from a bare source tree. It includes
  11. guidance on how to cross-build the package.
  12. Some hints for people building binary packages are in
  13. packaging/README.PACKAGERS.
  14. (This file is marked up in asciidoc.)
  15. == Quick start
  16. You can download the most recent development snapshot from:
  17. https://gitlab.com/gpsd/gpsd/tree/master
  18. You can download the latest gpsd tarball from:
  19. http://download.savannah.gnu.org/releases/gpsd/
  20. Under Linux, assuming you have all your build prerequisites in place,
  21. these lines will do, and need to be run as root:
  22. tar -xzf gpsd-X.YY.tar.gz
  23. cd gpsd-X.YY
  24. scons && scons check && scons udev-install
  25. If you get any errors, you need to read the detailed instructions that follow.
  26. If 'scons' fails, it is possible that your target system has moved to
  27. Python 3 and removed the program 'python'. Python.org says that if
  28. you have an installed Python, there should be a program in your path
  29. called 'python'. This is specified in PEP 394. This rule is not always
  30. followed. You can work around this by linking python3 to python like
  31. this
  32. ln -s /usr/bin/python3 /usr/bin/python
  33. Both 'scons' and 'gpsd' work fine on either Python 2 or Python 3. Which
  34. python you have installed should be transparent to the user, if python
  35. is installed correctly.
  36. Occasionally, builds may fail in completely bizarre ways due to a
  37. corrupted scons database. This seems to relate to ^Cing the build at
  38. an inopportune moment. If you suspect that, see "Reverting to a clean
  39. state" below and then try again.
  40. == Supported platforms
  41. Native-build success should be expected on the following platforms,
  42. provided you have the prerequisites listed in the next section
  43. installed:
  44. * Any desktop or server Linux distribution.
  45. * OpenWRT and derivatives such as CeroWRT.
  46. * FreeBSD, NetBSD, OpenBSD
  47. * Android, using the official Google toolchain from the NDK
  48. We consider failure to build and function on any of these platforms a
  49. serious bug; if you encounter it, please complain on the development
  50. list <gpsd-dev@nongnu.org>.
  51. Port difficulty to any system conforming to POSIX-2001.1 should be minimal.
  52. A Cygwin port is in progress but not complete.
  53. Cross-compilation to embedded Linuxes (in addition to the OpenWRT family)
  54. is usually fairly straightforward. An illustrative build transcript
  55. is included at the end of this file.
  56. == Check your build prerequisites
  57. Necessary components for any build:
  58. |============================================================================
  59. |C compiler | gpsd and client library are written in C
  60. |scons | for executing the build recipe
  61. |Python2.x(x>=6) or 3.y(y>=2) | for scons and some helper scripts
  62. |============================================================================
  63. On Gentoo, a basic build only requires this package:
  64. |============================================================================
  65. |dev-util/scons | for executing the build recipe
  66. |============================================================================
  67. === C compiler
  68. C99 conformance is required in the compiler. The C code depends on one
  69. C11 feature (supported by GCC, clang, and pretty much any C compiler
  70. that also speaks C++): anonymous unions. We could eliminate these,
  71. but the cost would be source-level interface breakage if we have to
  72. move certain structure members in and out of unions.
  73. Some portions of the code using shared-memory segments are improved by
  74. the C11 stdatomic.h features for lockless concurrency. These are: the
  75. SHM export mode in shmexport.c, the code for writing clock corrections
  76. to NTP in ntpshmwrite.c, and the code for reading NTP corrections in
  77. ntpshmread.c. These features have been supported in GCC since 4.7 and
  78. clang since 3.1.
  79. GPSD is normally built and tested with GCC. Do not compile with a version
  80. older than 4.1.1; there are several known issues with older versions,
  81. including (a) non-standards-conformant floating-point generation that
  82. messes up regression testing, (b) a compiler bug affecting RTCM2 code
  83. generation, (c) the option -Wno-missing-field-initializers is
  84. unavailable, leading to a flood of warnings (this is due to generated
  85. code and cannot be fixed).
  86. clang produces a gpsd that passes all regression tests.
  87. If you get a build failure including the text "error adding symbols:
  88. DSO missing from command line" or the complaint "ERROR: CC doesn't
  89. work", you nay have tripped over stale data in the builder's
  90. configuration cache. Clean the directory with "scons -c" then manually
  91. remove .sconsign.*dblite and retry your build.
  92. === Python
  93. You will need Python 2.x at minor version 6 or later or Python 3 at
  94. at minor version 3 or later.
  95. While Python is required to build GPSD from source (the build uses
  96. some code generators in Python), it is not required to run the service
  97. daemon. In particular, you can cross-compile onto an embedded system
  98. without having to take Python with you.
  99. scons finds the python used for scons separately from the python that
  100. should be used for the target. It seems to look for the target python
  101. as "python", which as above is supposed to exist per python norms.
  102. However, some packaging systems avoid a bare python, preferring to
  103. bind a program to a particular release as it is built. On systems
  104. without a "python" command, invoking scons as:
  105. scons target_python=python3.7
  106. seems to help.
  107. You will need both basic Python and (if your package system makes the
  108. distinction) the Python development package used for building C
  109. extensions. Usually these are called "python" and "python-dev". You
  110. will know you are missing the latter if your compilation fails
  111. because of a missing Python.h.
  112. The xgps and xgpsspeed clients will only be installed if these Python
  113. extensions are installed:
  114. |===========================================================================
  115. |python-gi | Python bindings for gobject-introspection libraries
  116. |python-gi-cairo | Python bindings for Cairo toolkit under GI
  117. |===========================================================================
  118. On Gentoo systems those packages are named:
  119. |============================================================================
  120. |dev-python/pygobject
  121. |dev-python/pycairo
  122. |============================================================================
  123. The ubxtool and zerk clients will only be usable in direct-serial mode
  124. if this Python extension is installed:
  125. |===========================================================================
  126. |pyserial | Python Serial Port extension
  127. |===========================================================================
  128. On Gentoo systems that package is named:
  129. |============================================================================
  130. |dev-python/pyserial
  131. |============================================================================
  132. The *gpsplot( client requires Matplotlib to do its job of creating dynamic
  133. plots.
  134. On Gentoo systems that package is named:
  135. |============================================================================
  136. |dev-python/matplotlib
  137. |============================================================================
  138. === Scons
  139. You will need scons version 2.3.0 (from 2013-03-02) or later to build the code.
  140. (Note that there is no evidence of recent testing of scons older than about 3.1.)
  141. === Optional build components
  142. Having the following optional components on your system will enable
  143. various additional capabilities and extensions:
  144. |============================================================================
  145. |C++ compiler | allows building libgpsmm C++ wrapper for client library
  146. |Qt 4.53+ | allows building libQgpsmm C++ wrapper for client library
  147. |(n)curses | curses screen-painting library, used by cgps and gpsmon
  148. |pps-tools | adds support for the KPPS API, for improved timing
  149. |libusb | Userspace access to USB devices
  150. |dbus | D-Bus support
  151. |============================================================================
  152. If you have libusb-1.0.0 or later, the GPSD build will autodetect
  153. this and use it to discover Garmin USB GPSes, rather than groveling
  154. through /proc/bus/usb/devices (which has been deprecated by the
  155. Linux kernel team).
  156. On Gentoo systems those packages are named:
  157. |=============================================================================
  158. |dev-qt/qtcore | Basic Qt
  159. |dev-qt/qtnetwork | Qt network components
  160. |sys-libs/ncurses | curses screen-painting library, used by cgps and gpsmon
  161. |net-misc/pps-tools | adds support for the KPPS API, for improved timing
  162. |virtual/libusb | Userspace access to USB devices
  163. |sys-apps/dbus | D-Bus
  164. |=============================================================================
  165. Debian/Ubuntu, and Fedora/RHEL, derived systems often split packages
  166. into binary, and development packages. Raspbian is Debian derived. This
  167. does not apply to Gentoo derived systems.
  168. These development packages usually have a "-dev" suffix. Installing the
  169. development package usually installs the binary package for you.
  170. The development Debian/Ubuntu/Raspbian pacakages are:
  171. |==============================================================================
  172. |libncurses5-dev | curses screen-painting library, used by cgps and gpsmon
  173. |libusb-1.0-0-dev | userspace USB programming library development files
  174. |libdbus-1-dev | D-Bus Development package
  175. |==============================================================================
  176. The development Fedora/RHEL packages are:
  177. |==============================================================================
  178. |ncurses-devel | curses screen-painting library, used by cgps and gpsmon
  179. |==============================================================================
  180. You can build libQgpsmm if you have Qt (specifically QtCore and
  181. QtNetwork modules) version 4.5.3 or higher. You will also need a C++
  182. compiler supported by Qt (tested on GCC 4.4.0/mingw on Windows and GCC
  183. 4.1.2 on linux). Please refer to Qt's documentation at
  184. http://qt.nokia.com/doc/4.6/platform-specific.html for platform
  185. specific building documentation
  186. Depending on how your distribution packages ncurses you may also require
  187. libtinfo5, a separate terminfo library.
  188. On some older versions of Ubuntu (notably 11.10) there is a packaging
  189. defect that may cause your build to blow up in SCons. It's a missing
  190. package info file for the tinfo library. To fix this, install the file
  191. packaging/tinfo.pc in /usr/lib/pkgconfig/tinfo.pc. 13.10 fixed this.
  192. If your kernel provides the RFC 2783 KPPS (kernel PPS) API, gpsd will
  193. use that for extra accuracy. Many Linux distributions have a package
  194. called "pps-tools" that will install KPPS support and the timepps.h
  195. header file. We recommend you do that. If your kernel is built in
  196. the normal modular way, this package installation will suffice.
  197. For building from the source tree, or if you change the man page source,
  198. Asciidoctor is to generate nroff -man source from asciidoc markup. The
  199. following packages are used in this process:
  200. |============================================================================
  201. |asciidoctor | Documentation front end with light markup
  202. |============================================================================
  203. If both are present, then AsciiDoctor is preferred.
  204. On Gentoo systems this packages is named:
  205. |==============================================================================
  206. |dev-ruby/asciidoctor | Documentation front end with light markup
  207. |==============================================================================
  208. The build degrades gracefully in the absence of any of these. You should
  209. be able to tell from scons messages which extensions you will get.
  210. Under Ubuntu and most other Debian-derived distributions, an easy way
  211. to pick up the prerequisites is: "apt-get build-dep gpsd". Note
  212. that your sources.list will need "deb-src" lines for this, not
  213. just "deb" lines.
  214. If you are custom-building a Linux kernel for embedded deployment, you
  215. will need some subset of the following modules:
  216. |============================================================================
  217. |pl2303 | Prolific Technology, Inc. PL2303 Serial Port
  218. |ftdi_sio | FTDI 8U232AM / FT232
  219. |cypress_m8 | M8/CY7C64013
  220. |cp210x | Cygnal Integrated Products devices
  221. |garmin_gps | Garmin USB mice including GPS-18
  222. |cdc_am | USB Communication Device Class Abstract Control Model interface
  223. |pps-gpio | For KPPS support on ARM systems
  224. |pps-ldisc | For KPPS support with RS-232 ports
  225. |pps_parport | For KPPS support with a parallel port
  226. |============================================================================
  227. These are listed in rough order of devices covered as of 2013; the
  228. PL23203 by itself accounts for over 70% of deployed USB mice. We
  229. recommend building with pl2303, ftdi_sio, cypress_m8, and cp210x.
  230. We've received a bug report that suggests the Python test framework
  231. requires legacy PTY support (CONFIG_LEGACY_PTYS) from the Linux
  232. kernel. You should make sure you're in the 'dialout' group in order
  233. to have permission to use these devices.
  234. == How to build the software from source
  235. To build gpsd for your host platform from source, simply call 'scons'
  236. in a working-directory copy. (Cross-build is described in a later
  237. section.)
  238. To clean the built files, run 'scons -c' or 'scons --clean'.
  239. Run 'rm -f .sconsign.*dblite' to clear the scons
  240. database. Doing both should return your working directory to a
  241. near pristine state as far as building is concerned. Some user created
  242. files may remain, and source code changes will not have been reverted..
  243. When in doubt, restart with a clean copy of the source.
  244. You can specify the installation prefix, as for an autotools build, by
  245. running "scons prefix=<installation_root>". The default value is
  246. "/usr/local". The environment variable DESTDIR also works in the
  247. usual way.
  248. If your linker run fails with missing math symbols, see the FIXME
  249. comment relating to implicit_links in the scons recipe; you probably
  250. need to build with implicit_link=no. If this happens, please report
  251. your platform, ideally along with a way of identifying it from Python,
  252. to the GPSD maintainers.
  253. After building, please run 'scons check' to test the correctness
  254. of the build. It is not necessary to install first. Python is
  255. required for regression tests. If any of the tests fail, you probably
  256. have a toolchain issue. The most common such problem is failures of
  257. strict C99 conformance in floating-point libraries.
  258. Once you have verified that the code is working, "scons install"
  259. will install it it in the system directories. "scons uninstall" will
  260. undo this. Note: because scons is a single-phase build system, this
  261. may recompile everything. If you want feature-configuration options,
  262. you need to specify them here.
  263. To enable hotplugging of USB GPSes under Linux, you may do 'scons
  264. udev-install' to put the appropriate udev rules and wrapper files in
  265. place.
  266. You will need php and php-gd installed to support the PHP web page
  267. generator included with the distribution. To install it, copy the file
  268. 'gpsd.php' to your HTML document directory. Then see the
  269. post-installation instructions in INSTALL.adoc for how to configure it.
  270. === Setting prefix and customizing install locations
  271. Adding prefix=/usr/foo will cause scons to install to /usr/foo instead
  272. of the default /usr/local, much as --prefix=/usr/foo works with
  273. autoconf.
  274. In addition, there are a number of other scons command-line variables
  275. that can be used to control the location of various install
  276. directories. Many of these, such as bindir -- which unsurprisingly
  277. defaults to "bin" -- are unlikely to be ever used. Generally, these
  278. can be set to absolute paths or relative paths. Relative paths are
  279. under prefix. See SConscript and search for "bindir" to see the list.
  280. Some of these variables are typically used to adapt to differing
  281. layout conventions. For example, pkgsrc would use
  282. docdir=share/doc/gpsd as per-package documentation is placed in
  283. prefix/share/doc/PKGNAME, and mandir=man as man pages are in
  284. prefix/man rather than prefix/share/man.
  285. The includedir= argument sets the location to which gpsd's include
  286. files (gps.h, libgpsmm.h) are installed. So using prefix=/usr/foo and
  287. includedir=/usr/bar/include will install everything but includes in
  288. /usr/foo and put the includes in /usr/bar. This is highly unlikely to
  289. be desired, but given to illustrate the behavior.
  290. The includedir=/usr/foo/include argument has no other effects; in
  291. particular it does add -I/usr/foo/include to compilation lines.
  292. === Specifiying locations for prerequisites
  293. This section explains how to configure the build to find
  294. prerequisites. It can be skipped by those who find that the build
  295. succeeds.
  296. Software that is needed to build gpsd may in general be in various
  297. locations. (While many GNU/Linux users doing a straightforward build
  298. will have all prerequisites in /usr, most other operating systems have
  299. additional software in other than /usr, and even on Linux one may wish
  300. to build a separate copy of gpsd with alternate versions of
  301. prerequisites.)
  302. The build will invoke the compiler and linker, so that headers and
  303. libraries in the default compiler and linker search paths will be
  304. found without any additional configuration.
  305. In addition, scons will use pkgconfig to find some prerequisites.
  306. These will be found if the pc files are in the default pkgconfig
  307. search path, and the resulting -I and -L flags added to the compile
  308. and link lines.
  309. The gpsd scons build scripts also support passing in CPPFLAGS and
  310. LDFLAGS via environment variables, similar to how these are used with
  311. autoconf and almost all other build systems. As an example,
  312. CPPFLAGS=-I/usr/foo/include will cause -I/usr/foo/include to be added
  313. to compilation lines.
  314. === Gentoo Build and Installation
  315. A cheat sheet for building gpsd from git source on a freshly installed
  316. Gentoo. Perform these steps, in order, as root.
  317. The '--noreplace' option to 'emerge' prevents reinstalling packages that
  318. are already installed.
  319. ----
  320. # install the required build tools
  321. emerge --noreplace dev-util/scons dev-vcs/git
  322. # optional, to support the KPPS API, for improved timing
  323. emerge --noreplace net-misc/pps-tools
  324. # optional, for cgps and gpsmon
  325. emerge --noreplace sys-libs/ncurses
  326. # optional, for ubxtool and zerl serial port support
  327. emerge --noreplace dev-python/pyserial
  328. # optional, to support Garmin USB devices
  329. emerge --noreplace virtual/libusb
  330. # optional, to support Bluetooth GPS devices
  331. emerge --noreplace net-wireless/bluez
  332. # Skip the following optionals on a minimal system:
  333. # optional, to build man page and html pages
  334. emerge --noreplace dev-ruby/asciidoctor
  335. # Optionals for desktop (X) systems:
  336. # optional, for xgps and xgpsspeed
  337. emerge --noreplace dev-python/pygobject dev-python/pycairo
  338. # optional, for gpsplot
  339. emerge --noreplace dev-python/matplotlib
  340. # D-Bus support
  341. emerge --noreplace sys-apps/dbus
  342. # To build Qt compatible library.
  343. emerge --noreplace dev-qt/qtcore dev-qt/qtnetwork
  344. # "scons check" requires bc
  345. emerge --noreplace sys-devel/bc
  346. # prerequisites now installed
  347. # make a place to keep the source
  348. mkdir -p /usr/local/src/GPSD
  349. cd /usr/local/src/GPSD
  350. # grab a shallow clone of gpsd from git.
  351. git clone --depth 1 https://gitlab.com/gpsd/gpsd.git
  352. cd gpsd
  353. # clean the tree, just in case
  354. scons -c
  355. # build the project
  356. scons
  357. # check the results
  358. scons check
  359. # and install if it looks good
  360. scons install
  361. ----
  362. == Apple Desktop
  363. === Special Notes for macOS X Build and Installation
  364. gpsd will build, install and run on macOs. Install the Xcode application
  365. from the Apple store. Then install Homebrew (https://brew.sh/) to get
  366. all the stuff you need, like git, scons, python, etc.
  367. As a normal user, install homebrew, then install scons and asciidoctor.
  368. Installing scons pulls in python3. Brew will become root as needed, so
  369. starting asd a normal user is just security theater.
  370. ----
  371. $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  372. $ brew install scons asciidoctor
  373. ----
  374. Now you need to become root. Make a place for the gpsd source to live,
  375. use git to install it there, then go there. Build gpsd with "scons",
  376. then install it with "scons install"
  377. ----
  378. # mkdir -p /usr/local/src/GPS
  379. # cd /usr/local/src/GPS
  380. # git clone https://gitlab.com/gpsd/gpsd.git
  381. # cd gpsd
  382. # scons && scons install
  383. ----
  384. === Special Notes for OS X Build and Installation
  385. gpsd will build, install and run on OS X (osX). The easiest way to
  386. do so is to first install the MacPorts package. Follow their install
  387. procedure at: http://www.macports.org/install.php
  388. Then use their port command to install scons. Optionally git if you
  389. want to access the development source. Optionally install asciidoctor
  390. to build the documentation.
  391. ----
  392. # port install scons
  393. # port install git
  394. # port install asciidoctor
  395. ----
  396. Currently the osX port does not work with Qt5. To see the build
  397. failure:
  398. ----
  399. # port install qt5
  400. # scons --config=force qt_versioned=5
  401. ----
  402. If you have Qt5 installed, and want to avoid the build failure, build
  403. this way:
  404. ----
  405. # scons --config=force qt=no
  406. ----
  407. While running gpsd, or scons check, you may run out of shared memory
  408. segments. If so, you will see this error message:
  409. ----
  410. gpsd:ERROR: shmat failed: Too many open files
  411. ----
  412. By default OS X allows a very small number of shared segments. You
  413. can check your allowed maximum number of shared segments, then increase
  414. the maximum number, with these commands:
  415. ----
  416. # sysctl kern.sysv.shmseg=8
  417. kern.sysv.shmseg: 32 -> 8
  418. # sysctl -a | fgrep shmseg
  419. kern.sysv.shmseg: 8
  420. # sysctl kern.sysv.shmseg=16
  421. kern.sysv.shmseg: 8 -> 16
  422. # sysctl -a | fgrep shmseg
  423. kern.sysv.shmseg: 16
  424. ----
  425. If you are using a USB based GPS you will likely need the Prolific
  426. PL2303 driver. You can find it here:
  427. http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=229&pcid=41
  428. == Special Notes for Raspberry Pi Build and Installation
  429. *gpsd* will build, install and run on the Raspberry Pi (RasPi) and Pi 2
  430. using Debian Jessie. Other distributions based on Debian (raspbian, etc)
  431. will work fine as well. The *gpsd* package in Debian Wheezy is known to be
  432. flaky, be sure to update to a new version of gpsd from source.
  433. === Raspbian
  434. Before compiling gpsd from source, you will need to update your system
  435. as root. Switching to the latest Raspbian distribution (Buster) is
  436. strongly recommended.
  437. ----
  438. # apt-get update
  439. # apt-get dist-upgrade
  440. # rpi-update
  441. # reboot
  442. ----
  443. Multiple versions of gpsd can not co-exist on the same system. You need
  444. to ensure gpsd from a package is not on the system:
  445. ----
  446. # apt purge gpsd
  447. ----
  448. Then install the required packages:
  449. ----
  450. # apt-get install scons libncurses5-dev python-dev pps-tools
  451. # apt-get install git-core
  452. ----
  453. Git-core is required to build from a git repository. pps-tools is for
  454. PPS timing.
  455. The rest of the installation is just as for any other source based
  456. install, as already described above.
  457. === Other Debian derivatives (including stock)
  458. ==== Bullseye (11)
  459. The main difference between Bullseye and Buster (below) is that Python
  460. 2 is not in Bullseye by default. It is available. gpsd is Python 3
  461. compatible, so that's what we will use on Bullseye.
  462. Multiple versions of gpsd can not co-exist on the same system. You
  463. need to ensure gpsd from a package is not on the system. Also check
  464. for and remove any libgps?? packages.
  465. ----
  466. # dpkg-query -l libgps* gpsd*
  467. .....
  468. # apt purge gpsd libgps28
  469. ----
  470. Then update your system, and install the packages required by gpsd:
  471. ----
  472. # apt-get update
  473. # apt-get dist-upgrade
  474. # reboot
  475. # apt-get install scons libncurses-dev python-dev pps-tools
  476. # apt-get install git-core
  477. # apt-get install build-essential manpages-dev pkg-config
  478. ----
  479. If "apt-get install scons ..." fails, check the file "/etc/apt/sources.list".
  480. Git-core is required to build from a git repository.
  481. pps-tools is for PPS timing.
  482. Build-essential installs the compiler and associated tools.
  483. Manpages-dev is for the associated man pages.
  484. Pkg-config is a helper for scons.
  485. Gtk3 is only required to run xgps and xgpsspeed. You do not need a local
  486. X11 server installed, but it still pulls in a lot of packages.
  487. ----
  488. # apt-get install python-gi-dev
  489. # apt-get install libgtk-3-dev
  490. ----
  491. Ubxtool and zerk may optionally use the pyserial module for
  492. direct connection to the GNSS receiver:
  493. ----
  494. # apt-get install python3-serial
  495. ----
  496. gpsd may optional connect to dbus with the libdbus package:
  497. ----
  498. # apt-get install libdbus-1-dev
  499. ----
  500. gpsplot uses matplotlib, which is in the package
  501. python3-matplotlib.
  502. ----
  503. # apt install python3-matplotlib
  504. ----
  505. Several programs written in Python (xgps, xgpsspeed, etc.) are
  506. installed locally. So if you intend to use them, set your
  507. PYTHONPATH. You may wish to add it to your shell's log-in scripts to
  508. make it permanent. For more information on PYTHONPATH, see:
  509. https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH
  510. Something like this, but see the output from the "scons install"
  511. command and other scons commands.
  512. ----
  513. # export PYTHONPATH=${PYTHONPATH}:/usr/local/lib/python3/dist-packages
  514. ----
  515. Some very old Garmin USB devices need libusb:
  516. ----
  517. # apt-get install libusb-1.0-0-dev
  518. ----
  519. If you wish to build the documentation, be warned it pulls in a
  520. lot of packages. Build the documentation is a prerequisite to
  521. building the HTML files for the website (www/), and also to make
  522. a source tarball (scons dist). To install the tools to build the
  523. documentation:
  524. ----
  525. apt-get install asciidoctor
  526. ----
  527. The rest of the installation is just as for any other source based
  528. install:
  529. ----
  530. # git clone https://gitlab.com/gpsd/gpsd.git
  531. # cd gpsd
  532. # scons -c && scons && scons check && scons install
  533. ----
  534. ==== Buster (10) with python2
  535. These Buster instructions seem to also work for Devuan and Maemo Leste.
  536. Multiple versions of gpsd can not co-exist on the same system. You need
  537. to ensure gpsd from a package is not on the system:
  538. ----
  539. # apt purge gpsd libgps23
  540. ----
  541. Then update your system, and install the packages required by gpsd:
  542. ----
  543. # apt-get update
  544. # apt-get dist-upgrade
  545. # reboot
  546. # apt-get install scons libncurses-dev python-dev pps-tools
  547. # apt-get install git-core
  548. # apt-get install build-essential manpages-dev pkg-config
  549. ----
  550. If "apt-get install scons" fails, check the file "/etc/apt/sources.list".
  551. Git-core is required to build from a git repository.
  552. pps-tools is for PPS timing.
  553. Build-essential installs the compiler and associated tools.
  554. Manpages-dev is for the associated man pages.
  555. Pkg-config is a helper for scons.
  556. Gtk3 is only required to run xgps and xgpsspeed. You do not need a local
  557. X11 server installed, but it still pulls in a lot of packages.
  558. ----
  559. # apt-get install python-gi-dev python-cairo-dev
  560. # apt-get install python-gobject-2-dev libgtk-3-dev
  561. ----
  562. Ubxtool and zerk may optionally use the pyserial module for
  563. direct connection to the GNSS receiver:
  564. ----
  565. # apt-get install python-serial
  566. ----
  567. gpsd may optional connect to dbus with the libdbus package:
  568. ----
  569. # apt-get install libdbus-1-dev
  570. ----
  571. Some very old Garmin USB devices need libusb:
  572. ----
  573. # apt-get install libusb-1.0-0-dev
  574. ----
  575. If you wish to build the documentation, be warned it pulls in a
  576. lot of packages. Build the documentation is a prerequisite to
  577. building the HTML files for the website (www/), and also to make
  578. a source tarball (scons dist). To install the tools to build the
  579. documentation:
  580. ----
  581. apt-get install asciidoctor
  582. ----
  583. The rest of the installation is just as for any other source based
  584. install:
  585. ----
  586. # git clone https://gitlab.com/gpsd/gpsd.git
  587. # cd gpsd
  588. # scons --config=force && scons install
  589. ----
  590. ==== Jessie (8)
  591. Multiple versions of gpsd can not co-exist on the same system. You need
  592. to ensure gpsd from a package is not on the system:
  593. ----
  594. # apt purge gpsd
  595. ----
  596. Then install the required packages:
  597. ----
  598. # apt-get install scons libncurses5-dev python-dev pps-tools
  599. # apt-get install git-core
  600. ----
  601. Git-core is required to build from a git repository. pps-tools is for
  602. PPS timing.
  603. The rest of the installation is just as for any other source based
  604. install, as already described above.
  605. ==== Wheezy
  606. Multiple versions of gpsd can not co-exist on the same system. You need
  607. to ensure gpsd from a package is not on the system:
  608. ----
  609. # apt purge gpsd
  610. ----
  611. Wheezy, being older, requires updating the tools for compiling
  612. and testing gpsd:
  613. You need scons at 2.3.0 or higher to build.
  614. If your scons is less than 2.3.0 you will need to get a newer scons
  615. from wheezy-backport. Partial instructions are detailed here:
  616. https://backports.debian.org/Instructions/
  617. Basically you need to add this line to /etc/apt/sources.list:
  618. ----
  619. deb http://http.debian.net/debian wheezy-backports main
  620. ----
  621. Then do another update:
  622. ----
  623. apt-get update
  624. ----
  625. Which may lead you to this error if you lack a full set of debian keys:
  626. ----
  627. W: GPG error: http://http.debian.net wheezy-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553
  628. ----
  629. Partial but detailed instructions to fix that are here:
  630. ----
  631. https://wiki.debian.org/SecureApt
  632. ----
  633. Use either of the following code blocks. The first is more robust:
  634. ----
  635. apt-get install debian-archive-keyring
  636. ----
  637. ----
  638. gpg --keyserver pgpkeys.mit.edu --recv 8B48AD6246925553
  639. gpg -a --export 46925553 | apt-key add -
  640. apt-get update
  641. ----
  642. You can now install scons from the wheezy-backports repository:
  643. ----
  644. apt-get -t wheezy-backports install scons
  645. ----
  646. and other tools:
  647. ----
  648. # apt-get install scons libncurses5-dev python-dev pps-tools
  649. # apt-get install git-core
  650. ----
  651. Git-core is required to build from a git repository. pps-tools is for
  652. PPS timing.
  653. The rest of the installation is just as for any other source based
  654. install, as described above.
  655. ==== Ubuntu Buster 20
  656. If you have Raspbian Buster, that is not this.
  657. Preliminary install notes.
  658. Multiple versions of gpsd can not co-exist on the same system. You need
  659. to ensure gpsd from a package is not on the system:
  660. ----
  661. # apt purge gpsd
  662. ----
  663. Then install the required packages:
  664. ----
  665. apt install gcc scons python-gi python-gi-cairo g++
  666. apt install python-gobject libgtk-3-dev
  667. apt install libncurses5-dev libtinfo-dev pps-tools
  668. apt install gir1.2-gtk-3.0
  669. ----
  670. If you wish to build the documentation, be warned it pulls in a
  671. lot of packages. Build the documentation is a prerequisite to
  672. building the HTML files for the website (www/), and also to make
  673. a source tarball (scons dist). To install the tools to build the
  674. documentation:
  675. ----
  676. apt install asciidoctor
  677. ----
  678. The rest of the installation is just as for any other source based
  679. install, as described above.
  680. ==== Ubuntu 18.04 LTS
  681. Preliminary install notes.
  682. If you have Raspbian Buster, that is not this.
  683. Multiple versions of gpsd can not co-exist on the same system. You need
  684. to ensure gpsd from a package is not on the system:
  685. ----
  686. # apt purge gpsd
  687. ----
  688. Then install the required packages:
  689. ----
  690. apt install gcc scons python-gi python-gi-cairo g++
  691. apt install libncurses5-dev libtinfo-dev pps-tools
  692. apt install gir1.2-gtk-3.0
  693. ----
  694. If you wish to build the documentation, be warned it pulls in a
  695. lot of packages. Build the documentation is a prerequisite to
  696. building the HTML files for the website (www/), and also to make
  697. a source tarball (scons dist). To install the tools to build the
  698. documentation:
  699. ----
  700. apt install asciidoctor
  701. ----
  702. The rest of the installation is just as for any other source based
  703. install, as described above.
  704. == BSD derivatives ==
  705. === Special Notes for FreeBSD Build and Installation ===
  706. gpsd will build, install and run on FreeBSD.
  707. Due to the missing CAN bus support (linux/can.h), NMEA2000/CAN
  708. is not supported on FreeBSD.
  709. Use their pkg command to install scons, and optionally git if you
  710. want to access the development source.
  711. If you want to build the QT bindings, you'll also need the
  712. qt5-network and pkgconf packages.
  713. ----
  714. # pkg install scons
  715. # pkg install git
  716. # ln -s /usr/local/bin/python2.7 /usr/local/bin/python
  717. # ln -s /usr/local/bin/python2.7 /usr/local/bin/python2
  718. # ln -s /usr/local/bin/python3.6 /usr/local/bin/python3
  719. # git clone https://gitlab.com/gpsd/gpsd.git
  720. # cd gpsd
  721. # scons --config=force && scons install
  722. ----
  723. FreeBSD fails to create the python links as required by PEP394.
  724. So you need to add them yourself, as above.
  725. === Special Notes for NetBSD 8.1 Build and Installation
  726. gpsd will build, install and run on NetBSD.
  727. Use their 'pkg_add' command to install pkgin. Then use pkgin to
  728. install the required tools.
  729. ----
  730. # export PKG_PATH=\
  731. "http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/8.1/All"
  732. # pkg_add -v pkgin
  733. # echo http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/8.1/All > \
  734. /usr/pkg/etc/pkgin/repositories.conf
  735. # pkgin update
  736. # pkgin install python37 py37-curses
  737. # ln -s /usr/pkg/bin/python3.7 /usr/pkg/bin/python
  738. # ln -s /usr/pkg/bin/python3.7 /usr/pkg/bin/python3
  739. # pkgin install py37-scons
  740. # pkgin install ncurses
  741. # pkgin install openssl mozilla-rootcerts
  742. # mozilla-rootcerts install
  743. # pkgin install git
  744. # git clone https://gitlab.com/gpsd/gpsd.git
  745. # cd gpsd
  746. # scons --config=force && scons install
  747. ----
  748. === Special Notes for OpenBSD 6.6 Build and Installation
  749. gpsd will build, install and run on NetBSD.
  750. All you need for a basic gpsd install is scons and git. Then
  751. create the missing python link.
  752. ----
  753. # pkg_add scons
  754. # pkg_add git
  755. # ln -s /usr/local/bin/python2 /usr/local/bin/python
  756. ----
  757. Then install the normal way.
  758. ----
  759. # git clone https://gitlab.com/gpsd/gpsd.git
  760. # cd gpsd
  761. # scons --config=force && scons install
  762. ----
  763. == Special Notes for Fedora derivatives
  764. === Special Notes for Fedora 32, 33 Build and Installation
  765. gpsd currently will build, install and run on Fedora 32, 33 and 34. Any
  766. supported architecture should work.
  767. Upgrade you packages, install the gcc compiler and tools. Clone the gpsd
  768. source, and then build it. Fedora recommends a reboot after using dnf.
  769. ----
  770. # dnf upgrade --refresh
  771. # dnf install -y gcc-c++ python3-devel scons asciidoctor bzip2
  772. # dnf install -y xz git dnf-plugins-core
  773. # git clone https://gitlab.com/gpsd/gpsd.git
  774. # cd gpsd
  775. # scons
  776. # dnf builddep -y buildtmp/packaging/rpm/gpsd.spec
  777. # scons -c
  778. # scons && scons check && scons install
  779. ----
  780. If you wish to make an rpm of your build:
  781. ----
  782. # scons dist
  783. # dnf install -y chrpath fedora-packager rpmdevtools
  784. # rpmdev-setuptree
  785. # cp gpsd-3*.tar.* ~/rpmbuild/SOURCES/
  786. # rpmbuild -ba gpsd-3*/packaging/rpm/gpsd.spec
  787. ----
  788. === Special Notes for CentOS 7 Build and Installation
  789. gpsd currently will build, install and run on CentOS 7.
  790. Install the gcc compiler and tools. Install EPEL.
  791. Note: there is no EPEL for i386.
  792. Use the yum command to install git if you
  793. want to access the development source.
  794. ----
  795. # yum group install "Development Tools"
  796. # yum install git
  797. # yum install \
  798. https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  799. # yum install scons
  800. # yum install python-devel
  801. # yum install ncurses-devel
  802. # yum install pps-tools-devel
  803. # git clone https://gitlab.com/gpsd/gpsd.git
  804. # cd gpsd
  805. # scons
  806. ----
  807. == Leap Seconds
  808. The header gpsd.h contains the value BUILD_LEAPSECONDS. This is set,
  809. at release time, to the leap second value current at that time.
  810. Ideally gpsd would be reading the standard leapseconds.cache file
  811. provided by most distributions for the current leap second.
  812. Most of the drivers supply the current leap second, after the GNSS
  813. receiver sends it in a message to gpsd. But none of the standard NMEA
  814. 0183 messages supply the current leap second. Thus the need for a fall
  815. back leap second value.
  816. The leap second value is mainly used to check for invalid UTC time from
  817. the GNSS receiver. If the receiver is affected by the GPS Week Number
  818. Roll Over (WKNO) bug, then the UTC time it reports will be off by 1024
  819. weeks.
  820. All GNSS receivers may be using the wrong leap second internally on
  821. startup. This may happen if it has been less than about 12 minutes since
  822. power-up; the receiver has not yet received the current leapsecond
  823. offset as part of the periodic almanac download. Page 18, subframe 4,
  824. of the almanac contains the leap second data.
  825. The gpsd daemon may be using the wrong leap second internally if
  826. the compiled in leap second is no longer valid, and the GNSS receiver
  827. has not reported the current leap second to gpsd.
  828. == Optional features
  829. By giving command-line options to scons you can configure certain rarely-used
  830. optional features in, or compile standard features out to reduce gpsd's
  831. footprint. "scons --help" will tell the story; look under "Local Options"
  832. and consult the source code if in doubt.
  833. Here are a few of the more important feature switches. Each description
  834. begins with the default for the switch.
  835. pps=yes: for small embedded systems and those without threading,
  836. it is possible to build gpsd without thread support if you build
  837. with pps=no. You'll lose support for updating the clock from PPS
  838. pulses.
  839. dbus_export=no: for systems using D-Bus: gpsd includes support for
  840. shipping fixes as D-Bus notifications, compiled in by default. This
  841. may lead to complaint messages during testing on systems that don't
  842. support D-Bus. Build with the option "dbus_export=no" to disable it
  843. qt=yes: libQgpsmm is a Qt version of the libgps/libgpsmm
  844. pair. Thanks to the multi-platform approach of Qt, it allows the gpsd
  845. client library to be available on all the Qt supported platforms.
  846. Please see http://qt.nokia.com/doc/4.6/supported-platforms.html for a
  847. status of Qt supported platforms as of version 4.6.
  848. minimal=no: people building for extremely constrained environments
  849. may want to set this. It changes the default for all boolean (feature)
  850. options to false; thus, you get *only* the options you specify on the
  851. command line. Thus, for example, if you want to turn off all features
  852. except socket export. Note the nmea0183 driver is always built.
  853. ----
  854. scons minimal=yes socket_export=yes
  855. ----
  856. will do that.
  857. ----
  858. scons minimal=yes gpsd=False gpsdclients=False
  859. ----
  860. generates only libgps.a
  861. ----
  862. scons minimal=yes shared=True gpsd=False gpsdclients=False
  863. ----
  864. generates only libgps.so
  865. == Port and toolchain testing
  866. 'scons check' will run a comprehensive regression-test suite. You
  867. should do this, at minimum, every time you build from source on a new
  868. machine type. GPSD does enough bit-twiddling and floating point that
  869. it is very sensitive to toolchain problems; you'll want to be sure
  870. those aren't going to bite you in production.
  871. So that the tests will run fast and be easy to do often, we make the test
  872. framework shove data through the pty and socket layers *way* faster
  873. than would ever occur in production. If you get regression-test
  874. failures that aren't repeatable and look like the test framework is
  875. sporadically failing to feed the last line or two of test loads, try
  876. using the slow=yes option with scons check. If that fails, try
  877. increasing the delay value via the WRITE_PAD environment variable
  878. (above the value reported in the test output). If you have to do this,
  879. please report your experience to the GPSD maintainers.
  880. Both the builds and the tests are highly parallelizable via the scons
  881. -j option, which can gain a substantial speedup on a multicore machine.
  882. Because the output from the various jobs is interleaved, it may be more
  883. difficult to understand error results with multiple jobs. In that event,
  884. simply rerun without the -j option for more straightforward output.
  885. If coveraging is enabled (coveraging=yes), then Python programs run
  886. during testing are run via Python coveraging. This prefixes the relevant
  887. commands with the content of the python_coverage option, whose default
  888. value of "coverage run" is appropriate if the standard Python coverage
  889. package is installed and accessible in the command path. It can be
  890. set to a different value if necessary, or set to the empty string to
  891. disable Python coveraging. The latter happens automatically (with a
  892. message) if the tool cannot be found. When running multiple jobs with
  893. "-j", if python_coverage has its default value, "--parallel" is automatically
  894. appended to the command. With a non-default setting, accommodating
  895. parallelism is the user's responsibility.
  896. For instructions on how to live-test the software, see the file INSTALL.adoc.
  897. === Regenerating regression tests
  898. Sometimes, changes are made to code that cause the output to be
  899. different. Examples are bug fixes and changes to precision. In these
  900. cases, the regression tests must be updated. This is dangerous, and
  901. one must guard against the possibility of introducing a bug and
  902. recording that bug's output as the desired state.
  903. A suggested procedure is
  904. * Create a minimal commit with the breaking change. Do not include
  905. any other changes.
  906. * On master, without the new commit, run the regression tests and
  907. verify that they pass. Do this on a machine with a history of
  908. zero flaky behavior with the regression tests.
  909. * Apply the minimal commit.
  910. * Run "scons gps-makeregress".
  911. * Merge the regression changes into the commit. Mentiion in the
  912. commit message that regression tests were regenerated.
  913. * Review the diff for sanity, and if ok, push it.
  914. == Reverting to a clean state
  915. The scons equivalent of 'make clean' is 'scons -c' or 'scons
  916. --clean'. This will revert your source tree to a clean state nearly as
  917. though you had just cloned or downloaded it; some scons housekeeping
  918. stuff is left in place.
  919. If you interrupted a regression test, 'scons testclean' will remove
  920. generated test programs.
  921. If you're building in a clone of the git repository, you can use
  922. "git clean -dxf" to remove all untracked files. Note, however, that
  923. this will remove any files you have created on your own, in addition
  924. to build products and scons temporaries. You can alternatively use
  925. "git clean -dxn" to see what would be removed without actually removing
  926. anything, or "git clean -dxi" to remove things selectively. Using
  927. "git clean" after "scons -c" usually results in a fairly short list.
  928. == Notes on Android:
  929. Samuel Cuella reports:
  930. I use the official google toolchain from the Android NDK (Native
  931. Development Kit). You can also use the toolchain from code sourcery I
  932. guess. I cross-compile from a "regular" (with GNU userland) linux box.
  933. People who port software from linux to android tend to use either the
  934. NDK or code sourcery's.
  935. If you are going to include "official" guidelines, I would go for
  936. recommending the official toolchain from the NDK.
  937. Here are the scons switches I use:
  938. ----
  939. scons wordsize=32 snapshot=off arch=arm sample=shell
  940. scons -j3 prefix=/usr libdir=$prefix/lib udevdir=/lib/udev \
  941. gpsd_user=gpsd gpsd_group=uucp socket_export=1 sirf=1
  942. ----
  943. With the following environment variables:
  944. ----
  945. TOOL_HOME=/home/samuel/android-official-last/
  946. export TOOL_PREFIX=${TOOL_HOME}/bin/arm-linux-androideabi
  947. export CXX=$TOOL_PREFIX-g++
  948. export AR=$TOOL_PREFIX-ar
  949. export RANLIB=$TOOL_PREFIX-ranlib
  950. export CC=$TOOL_PREFIX-gcc
  951. export LD=$TOOL_PREFIX-ld
  952. export CCFLAGS="-march=armv7-a -mtune=cortex-a8 -mfpu=vfp"
  953. export ARM_TARGET_LIB=${TOOL_HOME}/sysroot
  954. scons wordsize=32 snapshot=off arch=arm sample=shell
  955. ----
  956. == Cross-building
  957. The scons recipe is intended to support cross-building, in particular
  958. for embedded deployment of the software. A session transcript
  959. illustrating how to do that, with some routine messages suppressed and
  960. replaced with [...], follows. The script assumes you're cloning from the
  961. GPSD project site or a mirror. Notes and explanation follow the transcript.
  962. ----
  963. $ git clone [...]
  964. Cloning into gpsd...
  965. [...]
  966. $ cd gpsd
  967. ----
  968. Edit .scons-options-cache (may not exist) and add lines, describing
  969. what your target architecture and build preferences are.
  970. ----
  971. $ cat .scons-option-cache
  972. libgpsmm = False
  973. libQgpsmm = False
  974. python = False
  975. prefix = '/work/buildroot/output/staging/usr/'
  976. sysroot = '/work/buildroot/output/staging/'
  977. target = 'arm-indigo-linux-gnueabi'
  978. $ scons
  979. scons: Reading SConscript files ...
  980. [...]
  981. Altered configuration variables:
  982. libgpsmm = False (default True): build C++ bindings
  983. libQgpsmm = False (default True): build QT bindings
  984. python = False (default True): build Python support and modules.
  985. prefix = /work/buildroot/output/staging/usr/ (default /usr/local): installation directory prefix
  986. sysroot = /work/buildroot/output/staging (default ): cross-development system root
  987. target = arm-indigo-linux-gnueabi (default ): cross-development target
  988. scons: done reading SConscript files.
  989. scons: Building targets ...
  990. [...]
  991. scons: done building targets.
  992. $ file gpsd
  993. gpsd: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.36, not stripped
  994. ----
  995. The author of this transcript notes:
  996. The sysroot option tells the compiler and linker to use libraries and
  997. headers from the given path as if they were placed at / prefix. During
  998. this build the option allows linking with target ncurses (with the option
  999. of having more packages at the --sysroot path) and including correct
  1000. headers without specifying -I and -L options.
  1001. In the options cache file gpsd is configured to install to
  1002. /work/buildroot/output/staging/usr path, so gpsd clients could be
  1003. compiled against libgps.so using /work/buildroot/output/staging as
  1004. sysroot option.
  1005. "arm-indigo-linux-gnueabi" as target means that
  1006. arm-indigo-linux-gnueabi-gcc and related tools are available in PATH;
  1007. your cross-compiler is likely to have a different target prefix.
  1008. You may also find it useful to set manbuild=no.
  1009. == Autostarting the daemon
  1010. The preferred way to start gpsd is on-demand by a hotplug script
  1011. detecting USB device activations. Look at the gpsd.rules and
  1012. gpsd.hotplug files to see how this is accomplished. Relevant
  1013. productions in the build recipe are "udev-install" and
  1014. "udev-uninstall"; relevant build options include "udevdir".
  1015. If you for some reason need to start gpsd unconditionally at
  1016. boot time (in particular, if you need to support RS232 devices)
  1017. there's a model init.d script under packaging/deb and a systemd
  1018. setup under systemd/.
  1019. // end