Hello,

"-msse2" is hard-coded as default compile option, which is not
supported on non-PC archs. The attached patch detects SSE2
support.

CCed to upstream author.


regards,
Lifeng

On 15:13 Sat 02/19/11 Feb     , Hector Oron wrote:
> Package: guiqwt
> Version: 2.0.8.1-1
> Severity: serious
> 
> Hello,
> 
>   Your package fails to build on many architectures:
> 
>   Find full build log information at:
>   
> https://buildd.debian.org/fetch.cgi?pkg=guiqwt;ver=2.0.8.1-1;arch=armel;stamp=1298113143
> 
>   Find an overview of failing architectures at:
>   https://buildd.debian.org/pkg.cgi?pkg=guiqwt
> 
> Best regards,
> 
> -- System Information:
> Debian Release: squeeze/sid
>   APT prefers testing
>   APT policy: (650, 'testing'), (600, 'unstable'), (1, 'experimental')
> Architecture: i386 (i686)
> 
> Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
> Locale: LANG=ca_ES.UTF-8, LC_CTYPE=ca_ES.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> 
> 
> --
> debian-science-maintainers mailing list
> [email protected]
> http://lists.alioth.debian.org/mailman/listinfo/debian-science-maintainers

-- 
--- a/setup.py
+++ b/setup.py
@@ -97,6 +97,15 @@
 
     cmdclass['build_doc'] = build_doc
 
+from numpy.distutils.cpuinfo import cpu
+
+sse2_flag=""
+
+try:   
+    if cpu._has_sse2():
+        sse2_flag="-msse2 "
+except KeyError:
+    pass
 
 setup(name=LIBNAME, version=version,
       download_url='http://%s.googlecode.com/files/%s-%s.zip' % (
@@ -108,7 +117,7 @@
       ext_modules=[Extension(LIBNAME+'._ext', [join("src", 'histogram.f')]),
                    Extension(LIBNAME+'._mandel', [join("src", 'mandel.f90')]),
                    Extension(LIBNAME+'._scaler', [join("src", "scaler.cpp")],
-                             extra_compile_args=["-msse2 -Wall -Werror",],
+                             extra_compile_args=[sse2_flag+"-Wall -Werror",],
                              depends=[join("src", "traits.hpp"),
                                       join("src", "points.hpp"),
                                       join("src", "arrays.hpp"),

Attachment: signature.asc
Description: GnuPG digital signature

Reply via email to