Building firefox with gpsd support on ubuntu 20.04 fail
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox101 fixed)
Tracking | Status | |
---|---|---|
firefox101 | --- | fixed |
People
(Reporter: franz.angeli, Assigned: glandium)
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36
Steps to reproduce:
compile from source with --enable-gpsd
Actual results:
building fail with:
"ERROR: Package libgps was not found in the pkg-config search path"
but i have libgps installed (also libgps.-dev) and on pkg-config path
Expected results:
gpsd working
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox Build System::General' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
You should have more details in the log, no ?
Reporter | ||
Comment 3•2 years ago
|
||
(In reply to Sylvestre Ledru [:Sylvestre] from comment #2)
You should have more details in the log, no ?
0:05.95 ERROR: Package libgps was not found in the pkg-config search path.
0:05.95 ERROR: Perhaps you should add the directory containing `libgps.pc'
0:05.95 ERROR: to the PKG_CONFIG_PATH environment variable
0:05.95 ERROR: Package 'libgps', required by 'virtual:world', not found
*** Fix above errors and then restart with "./mach build"
pkg-config --variable pc_path pkg-config
/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
and i have libgps.pc in /usr/lib/x86_64-linux-gnu/pkgconfig/libgps.pc
juniper@*****:~/Downloads/mozilla-unified$ cat /usr/lib/x86_64-linux-gnu/pkgconfig/libgps.pc
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib/x86_64-linux-gnu
includedir=/usr/include
Name: GPSD
Description: GPS Daemon communication library
Version: 3.20
Cflags: -I${includedir}
Libs: -L${libdir} -lgps
Comment 4•2 years ago
|
||
I don't have access to a linux machine today to repro and diagnose this, but I can recommend some next steps for debugging what's going on for your system:
- Share on this bug the
obj-*/config.log
file, as it has more helpful information. - Here's the code that executes
pkg-config
- You can add some code before
get_cmd_output()
to print whichpkg-config
is being run, and with which args:
# Using `log.error()` so it shows up in regular `./mach configure` output
log.error("pkg_config={}, package_desc={}".format(pkg_config, package_desc))
retcode, ... = ...
Reporter | ||
Comment 5•2 years ago
|
||
Comment 6•2 years ago
|
||
Executing: `/home/juniper/.mozbuild/pkgconf/pkg-config --errors-to-stdout --print-errors 'libgps >= 3.11'`
INFO: no
Looks like we're using our own pkg-config
instead of your system one.
What's the output of /home/juniper/.mozbuild/pkgconf/pkg-config --variable pc_path pkg-config
?
Reporter | ||
Comment 7•2 years ago
|
||
(In reply to Mitchell Hentges [:mhentges] 🦀 from comment #4)
I don't have access to a linux machine today to repro and diagnose this, but I can recommend some next steps for debugging what's going on for your system:
- Share on this bug the
obj-*/config.log
file, as it has more helpful information.- Here's the code that executes
pkg-config
- You can add some code before
get_cmd_output()
to print whichpkg-config
is being run, and with which args:# Using `log.error()` so it shows up in regular `./mach configure` output log.error("pkg_config={}, package_desc={}".format(pkg_config, package_desc)) retcode, ... = ...
attached config.log(In reply to Mitchell Hentges [:mhentges] 🦀 from comment #6)
Executing: `/home/juniper/.mozbuild/pkgconf/pkg-config --errors-to-stdout --print-errors 'libgps >= 3.11'` INFO: no
Looks like we're using our own
pkg-config
instead of your system one.
What's the output of/home/juniper/.mozbuild/pkgconf/pkg-config --variable pc_path pkg-config
?
juniper@****:~/Downloads/mozilla-unified$ /home/juniper/.mozbuild/pkgconf/pkg-config --variable pc_path pkg-config
/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig
Reporter | ||
Comment 8•2 years ago
|
||
(In reply to Mitchell Hentges [:mhentges] 🦀 from comment #6)
Executing: `/home/juniper/.mozbuild/pkgconf/pkg-config --errors-to-stdout --print-errors 'libgps >= 3.11'` INFO: no
Looks like we're using our own
pkg-config
instead of your system one.
What's the output of/home/juniper/.mozbuild/pkgconf/pkg-config --variable pc_path pkg-config
?
juniper@*****:~/Downloads/mozilla-unified$ /home/juniper/.mozbuild/pkgconf/pkg-config --variable pc_path pkg-config
/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig
Comment 9•2 years ago
|
||
Looks like our managed pkg-config
is missing the /usr/local/lib/x86_64-linux-gnu/pkgconfig
path. I'll NI :glandium as he might have some guesses as to why.
Workaround
Add export PKG_CONFIG_PATH=/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
to your mozconfig
file and try again.
Reporter | ||
Comment 10•2 years ago
|
||
Reporter | ||
Comment 11•2 years ago
|
||
(In reply to Mitchell Hentges [:mhentges] 🦀 from comment #9)
Looks like our managed
pkg-config
is missing the/usr/local/lib/x86_64-linux-gnu/pkgconfig
path. I'll NI :glandium as he might have some guesses as to why.Workaround
Add
export PKG_CONFIG_PATH=/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
to yourmozconfig
file and try again.
i try adding path to mozconfig:
juniper@******:~/Downloads/mozilla-unified$ cat mozconfig
ac_add_options --enable-gpsd
export PKG_CONFIG_PATH=/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
but mach configure fail in the same way:
0:04.36 checking for libgps >= 3.11... no
0:04.36 ERROR: Package libgps was not found in the pkg-config search path.
0:04.36 ERROR: Perhaps you should add the directory containing `libgps.pc'
0:04.36 ERROR: to the PKG_CONFIG_PATH environment variable
0:04.36 ERROR: Package 'libgps', required by 'virtual:world', not found
*** Fix above errors and then restart with "./mach build"
if i set on shell
export PKG_CONFIG_PATH...
juniper@****:~/.mozbuild/pkgconf$ /home/juniper/.mozbuild/pkgconf/pkg-config --libs libgps
-L/usr/lib/x86_64-linux-gnu -lgps
but command on config.log return nothing
juniper@:~/Downloads/mozilla-unified/obj-x86_64-pc-linux-gnu$ /home/juniper/.mozbuild/pkgconf/pkg-config --errors-to-stdout --print-errors 'libgps >= 3.11'
juniper@:~/Downloads/mozilla-unified/obj-x86_64-pc-linux-gnu$
Comment 12•2 years ago
|
||
juniper@:~/Downloads/mozilla-unified/obj-x86_64-pc-linux-gnu$ /home/juniper/.mozbuild/pkgconf/pkg-config --errors-to-stdout --print-errors 'libgps >= 3.11'
Hmm, that's promising: looking again, I'm guessing that this is related to sysroot shenanigans. I'm not sure the right way to use external libraries, and how that relates to usage of the sysroot, so I think the person most equipped to progress this is glandium.
Reporter | ||
Comment 13•2 years ago
|
||
(In reply to Mitchell Hentges [:mhentges] 🦀 from comment #12)
juniper@:~/Downloads/mozilla-unified/obj-x86_64-pc-linux-gnu$ /home/juniper/.mozbuild/pkgconf/pkg-config --errors-to-stdout --print-errors 'libgps >= 3.11'
Hmm, that's promising: looking again, I'm guessing that this is related to sysroot shenanigans. I'm not sure the right way to use external libraries, and how that relates to usage of the sysroot, so I think the person most equipped to progress this is glandium.
using on mozconfig:
ac_add_options --without-sysroot
i'm able to compile with gpsd support....but it seems not working...
i've added string in about:confing
geo.location.use_gpsd true
but it seems not work...
Assignee | ||
Comment 14•2 years ago
|
||
So there are two problems:
--enable-gpsd
should barf when using the sysroot, because that's not supported.- it doesn't work. Considering we've never shipped with this enabled, that's not really a surprise. I'd suggest filing a separate bug under Core::DOM: Geolocation.
Assignee | ||
Comment 15•2 years ago
|
||
Updated•2 years ago
|
Comment 16•2 years ago
|
||
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/d70943042496 Make --enable-gpsd a system_lib_option. r=firefox-build-system-reviewers,mhentges
Reporter | ||
Comment 17•2 years ago
|
||
ok with your patch:
0:04.57 ERROR: --enable-gpsd is not supported with bootstrapped sysroot. Drop the option, or use --without-sysroot or --disable-bootstrap
*** Fix above errors and then restart with "./mach build"
i've opened another bug for GPSD not working (1763347)
Thanks
Comment 18•2 years ago
|
||
bugherder |
Description
•