Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 129304 - fftw fails to build with altivec support and gcc-4.x
Summary: fftw fails to build with altivec support and gcc-4.x
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: PPC All
: High normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 117482
  Show dependency tree
 
Reported: 2006-04-08 20:24 UTC by SpanKY
Modified: 2006-06-26 06:27 UTC (History)
0 users

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


Attachments
fftw-altivec-headers.patch (fftw-altivec-headers.patch,753 bytes, patch)
2006-04-09 14:19 UTC, SpanKY
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2006-04-08 20:24:42 UTC
havent gotten around to poking at the source ...

root@G5[ppc] 0 nonportable # make 2>&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 ".deps/sse.Tpo" -c -o sse.lo sse.c; \
then mv -f ".deps/sse.Tpo" ".deps/sse.Plo"; else rm -f ".deps/sse.Tpo"; 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 '=', ',', ';', 'asm' or '__attribute__' before 'float'
../../simd/simd-altivec.h:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'VADD'
../../simd/simd-altivec.h:48: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'VSUB'
../../simd/simd-altivec.h:49: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'VFMA'
../../simd/simd-altivec.h:50: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'VFNMS'



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="ppc ~ppc"
AUTOCLEAN="yes"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -mtune=powerpc -pipe"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/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"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mtune=powerpc -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg ccache distlocks metadata-transfer noauto noinfo parallel-fetch sandbox sfperms splitdebug"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1 -Wl,-z,relro"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages/powerpc-unknown-linux-gnu"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="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"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS
Comment 1 Luca Barbato gentoo-dev 2006-04-09 05:18:29 UTC
I fixed a version long ago and sent the bugfix upstream, but this one looks unrelated.
Comment 2 Luca Barbato gentoo-dev 2006-04-09 06:48:13 UTC
using -mtune=G4, -mtune=G3 or USE -altivec it should work.

(at least is working here on the G4)
Comment 3 SpanKY gentoo-dev 2006-04-09 10:12:16 UTC
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 >&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 "-maltivec" 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 ;)
Comment 4 SpanKY gentoo-dev 2006-04-09 14:19:13 UTC
Created attachment 84322 [details, diff]
fftw-altivec-headers.patch

this patch should fix the issue (it did for me) ... it should also be sent upstream ...
Comment 5 Markus Dittrich (RETIRED) gentoo-dev 2006-04-10 06:33:51 UTC
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
Comment 6 SpanKY gentoo-dev 2006-04-10 15:24:45 UTC
it should
Comment 7 Markus Dittrich (RETIRED) gentoo-dev 2006-04-10 22:07:54 UTC
Hi SpanKY,

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

best,
Markus

Comment 8 SpanKY gentoo-dev 2006-04-10 22:21:10 UTC
you need to run autoconf in src_unpack after applying the patch ... either that or create a patch against configure ...
Comment 9 Markus Dittrich (RETIRED) gentoo-dev 2006-04-10 23:10:04 UTC
Thanks for pointing that out and for your patience :(
I added an eautoconf and I better get some sleep now.

Markus