You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

617 lines
27KB

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