Closed Bug 1864083 Opened 10 months ago Closed 9 months ago

Firefox since 120.0b1 fails to find <dbus/dbus.h>

Categories

(Firefox Build System :: General, defect)

Firefox 120
defect

Tracking

(firefox122 fixed)

RESOLVED FIXED
122 Branch
Tracking Status
firefox122 --- fixed

People

(Reporter: martin+mozilla, Assigned: sergesanspaille)

Details

Attachments

(4 files)

Steps to reproduce:

I'm building the beta/devedition of Firefox on NixOS. After upgrading from 119.0b9 to 120.0b1 it fails to find dbus/dbus.h.

Actual results:

firefox-devedition-unwrapped> In file included from /build/firefox-120.0/toolkit/components/remote/nsRemoteService.cpp:10:
firefox-devedition-unwrapped> In file included from /build/firefox-120.0/toolkit/components/remote/nsDBusRemoteServer.h:13:
firefox-devedition-unwrapped> In file included from /build/firefox-120.0/mozobj/dist/include/mozilla/DBusHelpers.h:10:
firefox-devedition-unwrapped> /build/firefox-120.0/mozobj/dist/system_wrappers/dbus/dbus.h:3:15: fatal error: 'dbus/dbus.h' file not found
firefox-devedition-unwrapped> #include_next <dbus/dbus.h>
firefox-devedition-unwrapped> ^~~~~~~~~~~~~

Expected results:

The dbus header file should have been found using pkg-config, which has the following definitions

includedir=/nix/store/wlnnj1r9vld4bd0v21n9ajwm34y042mc-dbus-1.14.10-dev/include
Cflags: -I${includedir}/dbus-1.0 -I${libdir}/dbus-1.0/include

The header file is therefore availabe at

/nix/store/wlnnj1r9vld4bd0v21n9ajwm34y042mc-dbus-1.14.10-dev/include/dbus-1.0/dbus/dbus.h

Summary: Firefox since 120.0b1 fails to find dbus/dbus.h → Firefox since 120.0b1 fails to find <dbus/dbus.h>
Component: Untriaged → General
Product: Firefox → Firefox Build System
Attached file clang-cmdline.txt

This is the clang cmdline that fails. Notice that it includes

-isystem /nix/store/wlnnj1r9vld4bd0v21n9ajwm34y042mc-dbus-1.14.10-dev/include

but that completely ignores the Cflags value in the pkg-config file.

Severity: -- → S3

The configure step correctly shows checking MOZ_DBUS_CFLAGS... -I/nix/store/wlnnj1r9vld4bd0v21n9ajwm34y042mc-dbus-1.14.10-dev/include/dbus-1.0 -I/nix/store/7yq59rdhqbcb9m1mj84dnq2bmhbajvpl-dbus-1.14.10-lib/lib/dbus-1.0/include so it's not the configure step

Indeed, it seems related to https://phabricator.services.mozilla.com/D187208, we should likely add the missing cflags in some places.

Assignee: nobody → sguelton

Martin, could you give a try to the attached patch. I fixed the bug without a reproducer, so I'd like a confirmation. It's possible we're missing a few extra spots, but the basic idea should be the same as the one in the patch.

Flags: needinfo?(martin+mozilla)

I tried the attached patch, and it is still failing. Attached the new build log.

Flags: needinfo?(martin+mozilla)

Can you ./mach build --keep-going and attach the log, that will avoid patch ping-pong, where a patch is written that fixes your one error, and then another patch to fix the next one, etc.

Flags: needinfo?(martin+mozilla)
Attachment #9364481 - Attachment description: Bug 1864083 - Add missing MOZ_DBUS_CFLAGS r=glandium → Bug 1864083 - Add missing MOZ_DBUS_CFLAGS r=glandium!

Martin, I've updated the patch, but I second Mike's suggestion :-)

Thanks for the suggestion. The latest patch version made it work. Thank you, Serge.

Flags: needinfo?(martin+mozilla)

great new! Thanks for your proactive answers we'll land that soon.

Pushed by sguelton@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f1f5f98290b3
Add missing MOZ_DBUS_CFLAGS r=glandium
Status: UNCONFIRMED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: