After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 671206 - Failed to build on i386
Failed to build on i386
Status: RESOLVED DUPLICATE of bug 670690
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.36
Other NetBSD
: Normal critical
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-03-02 12:45 UTC by OBATA Akio
Modified: 2012-03-02 13:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description OBATA Akio 2012-03-02 12:45:23 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)?
Comment 1 Tim-Philipp Müller 2012-03-02 12:53:21 UTC
This looks a lot like bug #670690.
Comment 2 OBATA Akio 2012-03-02 12:58:50 UTC
(In reply to comment #1)
> This looks a lot like bug #670690.

Yes, thanks.
Comment 3 Tim-Philipp Müller 2012-03-02 13:07:00 UTC

*** This bug has been marked as a duplicate of bug 670690 ***