Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 148695 - media-libs/libsoundtouch-1.3.1 fails compile without SSE
Summary: media-libs/libsoundtouch-1.3.1 fails compile without SSE
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 146950 172088
  Show dependency tree
 
Reported: 2006-09-22 13:01 UTC by Christopher Byrne
Modified: 2011-08-26 17:06 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to disable optimization (disable-optimization.patch,536 bytes, patch)
2006-10-29 01:14 UTC, Sok Ann Yap
Details | Diff
Modified Ebuild (libsoundtouch-1.3.1.ebuild,1.23 KB, text/plain)
2006-10-29 01:15 UTC, Sok Ann Yap
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Byrne 2006-09-22 13:01:07 UTC
media-libs/libsoundtouch-1.3.1 is failing, last few lines are: 

if /bin/sh ../../libtool --tag=CXX --mode=compile i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include   -fcheck-new -I../../include -mtune=i686 -O2 -pipe -MT mmx_optimized.lo -MD -MP -MF ".deps/mmx_optimized.Tpo" -c -o mmx_optimized.lo mmx_optimized.cpp; \
then mv -f ".deps/mmx_optimized.Tpo" ".deps/mmx_optimized.Plo"; else rm -f ".deps/mmx_optimized.Tpo"; exit 1; fi
 i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -fcheck-new -I../../include -mtune=i686 -O2 -pipe -MT mmx_optimized.lo -MD -MP -MF .deps/mmx_optimized.Tpo -c mmx_optimized.cpp  -fPIC -DPIC -o mmx_optimized.o
if /bin/sh ../../libtool --tag=CXX --mode=compile i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include   -fcheck-new -I../../include -mtune=i686 -O2 -pipe -MT sse_optimized.lo -MD -MP -MF ".deps/sse_optimized.Tpo" -c -o sse_optimized.lo sse_optimized.cpp; \
then mv -f ".deps/sse_optimized.Tpo" ".deps/sse_optimized.Plo"; else rm -f ".deps/sse_optimized.Tpo"; exit 1; fi
 i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -fcheck-new -I../../include -mtune=i686 -O2 -pipe -MT sse_optimized.lo -MD -MP -MF .deps/sse_optimized.Tpo -c sse_optimized.cpp  -fPIC -DPIC -o sse_optimized.o
In file included from sse_optimized.cpp:70:
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/xmmintrin.h:34:3: error: #error "SSE instruction set not enabled"
sse_optimized.cpp: In member function 'virtual double soundtouch::TDStretchSSE::calcCrossCorrStereo(const float*, const float*) const':
sse_optimized.cpp:76: error: '__m128' was not declared in this scope
sse_optimized.cpp:76: error: expected `;' before 'vSum'
sse_optimized.cpp:106: error: 'pVec2' was not declared in this scope
sse_optimized.cpp:106: error: expected primary-expression before ')' token
sse_optimized.cpp:106: error: expected `;' before 'pV2'
sse_optimized.cpp:107: error: 'vSum' was not declared in this scope
sse_optimized.cpp:107: error: '_mm_setzero_ps' was not declared in this scope
sse_optimized.cpp:113: error: '_mm_load_ps' was not declared in this scope
sse_optimized.cpp:113: error: '_mm_mul_ps' was not declared in this scope
sse_optimized.cpp:113: error: '_mm_add_ps' was not declared in this scope
sse_optimized.cpp: In member function 'virtual uint soundtouch::FIRFilterSSE::evaluateFilterStereo(float*, const float*, uint) const':
sse_optimized.cpp:296: error: expected initializer before '*' token
sse_optimized.cpp:297: error: '__m128' was not declared in this scope
sse_optimized.cpp:297: error: expected `;' before 'sum1'
sse_optimized.cpp:301: error: 'pFil' was not declared in this scope
sse_optimized.cpp:301: error: expected primary-expression before ')' token
sse_optimized.cpp:301: error: expected `;' before 'filterCoeffsAlign'
sse_optimized.cpp:303: error: 'sum1' was not declared in this scope
sse_optimized.cpp:303: error: 'sum2' was not declared in this scope
sse_optimized.cpp:303: error: '_mm_setzero_ps' was not declared in this scope
sse_optimized.cpp:313: error: '_mm_loadu_ps' was not declared in this scope
sse_optimized.cpp:313: error: '_mm_mul_ps' was not declared in this scope
sse_optimized.cpp:313: error: '_mm_add_ps' was not declared in this scope
sse_optimized.cpp:334: error: '_MM_SHUFFLE' was not declared in this scope
sse_optimized.cpp:334: error: '_mm_shuffle_ps' was not declared in this scope
sse_optimized.cpp:336: error: '_mm_add_ps' was not declared in this scope
sse_optimized.cpp:336: error: '_mm_storeu_ps' was not declared in this scope
make[2]: *** [sse_optimized.lo] Error 1
make[2]: Leaving directory `/var/tmp/portage/libsoundtouch-1.3.1/work/soundtouch-1.3.1/source/SoundTouch'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/libsoundtouch-1.3.1/work/soundtouch-1.3.1/source'
make: *** [all-recursive] Error 1

!!! ERROR: media-libs/libsoundtouch-1.3.1 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  libsoundtouch-1.3.1.ebuild, line 37:   Called die

!!! emake failed
!!! If you need support, post the topmost build error, and the call stack if relevant.

Adding "-msse" in the CFLAGS lets it compile. I beleive my arch implies -mmmx in CFLAGS, so I'm not sure if there a similar issue with MMX or not.
Comment 1 Christopher Byrne 2006-09-22 13:01:56 UTC
Gentoo Base System version 1.12.5
Portage 2.1.1 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.4-r3, 2.6.17-gentoo-r8 i686)
=================================================================
System uname: 2.6.17-gentoo-r8 i686 AMD Athlon(tm) XP 2000+
Last Sync: Fri, 22 Sep 2006 03:00:09 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-mtune=i686 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-mtune=i686 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS=""
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 berkdb bitmap-fonts bzip2 caps cli crypt cups dbus dlloader dri elibc_glibc fam fortran gdbm gnutls gpm input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog kernel_linux libg++ logrotate ncurses nls nptl nptlonly pam pcre perl ppds pppd python readline reflection samba session spl ssl tcpd truetype-fonts type1-fonts udev unicode userland_GNU video_cards_fbdev video_cards_savage xorg zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 2 Christian Faulhammer (RETIRED) gentoo-dev 2006-10-04 00:48:33 UTC
I can reproduce it...you really need to set CFLAGS="-msse" (you kill that flag by the respect-cflags.patch) according to README, because it heavily depends on it.  I found no way in configure to disable features that require SSE, so unfortunately you are forced to use it (and at least on x86 we also need to force -mmmx).
Comment 3 Chris Gianelloni (RETIRED) gentoo-dev 2006-10-04 08:44:15 UTC
Then the ebuild needs to be patched to check for USE="mmx sse" on x86, and die if it doesn't find them.  That's the only solution I can come up with, if the package really does require SSE, since not all x86 CPUs support SSE/MMX.

Sound team: please add us back once the ebuild's been patched if we need to mark something stable
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-10-04 08:56:57 UTC
Thanks Christian for testing, I've committed the sse check as wolf suggested.
Comment 5 Christopher Byrne 2006-10-05 23:24:23 UTC
Unfortunately, while the ebuild now aborts if the "sse" USE flag is not set; actually setting it has no effect - the ebuild STILL won't compile without "-msse" in CFLAGS.

Comment 6 Sok Ann Yap 2006-10-29 01:12:57 UTC
The package doesn't really require SSE to compile. I managed to get it to work following the workaround mentioned at Section 2.2 of http://www.surina.net/soundtouch/README.html

 
Comment 7 Sok Ann Yap 2006-10-29 01:14:44 UTC
Created attachment 100691 [details, diff]
Patch to disable optimization
Comment 8 Sok Ann Yap 2006-10-29 01:15:36 UTC
Created attachment 100692 [details]
Modified Ebuild
Comment 9 Ryan Hill (RETIRED) gentoo-dev 2007-02-24 18:35:32 UTC
fixed, thanks.
Comment 10 Mark Purtill 2007-04-13 03:20:16 UTC
(In reply to comment #5)
> Unfortunately, while the ebuild now aborts if the "sse" USE flag is not set;
> actually setting it has no effect - the ebuild STILL won't compile without
> "-msse" in CFLAGS.
>
        This still seems to be true; I have mmx and sse in my use flags, but I got the same error as in the original report until I add -msse to CFLAGS and CXXFLAGS.  Should the ebuild do that automatically?
Comment 11 Ryan Hill (RETIRED) gentoo-dev 2007-04-14 01:39:11 UTC
Reopening.
Comment 12 Samuli Suominen (RETIRED) gentoo-dev 2007-04-14 12:33:59 UTC
Fixed (again). Try libsoundtouch-1.3.1-r1
Comment 13 Ryan Hill (RETIRED) gentoo-dev 2007-04-14 14:15:44 UTC
Reopening (again).  They _are_ building -r1.

Comment 14 Ryan Hill (RETIRED) gentoo-dev 2007-04-14 14:16:07 UTC
.
Comment 15 Samuli Suominen (RETIRED) gentoo-dev 2007-04-14 16:11:39 UTC
(In reply to comment #13)
> Reopening (again).  They _are_ building -r1.
> 

Which was fixed since, there was no point revbumping it.