Multiple compilation warnings when building libsoundtouch on Linux64

NEW
Unassigned

Status

()

Core
Audio/Video: Playback
P5
minor
3 years ago
3 years ago

People

(Reporter: mats, Unassigned)

Tracking

Trunk
x86_64
Linux
Points:
---

Firefox Tracking Flags

(firefox46 affected)

Details

(Reporter)

Description

3 years ago
Multiple compilation warnings when building libsoundtouch on Linux64:

In file included from media/libsoundtouch/src/Unified_cpp_libsoundtouch_src0.cpp:47:
Warning: -Wmacro-redefined in /md1/src/inbound/media/libsoundtouch/src/InterpolateShannon.cpp: 'PI' macro redefined
/md1/src/inbound/media/libsoundtouch/src/InterpolateShannon.cpp:75:9: warning: 'PI' macro redefined [-Wmacro-redefined]
#define PI 3.1415926536
        ^
/md1/src/inbound/media/libsoundtouch/src/AAFilter.cpp:52:9: note: previous definition is here
#define PI        3.141592655357989
        ^
In file included from media/libsoundtouch/src/Unified_cpp_libsoundtouch_src0.cpp:92:
Warning: -Wmacro-redefined in /md1/src/inbound/media/libsoundtouch/src/cpu_detect_x86.cpp: 'bit_MMX' macro redefined
/md1/src/inbound/media/libsoundtouch/src/cpu_detect_x86.cpp:55:12: warning: 'bit_MMX' macro redefined [-Wmacro-redefined]
   #define bit_MMX     (1 << 23)
           ^
/usr/lib/llvm-3.6/bin/../lib/clang/3.6.2/include/cpuid.h:134:9: note: previous definition is here
#define bit_MMX         0x00800000
        ^
In file included from media/libsoundtouch/src/Unified_cpp_libsoundtouch_src0.cpp:92:
Warning: -Wmacro-redefined in /md1/src/inbound/media/libsoundtouch/src/cpu_detect_x86.cpp: 'bit_SSE' macro redefined
/md1/src/inbound/media/libsoundtouch/src/cpu_detect_x86.cpp:56:12: warning: 'bit_SSE' macro redefined [-Wmacro-redefined]
   #define bit_SSE     (1 << 25)
           ^
/usr/lib/llvm-3.6/bin/../lib/clang/3.6.2/include/cpuid.h:137:9: note: previous definition is here
#define bit_SSE         0x02000000
        ^
In file included from media/libsoundtouch/src/Unified_cpp_libsoundtouch_src0.cpp:92:
Warning: -Wmacro-redefined in /md1/src/inbound/media/libsoundtouch/src/cpu_detect_x86.cpp: 'bit_SSE2' macro redefined
/md1/src/inbound/media/libsoundtouch/src/cpu_detect_x86.cpp:57:12: warning: 'bit_SSE2' macro redefined [-Wmacro-redefined]
   #define bit_SSE2    (1 << 26)
           ^
/usr/lib/llvm-3.6/bin/../lib/clang/3.6.2/include/cpuid.h:138:9: note: previous definition is here
#define bit_SSE2        0x04000000
        ^
4 warnings generated.
libmedia_libsoundtouch_src.a.desc
(Reporter)

Comment 1

3 years ago
Note that the second definition of PI above, in AAFilter.cpp, is wrong.
I filed that separately as bug 1236937.
I suppose that that libsoundtouch library is not Mozilla software. Shouldn't the problem be reported upstream? (with a "See also" if the other site also uses Bugzilla software to track its bugs)
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Component: Audio/Video → Audio/Video: Playback
(Reporter)

Comment 3

3 years ago
I think the simplest fix here is to just make sure the multiple #defines use literally
the exact same value.
The redefinition warnings may be a result of our unified build hack, and not present upstream. The news is these are usually safe.
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.