Debian Bug report logs - #734675
fftw3: Fix configury for neon support on arm64 (armv8)

version graph

Package: src:fftw3; Maintainer for src:fftw3 is Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>;

Reported by: Wookey <wookey@wookware.org>

Date: Thu, 9 Jan 2014 03:42:02 UTC

Severity: normal

Tags: patch

Found in version fftw3/3.3.3-7

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>:
Bug#734675; Package src:fftw3. (Thu, 09 Jan 2014 03:42:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Wookey <wookey@wookware.org>:
New Bug report received and forwarded. Copy sent to Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>. (Thu, 09 Jan 2014 03:42:06 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Wookey <wookey@wookware.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: fftw3: Fix configury for neon support on arm64 (armv8)
Date: Thu, 09 Jan 2014 03:38:31 +0000
[Message part 1 (text/plain, inline)]
Source: fftw3
Version: 3.3.3-7
Severity: normal
Tags: patch
User: debian-arm@lists.debian.org
Usertag: arm64

In version 3.3.3-6 arm64 was added to the --enable-neon arch list. This
is correct in principle but doesn't work because both the enabling
compiler option and the compiler define have changed between the 32-bit
armv7 (for which this code was written) and armv8 (the 64-bit arch,
called 'arm64' in debian and 'aarch64' by ARM and GNU triplets).

neon is always enabled on armv8/arm64 unless explictly disabled so the
-mfpu=neon option is not understood by the arm64/aarch64 compiler. Also
__ARM_NEON__ is not defined by the compiler. So this needs changes in
configure.ac and simd-neon.h

However, applying this doesn't in fact get a working build as it exposes
a compiler ICE in the gcc4.8 we are currently using in unstable. But
that should get fixed soon.

Note that full support for arm64 will include enabling double-precision,
as that is available in armv8 neon, and writing code to support it.

Also note that armv8 has fused multiply-accumulate by default, which
apparently needs to be recorded for this package. I failed to understand
exactly what was going on with that so have not changed anything in this
patch, not least because doing so prduced another failure to build, as
have_fma and --enable-neon are deemed incompatible.

-- System Information:
Debian Release: 7.3
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-kvm-i386-20110111 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
[fftw3_3.3.3-7-arm64-neon-support-config.patch (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>:
Bug#734675; Package src:fftw3. (Thu, 23 Jan 2014 21:45:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julian Taylor <jtaylor.debian@googlemail.com>:
Extra info received and forwarded to list. Copy sent to Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>. (Thu, 23 Jan 2014 21:45:09 GMT) Full text and rfc822 format available.

Message #10 received at 734675@bugs.debian.org (full text, mbox):

From: Julian Taylor <jtaylor.debian@googlemail.com>
To: Wookey <wookey@wookware.org>, 734675@bugs.debian.org
Subject: Re: Bug#734675: fftw3: Fix configury for neon support on arm64 (armv8)
Date: Thu, 23 Jan 2014 22:41:28 +0100
On 09.01.2014 04:38, Wookey wrote:
...
> 
> However, applying this doesn't in fact get a working build as it exposes
> a compiler ICE in the gcc4.8 we are currently using in unstable. But
> that should get fixed soon.
> 

thanks, if let me know when gcc works again and I'll try to sort this out.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>:
Bug#734675; Package src:fftw3. (Wed, 02 Apr 2014 21:39:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Wookey <wookey@wookware.org>:
Extra info received and forwarded to list. Copy sent to Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>. (Wed, 02 Apr 2014 21:39:04 GMT) Full text and rfc822 format available.

Message #15 received at 734675@bugs.debian.org (full text, mbox):

From: Wookey <wookey@wookware.org>
To: 734675@bugs.debian.org
Subject: Re: Bug#734675: fftw3: Fix configury for neon support on arm64 (armv8)
Date: Wed, 2 Apr 2014 22:35:55 +0100
+++ Julian Taylor [2014-01-23 22:41 +0100]:
> On 09.01.2014 04:38, Wookey wrote:
> ...
> > 
> > However, applying this doesn't in fact get a working build as it exposes
> > a compiler ICE in the gcc4.8 we are currently using in unstable. But
> > that should get fixed soon.
> > 
> 
> thanks, if let me know when gcc works again and I'll try to sort this out.

Just confirmed that this is still present in unstable with gcc-4.8  4.8.2-17

- ifneq (,$(filter $(ARCHITECTURE), armhf arm64))
+ ifneq (,$(filter $(ARCHITECTURE), armhf))
on line 35 of debian/rules allows the build to work with current gcc.

Will test with gcc-4.9 (assuming it builds)

Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>:
Bug#734675; Package src:fftw3. (Sun, 06 Apr 2014 19:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julian Taylor <jtaylor.debian@googlemail.com>:
Extra info received and forwarded to list. Copy sent to Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>.

Your message did not contain a Subject field. They are recommended and useful because the title of a Bug is determined using this field. Please remember to include a Subject field in your messages in future.

(Sun, 06 Apr 2014 19:45:04 GMT) Full text and rfc822 format available.


Message #20 received at 734675@bugs.debian.org (full text, mbox):

From: Julian Taylor <jtaylor.debian@googlemail.com>
To: 734675@bugs.debian.org
Cc: Wookey <wookey@wookware.org>
Date: Sun, 06 Apr 2014 21:43:24 +0200
as far as I can tell this patch will disable neon on normal arm chips as
host_cpu is not always arm, in my qemu it seems to be armv7l.
as neon doesn't work with gcc currently I'll skip the patch for the next
upload and only disable neon on arm64.



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>:
Bug#734675; Package src:fftw3. (Wed, 16 Apr 2014 09:33:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Wookey <wookey@wookware.org>:
Extra info received and forwarded to list. Copy sent to Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>. (Wed, 16 Apr 2014 09:33:04 GMT) Full text and rfc822 format available.

Message #25 received at 734675@bugs.debian.org (full text, mbox):

From: Wookey <wookey@wookware.org>
To: Julian Taylor <jtaylor.debian@googlemail.com>, 734675@bugs.debian.org
Subject: Re: Bug#734675: fftw3: Fix configury for neon support on arm64 (armv8)
Date: Wed, 16 Apr 2014 10:31:17 +0100
+++ Julian Taylor [2014-01-23 22:41 +0100]:
> On 09.01.2014 04:38, Wookey wrote:
> ...
> > 
> > However, applying this doesn't in fact get a working build as it exposes
> > a compiler ICE in the gcc4.8 we are currently using in unstable. But
> > that should get fixed soon.
> > 
> 
> thanks, if let me know when gcc works again and I'll try to sort this out.

OK. I just tested with gcc-4.9 and the ICE is gone but there is still a problem with the build

So the end of the build log looks like:
/bin/bash ../../../libtool  --tag=CC   --mode=compile gcc-4.9 -std=gnu99 -DHAVE_CONFIG_H -I. -I../../..  -I../..
/../kernel -I../../../dft -I../../../dft/simd -I../../../simd-support -D_FORTIFY_SOURCE=2  -g -O2 -Wformat -Werr
or=format-security -O2 -MT n1fv_64.lo -MD -MP -MF .deps/n1fv_64.Tpo -c -o n1fv_64.lo n1fv_64.c
libtool: compile:  gcc-4.9 -std=gnu99 -DHAVE_CONFIG_H -I. -I../../.. -I../../../kernel -I../../../dft -I../../..
/dft/simd -I../../../simd-support -D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Werror=format-security -O2 -MT n1fv_64.lo
libtool: compile:  gcc-4.9 -std=gnu99 -DHAVE_CONFIG_H -I. -I../../.. -I../../../kernel -I../../../dft -I../../..
/dft/simd -I../../../simd-support -D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Werror=format-security -O2 -MT n1fv_64.lo
 -MD -MP -MF .deps/n1fv_64.Tpo -c n1fv_64.c -o n1fv_64.o >/dev/null 2>&1
make[6]: *** [n1fv_64.lo] Error 1
make[6]: Leaving directory `/home/buildd/packages/modified/fftw3-3.3.3/dft/simd/neon'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/home/buildd/packages/modified/fftw3-3.3.3/dft/simd/neon'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/buildd/packages/modified/fftw3-3.3.3/dft/simd'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/buildd/packages/modified/fftw3-3.3.3/dft'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/buildd/packages/modified/fftw3-3.3.3'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/buildd/packages/modified/fftw3-3.3.3'
make: *** [build-arch] Error 2
dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2


Running that offending command with gcc-4.9 and 4.8 shows:

gcc-4.9 builds OK:
(sid-arm64-sbuild)buildd@turfan:~/packages/modified/fftw3-3.3.3/dft/simd/neon$ /bin/bash ../../../libtool  --tag
=CC   --mode=compile gcc-4.9 -std=gnu99 -DHAVE_CONFIG_H -I. -I../../..  -I../../../kernel -I../../../dft -I../..
/../dft/simd -I../../../simd-support -D_FORTIFY_SOURCE=2  -g -O2 -Wformat -Werror=format-security -O2 -MT n1fv_6
4.lo -MD -MP -MF .deps/n1fv_64.Tpo -c -o n1fv_64.lo n1fv_64.c                                                   
libtool: compile:  gcc-4.9 -std=gnu99 -DHAVE_CONFIG_H -I. -I../../.. -I../../../kernel -I../../../dft -I../../../dft/simd -I../../../simd-support -D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Werror=format-security -O2 -MT n1fv_64.lo -MD -MP -MF .deps/n1fv_64.Tpo -c n1fv_64.c  -fPIC -DPIC -o .libs/n1fv_64.o
libtool: compile:  gcc-4.9 -std=gnu99 -DHAVE_CONFIG_H -I. -I../../.. -I../../../kernel -I../../../dft -I../../../dft/simd -I../../../simd-support -D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Werror=format-security -O2 -MT n1fv_64.lo -MD -MP -MF .deps/n1fv_64.Tpo -c n1fv_64.c -o n1fv_64.o >/dev/null 2>&1

gcc-4.8 ICEs
(sid-arm64-sbuild)buildd@turfan:~/packages/modified/fftw3-3.3.3/dft/simd/neon$ /bin/bash ../../../libtool  --tag
=CC   --mode=compile gcc-4.8 -std=gnu99 -DHAVE_CONFIG_H -I. -I../../..  -I../../../kernel -I../../../dft -I../..
/../dft/simd -I../../../simd-support -D_FORTIFY_SOURCE=2  -g -O2 -Wformat -Werror=format-security -O2 -MT n1fv_6
4.lo -MD -MP -MF .deps/n1fv_64.Tpo -c -o n1fv_64.lo n1fv_64.c                                                   
libtool: compile:  gcc-4.8 -std=gnu99 -DHAVE_CONFIG_H -I. -I../../.. -I../../../kernel -I../../../dft -I../../..
/dft/simd -I../../../simd-support -D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Werror=format-security -O2 -MT n1fv_64.lo
 -MD -MP -MF .deps/n1fv_64.Tpo -c n1fv_64.c  -fPIC -DPIC -o .libs/n1fv_64.o
In file included from n1fv_64.c:3:0:
../common/n1fv_64.c: In function 'n1fv_64':
../common/n1fv_64.c:1560:1: internal compiler error: in simplify_const_unary_operation, at simplify-rtx.c:1508
 }
 ^

So what I don't understand is why the build is falling over as running the command onit's own seems to be OK?

I did this build as
CC=gcc-4.9 dpkg-buildpackage -B -uc -us
which appears to change gcc to gcc-4.9 everywhere it needs to. 

Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>:
Bug#734675; Package src:fftw3. (Wed, 16 Apr 2014 12:33:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julian Taylor <jtaylor.debian@googlemail.com>:
Extra info received and forwarded to list. Copy sent to Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>. (Wed, 16 Apr 2014 12:33:09 GMT) Full text and rfc822 format available.

Message #30 received at 734675@bugs.debian.org (full text, mbox):

From: Julian Taylor <jtaylor.debian@googlemail.com>
To: Wookey <wookey@wookware.org>
Cc: 734675@bugs.debian.org
Subject: Re: Bug#734675: fftw3: Fix configury for neon support on arm64 (armv8)
Date: Wed, 16 Apr 2014 14:29:28 +0200
what is the exit code if you run the command by itself? maybe libtool
is eating the error message

also try running the line without libtool, just copy the part after
gcc-4.9 dropping all the bash .../libtool --tag stuff

also the build allows parallel compilation, maybe try with
DEB_BUILD_OPTIONS="parallel=1"



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 13:06:50 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.