bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

Enable MOZ_USE_SYSTRACE will gets redefinition error

RESOLVED FIXED in Firefox 36

Status

Firefox OS
General
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: ethlin, Assigned: ethlin)

Tracking

unspecified
2.2 S3 (9jan)
ARM
Gonk (Firefox OS)
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(firefox36 fixed, firefox37 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
When turing on the flag of MOZ_USE_SYSTRACE, I get the following compile error:

In file included from ../../../../../b2g_git/B2G/system/core/include/cutils/atomic-inline.h:47:0,
                 from ../../../../../b2g_git/B2G/system/core/include/cutils/trace.h:28,
                 from ../../../../../b2g_git/B2G/system/core/include/utils/Trace.h:32,
                 from ../../dist/system_wrappers/utils/Trace.h:3,
                 from ../../dist/include/GeckoProfilerImpl.h:295,
                 from ../../dist/include/GeckoProfiler.h:210,
                 from ../../dist/include/mozilla/CondVar.h:16,
                 from ../../dist/include/mozilla/Monitor.h:10,
                 from ../../../media/libstagefright/binding/include/mp4_demuxer/mp4_demuxer.h:13,
                 from ../../../media/libstagefright/binding/Box.cpp:8,
                 from Unified_cpp_media_libstagefright0.cpp:20:
../../../../../b2g_git/B2G/system/core/include/cutils/atomic-arm.h: In function 'int32_t android_atomic_add(int32_t, volatile int32_t*)':
../../../../../b2g_git/B2G/system/core/include/cutils/atomic-arm.h:116:9: error: redefinition of 'int32_t android_atomic_add(int32_t, volatile int32_t*)'
In file included from ../../dist/system_wrappers/cutils/atomic.h:3:0,
                 from ../../../media/libstagefright/system/core/include/utils/RefBase.h:20,
                 from ../../dist/system_wrappers/utils/RefBase.h:3,
                 from ../../../media/libstagefright/frameworks/av/include/media/stagefright/MediaBuffer.h:24,
                 from ../../dist/system_wrappers/media/stagefright/MediaBuffer.h:3,
                 from ../../../media/libstagefright/binding/Adts.cpp:7,
                 from Unified_cpp_media_libstagefright0.cpp:2:
../../../media/libstagefright/stubs/include/cutils/atomic.h:34:1: error: 'int32_t android_atomic_add(int32_t, volatile int32_t*)' previously defined here
(Assignee)

Comment 1

4 years ago
Created attachment 8545194 [details] [diff] [review]
v1 - add namepsace

I add namespace stagefright in automic.h to prevent the compile error. Do you think it's a good method to solve this problem?
Flags: needinfo?(ajones)
(Assignee)

Comment 2

4 years ago
The redefinition problem is because the android and stagefright's have the same automic function name. When we turn on the MOZ_USE_SYSTRACE flag, we will get the redefinition error. Using namespace can solve this problem easily.
Comment on attachment 8545194 [details] [diff] [review]
v1 - add namepsace

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

LGTM.
Attachment #8545194 - Flags: review+
You should probably use feedback? or review? on the patch rather than needinfo? in future.
Flags: needinfo?(ajones)
(Assignee)

Comment 5

4 years ago
Please land the attachment 8545194 [details] [diff] [review] to mozilla-central.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=99f5b7d8d5e8
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ec211f0ef71a
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S3 (9jan)
Comment on attachment 8545194 [details] [diff] [review]
v1 - add namepsace

Landed on Aurora with a=mse pre-approval.

https://hg.mozilla.org/releases/mozilla-aurora/rev/aa13772c45f6

This is gonk-specific, which isn't our focus for 36 but I'd like to keep the diff as small as possible. Risk is build failure from interaction with another unported change; otherwise minimal.
Attachment #8545194 - Flags: approval-mozilla-aurora?
status-firefox36: --- → fixed
status-firefox37: --- → fixed
Attachment #8545194 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.