Closed Bug 880486 Opened 7 years ago Closed 7 years ago

ns_stun_get_attrs doubly defined on B2G Desktop with MOZ_B2G_RIL

Categories

(Core :: WebRTC: Networking, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: qdot, Assigned: qdot)

Details

(Whiteboard: [WebRTC][blocking-webrtc-][b2g-webrtc-][qa-])

Attachments

(1 file)

As of the landing of bug 867933, I can't seem to get B2G Desktop to build anymore. I get the following error:

../../media/mtransport/build/gonk_addrs.o: In function `nr_stun_get_addrs':
/home/qdot/code/mozbuild/mozilla-central/obj-debug/media/mtransport/build/gonk_addrs.cpp:86: multiple definition of `nr_stun_get_addrs'
../../media/mtransport/third_party/nICEr/nicer_nicer/src/stun/addrs.o:/home/qdot/code/mozbuild/mozilla-central/media/mtransport/third_party/nICEr/src/stun/addrs.c:694: first defined here
collect2: ld returned 1 exit status
make[5]: *** [libxul.so] Error 1
make[4]: *** [libs_tier_platform] Error 2
make[3]: *** [tier_platform] Error 2
make[2]: *** [default] Error 2
make[1]: *** [realbuild] Error 2
make[1]: Leaving directory `/home/qdot/code/mozbuild/mozilla-central'

Sure enough, it looks like the function is defined in gonk_addrs.cpp, but also in addrs.c if USE_PLATFORM_NR_STUN_GET_ADDRS isn't defined. We should probably either wrap the gonk_addrs.cpp definition in #ifdef MOZ_WIDGET_GONK to make sure it only happens on the fxos/android kernel platforms?
Whiteboard: [WebRTC][blocking-webrtc-][b2g-webrtc-]
This should make it so we only use the gonk_addr.cpp when on the gonk platform, which is what I'm assuming the build file was aiming for in the first place? We can actually have MOZ_B2G_RIL happen on desktop, for testing purposes.
Attachment #759528 - Flags: review?(pwang)
Comment on attachment 759528 [details] [diff] [review]
Patch 1 (v1) - Only build gonk_addr.cpp when using gonk widget

Review of attachment 759528 [details] [diff] [review]:
-----------------------------------------------------------------

USE_PLATFORM_NR_STUN_GET_ADDRS is set when build_with_gonk==1, which is set when MOZ_WIDGET_TOOLKIT is gonk. We should test MOZ_WIDGET_TOOLKIT in makefile. Looks good to me, thanks.
Attachment #759528 - Flags: review?(pwang) → review+
Assignee: nobody → kyle
https://hg.mozilla.org/mozilla-central/rev/0729c58e4977
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Whiteboard: [WebRTC][blocking-webrtc-][b2g-webrtc-] → [WebRTC][blocking-webrtc-][b2g-webrtc-][qa-]
You need to log in before you can comment on or make changes to this bug.