Red Hat Bugzilla – Bug 236334
scipy.integrate.quad, Illegal instruction on i386 (recompilation helps)
Last modified: 2007-11-30 17:12:02 EST
Description of problem:
scipy.integrate.quad crashes with "Illegal instruction". But only on i386
architecture. The solution is rebuilding the package from src.rpm. On x86_64 it
Version-Release number of selected component (if applicable):
scipy-0.5.2-1.fc6, Build Date: Sun 25 Feb 2007 08:38:09 PM CET
Steps to Reproduce:
cut and paste this code to your terminal:
python << EOF
from scipy.integrate import quad
from math import pi,cos
return cos(t)/(1 + 0.5*cos(t))**1.5
print quad(ft, 0, 2*pi)
On i386: Illegal instruction
On x86_64: -3.22295889217
Additional info: I tried
rpmbuild --rebuild scipy-0.5.2-1.fc7.src.rpm
and the resulting package is functional.
Okay I can definitely confirm the problem on fc6. The problem does not exist on
fc7 for me.
The fact that recompiling seems to help, seems to suggest to me that something
in the underlying libraries in fc6 have changed. Has there been a numpy, atlas,
blas or fftw update for fc6 since the latest scipy package was released?
I'm going to do some more local testing here and try to confirm if a rebuild
under mock works. The problem with doing a local rpmbuild --rebuild is that you
aren't using the same environment as the buildsystem. This could be a subtle
buildsystem environment issue.
Okay a simple local rebuild under mock does not fix the problem for me.
Can you capture the output from your local rpmbuild session and attach it to
this bug report. I need to understand what is different in your local
environment from that of the mock based build environment.
Okay, confirmed, on an fc6 box running rpmbuild --rebuild gives me a working
package. But running a local mock build of the package does not fix the problem.
So this must be a subtle issue with the buildsystem environment compared to a
local default user environment. Hopefully I can figure this out, though any
help would be appreciated.
Okay i think i figured out what was going wrong. Scipy relies heavily on the
distutils module in numpy to build optimal fortran compiler flags dynamically.
Optimal to numpy means, cpu specific. So what was happening was the binaries
were being built with optional instruction sets available on the buildserver's
cpus, but not available on all cpus.
I'm going to be doing some local test builds on my machines over the weekend to
make sure I've nailed the problem and that I'm setting a reasonable set of
compiler options. I'll write back with location for test packages for you to try
out today or tomorrow.
I think I fixed it.
Can you please test the binary i built locally:
If this binary works for you, I'll go ahead and submit it to the buildsystem as
Okay scipy-0.5.2-1.1.fc6 has been built and is awaiting signing for release to
fc6-extras. Please test this package when it becomes available for download and
re-open if the problem persists.
thank you very much for what you have done. I downloaded and installed the rpm
package you built and it does not contain the error anymore. Great!