Package: nfft
Version: 3.2.3
Tags: patch

nfft fails to build on the hppa/parisc architecture due to a stupid code bug:

Full build log is here:
http://buildd.debian-ports.org/status/fetch.php?pkg=nfft&arch=hppa&ver=3.2.3-1&stamp=1391097293

Error is:
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. 
-I../include  -I../include -D_FORTIFY_SOURCE=2   -g -O2 -Wformat 
-Werror=format-security -std=gnu99 -c -o check_nfft.lo check_nfft.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -I../include 
-D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Werror=format-security -std=gnu99 -c 
check_nfft.c  -fPIC -DPIC -o .libs/check_nfft.o
In file included from check_nfft.c:30:0:
../include/cycle.h:348:25: error: redefinition of 'getticks'
 static __inline__ ticks getticks(void)
                         ^
In file included from ../include/ticks.h:24:0,
                 from ../include/infft.h:53,
                 from check_nfft.c:29:
../include/cycle.h:348:25: note: previous definition of 'getticks' was here
 static __inline__ ticks getticks(void)
                         ^

The attached patch fixes it.
It would be nice if you could apply it to the next version of nfft.
Thanks,
Helge
diff -up ./include/cycle.h.org ./include/cycle.h
--- ./include/cycle.h.org	2014-03-26 15:42:41.840098000 -0600
+++ ./include/cycle.h	2014-03-26 15:43:35.072098000 -0600
@@ -341,7 +341,7 @@ INLINE_ELAPSED(inline)
 /*
  * PA-RISC cycle counter 
  */
-#if defined(__hppa__) || defined(__hppa) && !defined(HAVE_TICK_COUNTER)
+#if (defined(__hppa__) || defined(__hppa)) && !defined(HAVE_TICK_COUNTER)
 typedef unsigned long ticks;
 
 #  ifdef __GNUC__

Reply via email to