Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 136666 - media-sound/linuxsampler-0.3.3 r fails to build after gcc 4.1 upgrade
Summary: media-sound/linuxsampler-0.3.3 r fails to build after gcc 4.1 upgrade
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
: 158043 (view as bug list)
Depends on:
Blocks: 117482
  Show dependency tree
 
Reported: 2006-06-13 08:51 UTC by Ben Cranston
Modified: 2007-02-04 17:51 UTC (History)
3 users (show)

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


Attachments
Possible fix to compile with gcc-4 (linuxsampler-0.3.3-gcc4.patch,1.17 KB, patch)
2006-06-14 23:03 UTC, Miguel Marte
Details | Diff
emerge --info (emerge.info,3.79 KB, text/plain)
2006-09-16 00:03 UTC, Onkobu
Details
Fix asm() call input argument type for memory argument. (linuxsampler-0.3.3-asm-gcc4.diff,1.23 KB, patch)
2006-11-26 09:03 UTC, Danny van Dyk (RETIRED)
Details | Diff
Another patch for the linuxsampler-0.3.3 package in portage. (linuxsampler-0.3.3-gcc4-2.patch,2.16 KB, patch)
2007-02-04 17:51 UTC, Joachim Schiele
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Cranston 2006-06-13 08:51:57 UTC
Error from the emerge..

Synthesizer.cpp:54:   instantiated from here
../common/Resampler.h:101: error: memory input 2 is not directly addressable
../common/Resampler.h: In static member function 'static void LinuxSampler::Resa
mpler<INTERPOLATE>::GetNext4SamplesStereoMMXSSE(sample_t*, void*, float&) [with 
bool INTERPOLATE = true]':
Synthesizer.h:343:   instantiated from 'static void LinuxSampler::gig::Synthesiz
er<IMPLEMENTATION, CHANNELS, USEFILTER, INTERPOLATE, DOLOOP, CONSTPITCH>::Synthe
size(sample_t*, void*, float&, float*, float*, uint&, float*, const float*, cons
t float*, LinuxSampler::gig::Filter&, LinuxSampler::gig::Filter&, LinuxSampler::
biquad_param_t&, LinuxSampler::biquad_param_t&) [with implementation_t IMPLEMENT
ATION = CPP, LinuxSampler::gig::channels_t CHANNELS = MONO, bool USEFILTER = fal
se, bool INTERPOLATE = true, bool DOLOOP = false, bool CONSTPITCH = false]'
Synthesizer.h:177:   instantiated from 'static void LinuxSampler::gig::Synthesiz
er<IMPLEMENTATION, CHANNELS, USEFILTER, INTERPOLATE, DOLOOP, CONSTPITCH>::Synthe
size(VOICE_T&, void*, sample_t*, uint&, const float*, const float*) [with VOICE_
T = LinuxSampler::gig::Voice, implementation_t IMPLEMENTATION = CPP, LinuxSample
r::gig::channels_t CHANNELS = MONO, bool USEFILTER = false, bool INTERPOLATE = t
rue, bool DOLOOP = false, bool CONSTPITCH = false]'
Synthesizer.h:145:   instantiated from 'static void LinuxSampler::gig::Synthesiz
er<IMPLEMENTATION, CHANNELS, USEFILTER, INTERPOLATE, DOLOOP, CONSTPITCH>::Synthe
sizeFragment(VOICE_T&, uint, sample_t*, uint&, uint&, uint, uint, uint, uint&, v
oid*, float&, float&, const float*, const float*) [with VOICE_T = LinuxSampler::
gig::Voice, implementation_t IMPLEMENTATION = CPP, LinuxSampler::gig::channels_t
 CHANNELS = MONO, bool USEFILTER = false, bool INTERPOLATE = true, bool DOLOOP =
 false, bool CONSTPITCH = false]'
Synthesizer.h:101:   instantiated from 'static void LinuxSampler::gig::Synthesiz
er<IMPLEMENTATION, CHANNELS, USEFILTER, INTERPOLATE, DOLOOP, CONSTPITCH>::Synthe
sizeFragment(VOICE_T&, uint, sample_t*, uint) [with VOICE_T = LinuxSampler::gig:
:Voice, implementation_t IMPLEMENTATION = CPP, LinuxSampler::gig::channels_t CHA
NNELS = MONO, bool USEFILTER = false, bool INTERPOLATE = true, bool DOLOOP = fal
se, bool CONSTPITCH = false]'
Synthesizer.cpp:54:   instantiated from here
../common/Resampler.h:142: error: memory input 2 is not directly addressable
make[4]: *** [Synthesizer.lo] Error 1
make[4]: Leaving directory `/var/tmp/portage/linuxsampler-0.3.3/work/linuxsample
r-0.3.3/src/engines/gig'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/linuxsampler-0.3.3/work/linuxsample
r-0.3.3/src/engines'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/linuxsampler-0.3.3/work/linuxsample
r-0.3.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/linuxsampler-0.3.3/work/linuxsample
r-0.3.3'
make: *** [all] Error 2

!!! ERROR: media-sound/linuxsampler-0.3.3 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  linuxsampler-0.3.3.ebuild, line 24:   Called die

!!! make failed
!!! If you need support, post the topmost build error, and the call stack if rel
evant.
----------------------------------------------------------------------------
emerge --info

Portage 2.1 (default-linux/x86/2006.0, gcc-4.1.1/vanilla, glibc-2.4-r3, 2.6.16-gentoo-r9 i686)
=================================================================
System uname: 2.6.16-gentoo-r9 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz
Gentoo Base System version 1.6.14
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.4.2
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-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress 
--force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/d
istfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/pro-audio"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dfx X a52 aac acpi alsa apache2 apm arts audiofile avi bash-completion
 berkdb bitmap-fonts bonobo browserplugin bzip2 calendar cdparanoia cdr cli cryp
t cups dbus dio directfb divx4linux doc dri dv dvd dvdr dvdread eds emacs emacs-
w3 emboss encode esd ethereal evo exif fbcon ffmpeg fftw flac foomaticdb fortran
 ftp gb gdbm gif gnome gpm gps gstreamer gtk gtk2 hal ieee1394 imagemagick imlib
 ipv6 isdnlog jack java javascript jikes jpeg kde ladcca libg++ libwww lm_sensor
s mad mikmod mmc motif mp3 mpeg ncurses nls nptl nptlonly offensive ogg opengl o
ss pam pcre pdflib perl png portaudio ppds pppd python qt quicktime readline ref
lection samba sdl session slp sndfile snmp sockets sox spell spl sse ssl tcpd ti
ff truetype truetype-fonts type1-fonts udev usb vorbis win32codecs xine xinerama
 xml xmms xorg xv zlib elibc_glibc kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGU
AS, PORTAGE_RSYNC_EXTRA_OPTS

----------------------------------------------------
compiler
gcc-config -l
Available compilers for CTARGET i686-pc-linux-gnu
  [1]   i686-pc-linux-gnu-4.1.1/vanilla

Activated profiles:
  i686-pc-linux-gnu *       
                            i686-pc-linux-gnu-4.1.1/vanilla
Comment 1 Miguel Marte 2006-06-14 19:05:08 UTC
The problem is the x86 assembly.  There are 2 options here.  The easy fix is to remove the assembly and just use the C++ implementation and the hard way which is to fix the assembly.  The question now is, what does the maintainer want to do.
Comment 2 Miguel Marte 2006-06-14 23:03:37 UTC
Created attachment 89230 [details, diff]
Possible fix to compile with gcc-4

I'm not sure if this is correct, but i think its right.  Can some one check this for me.
Comment 3 Stephen Tallowitz 2006-09-02 12:11:41 UTC
(In reply to comment #2)
> I'm not sure if this is correct, but i think its right.  Can some one check
> this for me.

Don't know assembler, so can't comment on the patch. Just tested it: without the patch it didn't work, with the patch it did. "emerge --info" snippet:
Portage 2.1-r2 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.4-r3, 2.6.17.6 i686)
=================================================================
System uname: 2.6.17.6 i686 AMD Athlon(tm) processor
Gentoo Base System version 1.12.4
app-admin/eselect-compiler: [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.4.19-r1, 2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-tbird -O3 -pipe -fomit-frame-pointer"
Comment 4 Onkobu 2006-09-16 00:02:35 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > I'm not sure if this is correct, but i think its right.  Can some one check
> > this for me.
> 
> Don't know assembler, so can't comment on the patch. Just tested it: without
> the patch it didn't work, with the patch it did. "emerge --info" snippet:

works for me, too
Comment 5 Onkobu 2006-09-16 00:03:37 UTC
Created attachment 97119 [details]
emerge --info
Comment 6 Danny van Dyk (RETIRED) gentoo-dev 2006-11-26 09:03:39 UTC
Created attachment 102755 [details, diff]
Fix asm() call input argument type for memory argument.
Comment 7 Danny van Dyk (RETIRED) gentoo-dev 2006-11-26 09:22:12 UTC
(In reply to comment #2)
> Created an attachment (id=89230) [edit]
> Possible fix to compile with gcc-4
> 
> I'm not sure if this is correct, but i think its right.  Can some one check
> this for me.
Sure :-) This patch maybe compiling but is not perfect. You're using C++
manerisms here together with inline assembly. Specifically, you're
handing over a _reference_ to a const float. This is bad in 2 ways:
a) from a C++ viewpoint, you shouldn't initialize a const reference like that.
b) You're using a reference like a pointer. That's a nono. If you need a pointer, use a pointer. That's what the '&' operator is for.

Flameeyes: Your turn now :-)

Comment 8 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-11-26 09:43:27 UTC
Thanks Danny for the patch, fixed now.
Comment 9 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-11-26 09:43:43 UTC
Thanks Danny for the patch, fixed now.
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2006-12-13 13:24:08 UTC
*** Bug 158043 has been marked as a duplicate of this bug. ***
Comment 11 Joachim Schiele 2007-02-04 17:51:22 UTC
Created attachment 109147 [details, diff]
Another patch for the linuxsampler-0.3.3 package in portage.

the problem is that even the patch which is in portage right now didn't work. so I've create this one. I've not tested it and I'm not sure if it's done correctly. However it's compiling now.

just add the patch to the files directory, edit the ebuild like this:
src_unpack() {
    unpack ${A}
    cd "${S}"

    epatch "${FILESDIR}/${P}-gcc4.patch"
    epatch "${FILESDIR}/${P}-gcc4-2.patch"
}

rebuild the digest and emerge it.