build.adoc 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  1. = Building GPSD from source
  2. This is a guide to building GPSD from a bare source tree. It includes
  3. guidance on how to cross-build the package. This document overlaps and
  4. interweaves with INSTALL.adoc. INSTALL.adoc contains distribution
  5. specific advice.
  6. Some hints for people building binary packages are in
  7. packaging/README.PACKAGERS.
  8. (This file is marked up in asciidoc.)
  9. == Quick start
  10. You can download the most recent development snapshot from:
  11. https://gitlab.com/gpsd/gpsd/tree/master
  12. You can download the latest gpsd tarball from:
  13. http://download.savannah.gnu.org/releases/gpsd/
  14. Under Linux, assuming you have all your build prerequisites in place,
  15. these lines will do, and need to be run as root:
  16. tar -xzf gpsd-X.YY.tar.gz
  17. cd gpsd-X.YY
  18. scons && scons check && scons udev-install
  19. If you get any errors, you need to read the detailed instructions that follow.
  20. If 'scons' fails, it is possible that your target system has moved to
  21. Python 3 and removed the program 'python'. Python.org says that if
  22. you have an installed Python, there should be a program in your path
  23. called 'python'. This is specified in PEP 394. This rule is not always
  24. followed. You can work around this by linking python3 to python like
  25. this
  26. ln -s /usr/bin/python3 /usr/bin/python
  27. Both 'scons' and 'gpsd' work fine on either Python 2 or Python 3. Which
  28. python you have installed should be transparent to the user, if python
  29. is installed correctly.
  30. Occasionally, builds may fail in completely bizarre ways due to a
  31. corrupted scons database. This seems to relate to ^Cing the build at
  32. an inopportune moment. If you suspect that, see "Reverting to a clean
  33. state" below and then try again.
  34. == Supported platforms
  35. Native-build success should be expected on the following platforms,
  36. provided you have the prerequisites listed in the next section
  37. installed:
  38. * Any desktop or server Linux distribution.
  39. * OpenWRT and derivatives such as CeroWRT.
  40. * FreeBSD, NetBSD, OpenBSD
  41. * Android, using the official Google toolchain from the NDK
  42. We consider failure to build and function on any of these platforms a
  43. serious bug; if you encounter it, please complain on the development
  44. list <gpsd-dev@nongnu.org>.
  45. Port difficulty to any system conforming to POSIX-2001.1 should be minimal.
  46. A Cygwin port is in progress but not complete.
  47. Cross-compilation to embedded Linuxes (in addition to the OpenWRT family)
  48. is usually fairly straightforward. An illustrative build transcript
  49. is included at the end of this file.
  50. == Check your build prerequisites
  51. Necessary components for any build:
  52. |============================================================================
  53. |C compiler | gpsd and client library are written in C
  54. |scons | for executing the build recipe
  55. |Python2.x(x>=6) or 3.y(y>=2) | for scons and some helper scripts
  56. |============================================================================
  57. On Gentoo, a basic build only requires this package:
  58. |============================================================================
  59. |dev-util/scons | for executing the build recipe
  60. |============================================================================
  61. === C compiler
  62. C99 conformance is required in the compiler. The C code depends on one
  63. C11 feature (supported by GCC, clang, and pretty much any C compiler
  64. that also speaks C++): anonymous unions. We could eliminate these,
  65. but the cost would be source-level interface breakage if we have to
  66. move certain structure members in and out of unions.
  67. Some portions of the code using shared-memory segments are improved by
  68. the C11 stdatomic.h features for lockless concurrency. These are: the
  69. SHM export mode in shmexport.c, the code for writing clock corrections
  70. to NTP in ntpshmwrite.c, and the code for reading NTP corrections in
  71. ntpshmread.c. These features have been supported in GCC since 4.7 and
  72. clang since 3.1.
  73. GPSD is normally built and tested with GCC. Do not compile with a version
  74. older than 4.1.1; there are several known issues with older versions,
  75. including (a) non-standards-conformant floating-point generation that
  76. messes up regression testing, (b) a compiler bug affecting RTCM2 code
  77. generation, (c) the option -Wno-missing-field-initializers is
  78. unavailable, leading to a flood of warnings (this is due to generated
  79. code and cannot be fixed).
  80. clang produces a gpsd that passes all regression tests.
  81. If you get a build failure including the text "error adding symbols:
  82. DSO missing from command line" or the complaint "ERROR: CC doesn't
  83. work", you nay have tripped over stale data in the builder's
  84. configuration cache. Clean the directory with "scons -c" then manually
  85. remove .sconsign.*dblite and retry your build.
  86. === Python
  87. You will need Python 2.x at minor version 6 or later or Python 3 at
  88. at minor version 3 or later.
  89. While Python is required to build GPSD from source (the build uses
  90. some code generators in Python), it is not required to run the service
  91. daemon. In particular, you can cross-compile onto an embedded system
  92. without having to take Python with you.
  93. scons finds the python used for scons separately from the python that
  94. should be used for the target. It seems to look for the target python
  95. as "python", which as above is supposed to exist per python norms.
  96. However, some packaging systems avoid a bare python, preferring to
  97. bind a program to a particular release as it is built. On systems
  98. without a "python" command, invoking scons as:
  99. scons target_python=python3.7
  100. seems to help.
  101. You will need both basic Python and (if your package system makes the
  102. distinction) the Python development package used for building C
  103. extensions. Usually these are called "python" and "python-dev". You
  104. will know you are missing the latter if your compilation fails
  105. because of a missing Python.h.
  106. The xgps and xgpsspeed clients will only be installed if these Python
  107. extensions are installed:
  108. |===========================================================================
  109. |python-gi | Python bindings for gobject-introspection libraries
  110. |python-gi-cairo | Python bindings for Cairo toolkit under GI
  111. |===========================================================================
  112. On Gentoo systems those packages are named:
  113. |============================================================================
  114. |dev-python/pygobject
  115. |dev-python/pycairo
  116. |============================================================================
  117. The ubxtool and zerk clients will only be usable in direct-serial mode
  118. if this Python extension is installed:
  119. |===========================================================================
  120. |pyserial | Python Serial Port extension
  121. |===========================================================================
  122. On Gentoo systems that package is named:
  123. |============================================================================
  124. |dev-python/pyserial
  125. |============================================================================
  126. The gpsplot client requires Matplotlib to do its job of creating dynamic
  127. plots.
  128. On Gentoo systems that package is named:
  129. |============================================================================
  130. |dev-python/matplotlib
  131. |============================================================================
  132. === Scons
  133. You will need scons version 2.3.0 (from 2013-03-02) or later to build the code.
  134. === Optional build components
  135. Having the following optional components on your system will enable
  136. various additional capabilities and extensions:
  137. |============================================================================
  138. |C++ compiler | allows building libgpsmm C++ wrapper for client library
  139. |Qt 4.53+ | allows building libQgpsmm C++ wrapper for client library
  140. |libcap | Capabilities library, improved security under Linux
  141. |(n)curses | curses screen-painting library, used by cgps and gpsmon
  142. |pps-tools | adds support for the KPPS API, for improved timing
  143. |libusb | Userspace access to USB devices
  144. |============================================================================
  145. On Gentoo systems those packages are named:
  146. |=============================================================================
  147. |dev-qt/qtcore | Basic Qt
  148. |dev-qt/qtnetwork | Qt network components
  149. |sys-libs/libcap | Capabilities library
  150. |sys-libs/ncurses | curses screen-painting library, used by cgps and gpsmon
  151. |net-misc/pps-tools | adds support for the KPPS API, for improved timing
  152. |virtual/libusb | Userspace access to USB devices
  153. |=============================================================================
  154. If you have libusb-1.0.0 or later, the GPSD build will autodetect
  155. this and use it to discover Garmin USB GPSes, rather than groveling
  156. through /proc/bus/usb/devices (which has been deprecated by the
  157. Linux kernel team).
  158. You can build libQgpsmm if you have Qt (specifically QtCore and
  159. QtNetwork modules) version 4.5.3 or higher. You will also need a C++
  160. compiler supported by Qt (tested on GCC 4.4.0/mingw on Windows and GCC
  161. 4.1.2 on linux). Please refer to Qt's documentation at
  162. http://qt.nokia.com/doc/4.6/platform-specific.html for platform
  163. specific building documentation
  164. For working with DBUS, you'll need the DBUS development
  165. headers and libraries installed. Under Debian/Ubuntu this
  166. is the package libdbus-1-dev.
  167. Under Ubuntu, the ncurses package you want is libncurses5-dev. Under
  168. Fedora, it's ncurses-devel. Depending on how your distribution
  169. packages ncurses you may also require libtinfo5, a separate terminfo
  170. library.
  171. On some older versions of Ubuntu (notably 11.10) there is a packaging
  172. defect that may cause your build to blow up in SCons. It's a missing
  173. package info file for the tinfo library. To fix this, install the file
  174. packaging/tinfo.pc in /usr/lib/pkgconfig/tinfo.pc. 13.10 fixed this.
  175. We've seen a report that compiling on the Raspberry Pi fails with
  176. a complaint about curses.h not being found. You need to install
  177. Raspbian's curses development library if this happens.
  178. If your kernel provides the RFC 2783 KPPS (kernel PPS) API, gpsd will
  179. use that for extra accuracy. Many Linux distributions have a package
  180. called "pps-tools" that will install KPPS support and the timepps.h
  181. header file. We recommend you do that. If your kernel is built in
  182. the normal modular way, this package installation will suffice.
  183. For building from the source tree, or if you change the man page
  184. source, xslt and docbook xsl style files are used to generate nroff
  185. -man source from docbook xml. The following packages are used in this
  186. process:
  187. |============================================================================
  188. |libxslt | xsltproc is used to build man pages from xml
  189. |docbook-xsl | style file for xml to man translation
  190. |xmlto | DocBook formatter program
  191. |asciidoctor | Documentation front end with light markup
  192. |============================================================================
  193. On Gentoo systems those packages are named:
  194. |==============================================================================
  195. |app-text/xmlto | DocBook formatter program
  196. |app-text/asciidoctor | Documentation front end with light markup
  197. |==============================================================================
  198. The build degrades gracefully in the absence of any of these. You should
  199. be able to tell from scons messages which extensions you will get.
  200. Under Ubuntu and most other Debian-derived distributions, an easy way
  201. to pick up the prerequisites is: "apt-get build-dep gpsd". Note
  202. that your sources.list will need "deb-src" lines for this, not
  203. just "deb" lines.
  204. If you are custom-building a Linux kernel for embedded deployment, you
  205. will need some subset of the following modules:
  206. |============================================================================
  207. |pl2303 | Prolific Technology, Inc. PL2303 Serial Port
  208. |ftdi_sio | FTDI 8U232AM / FT232
  209. |cypress_m8 | M8/CY7C64013
  210. |cp210x | Cygnal Integrated Products devices
  211. |garmin_gps | Garmin USB mice including GPS-18
  212. |cdc_am | USB Communication Device Class Abstract Control Model interface
  213. |pps-gpio | For KPPS support on ARM systems
  214. |pps-ldisc | For KPPS support with RS-232 ports
  215. |pps_parport | For KPPS support with a parallel port
  216. |============================================================================
  217. These are listed in rough order of devices covered as of 2013; the
  218. PL23203 by itself accounts for over 70% of deployed USB mice. We
  219. recommend building with pl2303, ftdi_sio, cypress_m8, and cp210x.
  220. We've received a bug report that suggests the Python test framework
  221. requires legacy PTY support (CONFIG_LEGACY_PTYS) from the Linux
  222. kernel. You should make sure you're in the 'dialout' group in order
  223. to have permission to use these devices.
  224. == How to build the software from source
  225. To build gpsd for your host platform from source, simply call 'scons'
  226. in a working-directory copy. (Cross-build is described in a later
  227. section.)
  228. To clean the built files, run 'scons -c' or 'scons --clean'.
  229. Run 'rm -f .sconsign.*dblite' to clear the scons
  230. database. Doing both should return your working directory to a
  231. near pristine state as far as building is concerned. Some user created
  232. files may remain, and source code changes will not have been reverted..
  233. When in doubt, restart with a clean copy of the source.
  234. You can specify the installation prefix, as for an autotools build, by
  235. running "scons prefix=<installation_root>". The default value is
  236. "/usr/local". The environment variable DESTDIR also works in the
  237. usual way.
  238. If your linker run fails with missing math symbols, see the FIXME
  239. comment relating to implicit_links in the scons recipe; you probably
  240. need to build with implicit_link=no. If this happens, please report
  241. your platform, ideally along with a way of identifying it from Python,
  242. to the GPSD maintainers.
  243. If, while building, you see a complaint that looks like this:
  244. --------------------------------------------------------------------
  245. I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
  246. --------------------------------------------------------------------
  247. it means the xmlto document formatter is failing to fetch a stylesheet it
  248. needs over the network. Probably this means you are doing a source
  249. build on a machine without live Internet access. The workaround
  250. for this is to temporarily remove xmlto from your command path so GPSD
  251. won't try building the documentation. The actual fix is to install
  252. DocBook on your machine so there will be a local copy of the
  253. stylesheet where xmlto can find it.
  254. After building, please run 'scons check' to test the correctness
  255. of the build. It is not necessary to install first. Python is
  256. required for regression tests. If any of the tests fail, you probably
  257. have a toolchain issue. The most common such problem is failures of
  258. strict C99 conformance in floating-point libraries.
  259. Once you have verified that the code is working, "scons install"
  260. will install it it in the system directories. "scons uninstall" will
  261. undo this. Note: because scons is a single-phase build system, this
  262. may recompile everything. If you want feature-configuration options,
  263. you need to specify them here.
  264. To enable hotplugging of USB GPSes under Linux, you may do 'scons
  265. udev-install' to put the appropriate udev rules and wrapper files in
  266. place.
  267. You will need php and php-gd installed to support the PHP web page
  268. generator included with the distribution. To install it, copy the file
  269. 'gpsd.php' to your HTML document directory. Then see the
  270. post-installation instructions in INSTALL.adoc for how to configure it.
  271. == Leap Seconds
  272. The header gpsd.h contains the value BUILD_LEAPSECONDS. This is set,
  273. at release time, to the leap second value current at that time.
  274. Ideally gpsd would be reading the standard leapseconds.cache file
  275. provided by most distributions for the current leap second.
  276. Most of the drivers supply the current leap second, after the GNSS
  277. receiver sends it in a message to gpsd. But none of the standard NMEA
  278. 0183 messages supply the current leap second. Thus the need for a fall
  279. back leap second value.
  280. The leap second value is mainly used to check for invalid UTC time from
  281. the GNSS receiver. If the receiver is affected by the GPS Week Number
  282. Roll Over (WKNO) bug, then the UTC time it reports will be off by 1024
  283. weeks.
  284. All GNSS receivers may be using the wrong leap second internally on
  285. startup. This may happen if it has been less than about 12 minutes since
  286. power-up; the receiver has not yet received the current leapsecond
  287. offset as part of the periodic almanac download. Page 18, subframe 4,
  288. of the almanac contains the leap second data.
  289. The gpsd daemon may be using the wrong leap second internally if
  290. the compiled in leap second is no longer valid, and the GNSS receiver
  291. has not reported the current leap second to gpsd.
  292. == Optional features
  293. By giving command-line options to scons you can configure certain rarely-used
  294. optional features in, or compile standard features out to reduce gpsd's
  295. footprint. "scons --help" will tell the story; look under "Local Options"
  296. and consult the source code if in doubt.
  297. Here are a few of the more important feature switches. Each description
  298. begins with the default for the switch.
  299. pps=yes: for small embedded systems and those without threading,
  300. it is possible to build gpsd without thread support if you build
  301. with pps=no. You'll lose support for updating the clock from PPS
  302. pulses.
  303. dbus_export=no: for systems using DBUS: gpsd includes support for
  304. shipping fixes as DBUS notifications, compiled in by default. This
  305. may lead to complaint messages during testing on systems that don't
  306. support DBUS. Build with the option "dbus_export=no" to disable it
  307. qt=yes: libQgpsmm is a Qt version of the libgps/libgpsmm
  308. pair. Thanks to the multi-platform approach of Qt, it allows the gpsd
  309. client library to be available on all the Qt supported platforms.
  310. Please see http://qt.nokia.com/doc/4.6/supported-platforms.html for a
  311. status of Qt supported platforms as of version 4.6.
  312. minimal=no: people building for extremely constrained environments
  313. may want to set this. It changes the default for all boolean (feature)
  314. options to false; thus, you get *only* the options you specify on the
  315. command line. Thus, for example, if you want to turn off all features
  316. except socket export and nmea0183,
  317. ------------------------------------------------
  318. scons minimal=yes socket_export=yes nmea0183=yes
  319. ------------------------------------------------
  320. will do that.
  321. -----------------------------------------------
  322. scons minimal=yes gpsd=False gpsdclients=False
  323. -----------------------------------------------
  324. generates only libgps.a
  325. -----------------------------------------------
  326. scons minimal=yes shared=True gpsd=False gpsdclients=False
  327. -----------------------------------------------
  328. generates only libgps.so
  329. == Port and toolchain testing
  330. 'scons check' will run a comprehensive regression-test suite. You
  331. should do this, at minimum, every time you build from source on a new
  332. machine type. GPSD does enough bit-twiddling and floating point that
  333. it is very sensitive to toolchain problems; you'll want to be sure
  334. those aren't going to bite you in production.
  335. So that the tests will run fast and be easy to do often, we make the test
  336. framework shove data through the pty and socket layers *way* faster
  337. than would ever occur in production. If you get regression-test
  338. failures that aren't repeatable and look like the test framework is
  339. sporadically failing to feed the last line or two of test loads, try
  340. using the slow=yes option with scons check. If that fails, try
  341. increasing the delay value via the WRITE_PAD environment variable
  342. (above the value reported in the test output). If you have to do this,
  343. please report your experience to the GPSD maintainers.
  344. Both the builds and the tests are highly parallelizable via the scons
  345. -j option, which can gain a substantial speedup on a multicore machine.
  346. Because the output from the various jobs is interleaved, it may be more
  347. difficult to understand error results with multiple jobs. In that event,
  348. simply rerun without the -j option for more straightforward output.
  349. If coveraging is enabled (coveraging=yes), then Python programs run
  350. during testing are run via Python coveraging. This prefixes the relevant
  351. commands with the content of the python_coverage option, whose default
  352. value of "coverage run" is appropriate if the standard Python coverage
  353. package is installed and accessible in the command path. It can be
  354. set to a different value if necessary, or set to the empty string to
  355. disable Python coveraging. The latter happens automatically (with a
  356. message) if the tool cannot be found. When running multiple jobs with
  357. "-j", if python_coverage has its default value, "--parallel" is automatically
  358. appended to the command. With a non-default setting, accommodating
  359. parallelism is the user's responsibility.
  360. For instructions on how to live-test the software, see the file INSTALL.adoc.
  361. === Regenerating regression tests
  362. Sometimes, changes are made to code that cause the output to be
  363. different. Examples are bug fixes and changes to precision. In these
  364. cases, the regression tests must be updated. This is dangerous, and
  365. one must guard against the possibility of introducing a bug and
  366. recording that bug's output as the desired state.
  367. A suggested procedure is
  368. * Create a minimal commit with the breaking change. Do not include
  369. any other changes.
  370. * On master, without the new commit, run the regression tests and
  371. verify that they pass. Do this on a machine with a history of
  372. zero flaky behavior with the regression tests.
  373. * Apply the minimal commit.
  374. * Run "scons gps-makeregress".
  375. * Merge the regression changes into the commit. Mentiion in the
  376. commit message that regression tests were regenerated.
  377. * Review the diff for sanity, and if ok, push it.
  378. == Reverting to a clean state
  379. The scons equivalent of 'make clean' is 'scons -c' or 'scons
  380. --clean'. This will revert your source tree to a clean state nearly as
  381. though you had just cloned or downloaded it; some scons housekeeping
  382. stuff is left in place.
  383. If you interrupted a regression test, 'scons testclean' will remove
  384. generated test programs.
  385. If you're building in a clone of the git repository, you can use
  386. "git clean -dxf" to remove all untracked files. Note, however, that
  387. this will remove any files you have created on your own, in addition
  388. to build products and scons temporaries. You can alternatively use
  389. "git clean -dxn" to see what would be removed without actually removing
  390. anything, or "git clean -dxi" to remove things selectively. Using
  391. "git clean" after "scons -c" usually results in a fairly short list.
  392. == Notes on Android:
  393. Samuel Cuella reports:
  394. I use the official google toolchain from the Android NDK (Native
  395. Development Kit). You can also use the toolchain from code sourcery I
  396. guess. I cross-compile from a "regular" (with GNU userland) linux box.
  397. People who port software from linux to android tend to use either the
  398. NDK or code sourcery's.
  399. If you are going to include "official" guidelines, I would go for
  400. recommending the official toolchain from the NDK.
  401. Here are the scons switches I use:
  402. scons wordsize=32 snapshot=off arch=arm sample=shell
  403. scons -j3 prefix=/usr libdir=$prefix/lib udevdir=/lib/udev
  404. gpsd_user=gpsd gpsd_group=uucp socket_export=1
  405. nmea0183=1 sirf=1
  406. With the following environment variables:
  407. TOOL_HOME=/home/samuel/android-official-last/
  408. export TOOL_PREFIX=${TOOL_HOME}/bin/arm-linux-androideabi
  409. export CXX=$TOOL_PREFIX-g++
  410. export AR=$TOOL_PREFIX-ar
  411. export RANLIB=$TOOL_PREFIX-ranlib
  412. export CC=$TOOL_PREFIX-gcc
  413. export LD=$TOOL_PREFIX-ld
  414. export CCFLAGS="-march=armv7-a -mtune=cortex-a8 -mfpu=vfp"
  415. export ARM_TARGET_LIB=${TOOL_HOME}/sysroot
  416. scons wordsize=32 snapshot=off arch=arm sample=shell
  417. == Cross-building
  418. The scons recipe is intended to support cross-building, in particular
  419. for embedded deployment of the software. A session transcript
  420. illustrating how to do that, with some routine messages suppressed and
  421. replaced with [...], follows. The script assumes you're cloning from the
  422. GPSD project site or a mirror. Notes and explanation follow the transcript.
  423. ----
  424. $ git clone [...]
  425. Cloning into gpsd...
  426. [...]
  427. $ cd gpsd
  428. ----
  429. Edit .scons-options-cache (may not exist) and add lines, describing
  430. what your target architecture and build preferences are.
  431. ----
  432. $ cat .scons-option-cache
  433. libgpsmm = False
  434. libQgpsmm = False
  435. python = False
  436. prefix = '/work/buildroot/output/staging/usr/'
  437. sysroot = '/work/buildroot/output/staging/'
  438. target = 'arm-indigo-linux-gnueabi'
  439. $ scons
  440. scons: Reading SConscript files ...
  441. [...]
  442. Altered configuration variables:
  443. libgpsmm = False (default True): build C++ bindings
  444. libQgpsmm = False (default True): build QT bindings
  445. python = False (default True): build Python support and modules.
  446. prefix = /work/buildroot/output/staging/usr/ (default /usr/local): installation directory prefix
  447. sysroot = /work/buildroot/output/staging (default ): cross-development system root
  448. target = arm-indigo-linux-gnueabi (default ): cross-development target
  449. scons: done reading SConscript files.
  450. scons: Building targets ...
  451. [...]
  452. scons: done building targets.
  453. $ file gpsd
  454. gpsd: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.36, not stripped
  455. ----
  456. The author of this transcript notes:
  457. The sysroot option tells the compiler and linker to use libraries and
  458. headers from the given path as if they were placed at / prefix. During
  459. this build the option allows linking with target ncurses (with the option
  460. of having more packages at the --sysroot path) and including correct
  461. headers without specifying -I and -L options.
  462. In the options cache file gpsd is configured to install to
  463. /work/buildroot/output/staging/usr path, so gpsd clients could be
  464. compiled against libgps.so using /work/buildroot/output/staging as
  465. sysroot option.
  466. "arm-indigo-linux-gnueabi" as target means that
  467. arm-indigo-linux-gnueabi-gcc and related tools are available in PATH;
  468. your cross-compiler is likely to have a different target prefix.
  469. You may also find it useful to set manbuild=no.
  470. == Autostarting the daemon
  471. The preferred way to start gpsd is on-demand by a hotplug script
  472. detecting USB device activations. Look at the gpsd.rules and
  473. gpsd.hotplug files to see how this is accomplished. Relevant
  474. productions in the build recipe are "udev-install" and
  475. "udev-uninstall"; relevant build options include "udevdir".
  476. If you for some reason need to start gpsd unconditionally at
  477. boot time (in particular, if you need to support RS232 devices)
  478. there's a model init.d script under packaging/deb and a systemd
  479. setup under systemd/.
  480. // end