Closed Bug 1118698 Opened 9 years ago Closed 9 years ago

Enable MOZ_USE_SYSTRACE will gets redefinition error

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox36 fixed, firefox37 fixed)

RESOLVED FIXED
2.2 S3 (9jan)
Tracking Status
firefox36 --- fixed
firefox37 --- fixed

People

(Reporter: ethlin, Assigned: ethlin)

Details

Attachments

(1 file)

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
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)
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)
https://hg.mozilla.org/mozilla-central/rev/ec211f0ef71a
Status: NEW → RESOLVED
Closed: 9 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?
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.