GNOME Bugzilla – Bug 671206
Failed to build on i386
Last modified: 2012-03-02 13:07:00 UTC
On NetBSD-5.1.2-i386, failed to build gst-plugins-base-0.10.36, without CPU tune flags for gcc. gmake[3]: Entering directory `/work/obj/pkgsrc/multimedia/gst-plugins0.10-base/work/gst-plugins-base-0.10.36/gst/audioresample' CC libgstaudioresample_la-speex_resampler_float.lo In file included from resample.c:134, from speex_resampler_float.c:26: resample_sse.h: In function 'inner_product_single': resample_sse.h:46: error: '__m128' undeclared (first use in this function) resample_sse.h:46: error: (Each undeclared identifier is reported only once resample_sse.h:46: error: for each function it appears in.) resample_sse.h:46: error: expected ';' before 'sum' resample_sse.h:49: error: 'sum' undeclared (first use in this function) ... % ls -1 /usr/include*mmintrin.h /usr/include/emmintrin.h /usr/include/mmintrin.h /usr/include/pmmintrin.h /usr/include/xmmintrin.h configure script fail to detect xmmintrin.h, because it contains #ifndef __SSE__ # error "SSE instruction set not enabled" #else ...(sse related difinitions)... #endif configure script success to detect emmintrin.h, because it just #ifdef __SSE2__ ...(sse2 related difinitions)... #endif In gst/audioresample/speex_resampler_float.c: #define _USE_SSE #define _USE_SSE2 In gst/audioresample/speex_resampler_double.c: #define _USE_SSE2 Then #include "resample.c" In resample.c: ... #ifndef HAVE_XMMINTRIN_H #undef _USE_SSE #endif ... #ifndef HAVE_EMMINTRIN_H #undef _USE_SSE2 #endif ... Now, _USE_SSE is not defined whereas _USE_SSE2 is defined (but compiler is not enabled neither SSE nor SSE2). #if defined _USE_SSE || defined _USE_SSE2 #include "resample_sse.h" #endif In resample_sse.h, SSE features are used unconditionally, so compile will fail. SSE2 features are used conditionally, but as said before, SSE2 is not enabled, and emmintrin.h is no-op, so compile will fail. In resample.c, Are there any reason not using __SSE_ instead of HAVE_XMMINTRIN_H for _USE_SSE (and __SSE2__ instead of HAVE_EMMINTRIN_H for _USE_SSE2)?
This looks a lot like bug #670690.
(In reply to comment #1) > This looks a lot like bug #670690. Yes, thanks.
*** This bug has been marked as a duplicate of bug 670690 ***