Build Firefox with gpsd location provider support (--enable-gpsd)

Bug #1783202 reported by mkurz
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
firefox (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Firefox 50+ has support for gpsd, see https://bugzilla.mozilla.org/show_bug.cgi?id=1250922
That would allow users with a GPS device to use the provided GPS data for the Geolocation API within the browser - not by default (in stable release builds), but only after explicitly setting 'geo.location.use_gpsd' to 'true' in about:config. Which is a good thing, as no defaults change.

However that support has to be enabled with the build flag --enable-gpsd.
As you can see in toolkit/moz.configure the only thing that is needed to build Firefox with gpsd support is libgps-dev installed on the build system:
https://hg.mozilla.org/mozilla-central/file/ccfd7b716a91/toolkit/moz.configure#l550

If you want to dig deeper here are the three changes that brought gpsd support:
https://hg.mozilla.org/mozilla-central/rev/76b04196acce
https://hg.mozilla.org/mozilla-central/rev/a1a42e8d66e9
https://hg.mozilla.org/mozilla-central/rev/457be633b6cc

There is not much magic here: When users switch on the flag 'geo.location.use_gpsd', Firefox tries to get the position from gpsd, if no location information is received from GPS within a few seconds, as fallback Mozilla Location Service provides a position instead. The position however will be updated once GPS is ready. If GPS fails, MLS will take over again until GPS has been restored.

The only thing you might want to be aware of is that on non-release builds, the gpsd location provider is enabled by default, meaning 'geo.location.use_gpsd' is 'true' (see revision a1a42e8d66e9) because Firefox devs want to give it some testing. However that shouldn't be an issue, because as described, MLS acts as fallback after a few seconds anyway.

What do you think?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in firefox (Ubuntu):
status: New → Confirmed
Revision history for this message
Franz Angeli (juniper275) wrote :

Trying to build firefox with gpsd support:

"ERROR: Package libgps was not found in the pkg-config search path"

but i have libgps-dev and libgps installed and are in pkg-config path

version is >= 3.11

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.