<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>129304</bug_id>
          
          <creation_ts>2006-04-08 20:24 0000</creation_ts>
          <short_desc>fftw fails to build with altivec support and gcc-4.x</short_desc>
          <delta_ts>2006-06-26 06:27:11 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Development</component>
          <version>unspecified</version>
          <rep_platform>PPC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>117482</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter>vapier@gentoo.org</reporter>
          <assigned_to>sci@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2006-04-08 20:24:42 0000</bug_when>
            <thetext>havent gotten around to poking at the source ...

root@G5[ppc] 0 nonportable # make 2&gt;&amp;1 | head
if /bin/sh ../../libtool --tag=CC --mode=compile powerpc-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../..  -I../../kernel -I../../simd  -maltivec -mabi=altivec -DFAKE__VEC__ -O2 -mtune=powerpc -pipe -pthread -MT sse.lo -MD -MP -MF &quot;.deps/sse.Tpo&quot; -c -o sse.lo sse.c; \
then mv -f &quot;.deps/sse.Tpo&quot; &quot;.deps/sse.Plo&quot;; else rm -f &quot;.deps/sse.Tpo&quot;; exit 1; fi
 powerpc-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../kernel -I../../simd -maltivec -mabi=altivec -DFAKE__VEC__ -O2 -mtune=powerpc -pipe -pthread -MT sse.lo -MD -MP -MF .deps/sse.Tpo -c sse.c  -fPIC -DPIC -o .libs/sse.o
In file included from ../../simd/simd.h:30,
                 from sse.c:24:
../../simd/simd-altivec.h:42: error: expected &apos;=&apos;, &apos;,&apos;, &apos;;&apos;, &apos;asm&apos; or &apos;__attribute__&apos; before &apos;float&apos;
../../simd/simd-altivec.h:47: error: expected &apos;=&apos;, &apos;,&apos;, &apos;;&apos;, &apos;asm&apos; or &apos;__attribute__&apos; before &apos;VADD&apos;
../../simd/simd-altivec.h:48: error: expected &apos;=&apos;, &apos;,&apos;, &apos;;&apos;, &apos;asm&apos; or &apos;__attribute__&apos; before &apos;VSUB&apos;
../../simd/simd-altivec.h:49: error: expected &apos;=&apos;, &apos;,&apos;, &apos;;&apos;, &apos;asm&apos; or &apos;__attribute__&apos; before &apos;VFMA&apos;
../../simd/simd-altivec.h:50: error: expected &apos;=&apos;, &apos;,&apos;, &apos;;&apos;, &apos;asm&apos; or &apos;__attribute__&apos; before &apos;VFNMS&apos;



Portage 2.1_pre7-r4 (default-linux/ppc/2005.1/ppc, gcc-4.1.0, glibc-2.4-r2, 2.6.16-gentoo ppc)
=================================================================
System uname: 2.6.16-gentoo ppc PPC970MP, altivec supported
Gentoo Base System version 1.12.0_pre17
distcc 2.18.3 powerpc-unknown-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.4.2-r1
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.15.90.0.3-r5, 2.16.1-r2, 2.16.91.0.3, 2.16.91.0.4, 2.16.91.0.5, 2.16.91.0.6, 2.16.91.0.7
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r4
ACCEPT_KEYWORDS=&quot;ppc ~ppc&quot;
AUTOCLEAN=&quot;yes&quot;
CBUILD=&quot;powerpc-unknown-linux-gnu&quot;
CFLAGS=&quot;-O2 -mtune=powerpc -pipe&quot;
CHOST=&quot;powerpc-unknown-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/env.d&quot;
CXXFLAGS=&quot;-O2 -mtune=powerpc -pipe&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoconfig buildpkg ccache distlocks metadata-transfer noauto noinfo parallel-fetch sandbox sfperms splitdebug&quot;
GENTOO_MIRRORS=&quot;http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo&quot;
LDFLAGS=&quot;-Wl,-O1 -Wl,-z,relro&quot;
MAKEOPTS=&quot;-j6&quot;
PKGDIR=&quot;/usr/portage/packages/powerpc-unknown-linux-gnu&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/local/portage&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;ppc X a52 aac aalib acl alsa altivec asf audiofile berkdb bitmap-fonts boundschecking bzip2 cairo cddb cdparanoia cdr crypt css cups curl directfb dri dts dvd dvdr dvdread emboss encode fame ffmpeg flac fontconfig gd gif glitz gpm gstreamer gtk gtk2 imagemagick ipv6 isdnlog jbig jpeg jpeg2k kde libcaca libwww lzo mad matroska mikmod mjpeg mng modplug motif mp3 mpeg multislot musepack ncurses nls nptl nptlonly ogg oggvorbis openal opengl pdf pdflib perl php png pppd python qt quicktime readline rle samba sdl sndfile spell ssl subversion tcltk tcpd tga theora tiff truetype truetype-fonts type1-fonts unicode vcd vidix vorbis xanim xinetd xml xml2 xmms xpm xprint xrandr xv xvid yv12 zlib elibc_glibc kernel_linux userland_GNU&quot;
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>lu_zero@gentoo.org</who>
            <bug_when>2006-04-09 05:18:29 0000</bug_when>
            <thetext>I fixed a version long ago and sent the bugfix upstream, but this one looks unrelated.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>lu_zero@gentoo.org</who>
            <bug_when>2006-04-09 06:48:13 0000</bug_when>
            <thetext>using -mtune=G4, -mtune=G3 or USE -altivec it should work.

(at least is working here on the G4)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2006-04-09 10:12:16 0000</bug_when>
            <thetext>Mark pointed out the bug here:

configure:21661: checking altivec.h usability
configure:21673: powerpc-unknown-linux-gnu-gcc -c -O2 -mtune=powerpc -pipe  conftest.c &gt;&amp;5
In file included from conftest.c:75:
/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.0/include/altivec.h:37:2: error: #error Use the &quot;-maltivec&quot; flag to enable PowerPC AltiVec support
configure:21679: $? = 1

and indeed, if i change config.h to define HAVE_ALTIVEC_H, the compile works

so not a gcc bug ;)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2006-04-09 14:19:13 0000</bug_when>
            <thetext>Created an attachment (id=84322)
fftw-altivec-headers.patch

this patch should fix the issue (it did for me) ... it should also be sent upstream ...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>markusle@gentoo.org</who>
            <bug_when>2006-04-10 06:33:51 0000</bug_when>
            <thetext>Hi SpanKY,

Thank you very much for the patch! Does it by any
chance also fix the altivec issues with gcc-3.4 (the ebuild 
disables altivec for gcc-3.4 at the moment)?

Thanks,
Markus</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2006-04-10 15:24:45 0000</bug_when>
            <thetext>it should</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>markusle@gentoo.org</who>
            <bug_when>2006-04-10 22:07:54 0000</bug_when>
            <thetext>Hi SpanKY,

I&apos;ve just added the patch to the fftw-3.1.1.ebuild and will send it
upstream as well. Thanks again!

best,
Markus

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2006-04-10 22:21:10 0000</bug_when>
            <thetext>you need to run autoconf in src_unpack after applying the patch ... either that or create a patch against configure ...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>markusle@gentoo.org</who>
            <bug_when>2006-04-10 23:10:04 0000</bug_when>
            <thetext>Thanks for pointing that out and for your patience :(
I added an eautoconf and I better get some sleep now.

Markus</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>84322</attachid>
            <date>2006-04-09 14:19 0000</date>
            <desc>fftw-altivec-headers.patch</desc>
            <filename>fftw-altivec-headers.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGNvbmZpZ3VyZS5hYworKysgY29uZmlndXJlLmFjCkBAIC0yMzAsNiArMjMwLDEyIEBACiBm
aQogQUNfU1VCU1QoU0lNRF9DRkxBR1MpCiAKK2RubCBTb21lIGhlYWRlcnMgcmVxdWlyZSB0aGUg
c2ltZCBjZmxhZ3MgKGxpa2UgYWx0aXZlYy5oKQorc2F2ZV9DRkxBR1M9IiRDRkxBR1MiCitzYXZl
X0NQUEZMQUdTPSIkQ1BQRkxBR1MiCitDRkxBR1M9IiRDRkxBR1MgJFNJTURfQ0ZMQUdTIgorQ1BQ
RkxBR1M9IiRDUFBGTEFHUyAkU0lNRF9DRkxBR1MiCisKIGRubCBDaGVja3MgZm9yIGhlYWRlciBm
aWxlcy4KIEFDX0hFQURFUl9TVERDCiBBQ19DSEVDS19IRUFERVJTKFtsaWJpbnRsLmggbWFsbG9j
Lmggc3RkZGVmLmggc3RkbGliLmggc3RyaW5nLmggc3RyaW5ncy5oIHN5cy90aW1lLmggdW5pc3Rk
LmggbGltaXRzLmggY19hc20uaCBpbnRyaW5zaWNzLmggc3RkaW50LmggbWFjaC9tYWNoX3RpbWUu
aCBzeXMvc3lzY3RsLmggYWx0aXZlYy5oXSkKQEAgLTIzNyw2ICsyNDMsMTAgQEAKIGRubCBpbnRy
aW5zaWNzLmg6IGNyYXkgdW5pY29zCiBkbmwgc3lzL3N5c2N0bC5oOiBNYWNPUyBYIGFsdGl2ZWMg
ZGV0ZWN0aW9uCiAKK2RubCByZXN0b3JlIG5vcm1hbCBmbGFncworQ0ZMQUdTPSIkc2F2ZV9DRkxB
R1MiCitDUFBGTEFHUz0iJHNhdmVfQ1BQRkxBR1MiCisKIGRubCBDaGVja3MgZm9yIHR5cGVkZWZz
LCBzdHJ1Y3R1cmVzLCBhbmQgY29tcGlsZXIgY2hhcmFjdGVyaXN0aWNzLgogQUNfQ19DT05TVAog
QUNfQ19JTkxJTkUK
</data>        

          </attachment>
    </bug>

</bugzilla>