Closed Bug 1373485 Opened 8 years ago Closed 8 years ago

Multiple webrtc gyp files are using pkg-config to find gtk+-2.0 cflags

Categories

(Core :: WebRTC, enhancement, P2)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1373804

People

(Reporter: glandium, Unassigned)

Details

Considering libxul is mainly built against gtk+-3.0, it seems like a footgun that could blow up in the future. $ git grep gtk+-2.0 media media/webrtc/trunk/build/linux/system.gyp: 'gtk_packages': 'gmodule-2.0 gtk+-2.0 gthread-2.0', media/webrtc/trunk/peerconnection.gyp: '<!@(pkg-config --cflags gtk+-2.0)', media/webrtc/trunk/peerconnection.gyp: '<!@(pkg-config --libs-only-L --libs-only-other gtk+-2.0 gthread-2.0)', media/webrtc/trunk/peerconnection.gyp: '<!@(pkg-config --libs-only-l gtk+-2.0 gthread-2.0)', media/webrtc/trunk/webrtc/media/BUILD.gn: "gtk+-2.0", media/webrtc/trunk/webrtc/media/media.gyp: '<!@(pkg-config --cflags gobject-2.0 gthread-2.0 gtk+-2.0)', media/webrtc/trunk/webrtc/webrtc_examples.gyp: '<!@(pkg-config --cflags glib-2.0 gobject-2.0 gtk+-2.0)', media/webrtc/trunk/webrtc/webrtc_examples.gyp: ' gobject-2.0 gthread-2.0 gtk+-2.0)', media/webrtc/trunk/webrtc/webrtc_examples.gyp: ' gthread-2.0 gtk+-2.0)',
I give a medium priority, please check if it is the appropriate.
Rank: 25
Flags: needinfo?(rjesup)
Priority: -- → P2
We don't use system.gyp, BUILD.gn (yet), webrtc_examples.gyp. We use peerconnection.gyp, but we put all but a little of it inside a condition of "build_with_mozilla==0", so this isn't executed. It will go away when we switch to BUILD.gn. We use media.gyp, but modified it to only build a small subset (mozilla_rtc_media instead of rtc_media -- really just two classes), so we don't ever look at the gtk stuff.
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(rjesup)
Resolution: --- → INVALID
(In reply to Randell Jesup [:jesup] from comment #2) > We don't use system.gyp, BUILD.gn (yet), webrtc_examples.gyp. > > We use peerconnection.gyp, but we put all but a little of it inside a > condition of "build_with_mozilla==0", so this isn't executed. It will go > away when we switch to BUILD.gn. > > We use media.gyp, but modified it to only build a small subset > (mozilla_rtc_media instead of rtc_media -- really just two classes), so we > don't ever look at the gtk stuff. Except we do, since that's how I found about it. See the pasted log in bug 1373486 comment 0.
(In reply to Mike Hommey [:glandium] from comment #3) > Except we do, since that's how I found about it. See the pasted log in bug > 1373486 comment 0. I see the grep, but that doesn't show a build log showing it getting tocuhed (though I have no evidence that you're wrong, either). It was 4:30am when I posted that analysis (and it wasn't that I got up early), so I might have been wrong. I hope it doesn't evaluate stuff in conditions that are false... Can you post a log showing what touches gtk2?
As mentioned in the comment you replied to: bug 1373486 comment 0. Hint: it's not this bug.
(In reply to Mike Hommey [:glandium] from comment #5) > As mentioned in the comment you replied to: bug 1373486 comment 0. Hint: > it's not this bug. Ah. I misread that as *this* bug, sorry. So, after some experimentation: it appears as if gyp runs through the dependencies of every target, even if it isn't actually referenced. Thus api.gyp:libjingle_peerconnection (which we have no interest in using) gets processed, causing it to invoke dependencies like media.api:rtc_media. Even if I rename libjingle_peerconnection to foobar, it will still get processed. So it looks like this is a bug (or surprising 'feature') in gyp. So while it will run the pkg-config, we shouldn't end up using any of the results. Still, it shouldn't be running it. Can you try 'use_gtk': 0 in gyp.mozbuild? The cflags entry is inside a use_gtk conditional. In local tests, that seems to avoid the call to pkg-config. use_gtk is only used for this one pkg-config call.
Flags: needinfo?(mh+mozilla)
Flags: needinfo?(mh+mozilla)
Resolution: INVALID → DUPLICATE
You need to log in before you can comment on or make changes to this bug.