[Pythonmac-SIG] Problems building SciPy-0.3

Tom Loredo loredo at astro.cornell.edu
Tue Aug 10 18:53:33 CEST 2004


Hi folks-

I'm trying to build SciPy-0.3 on a G4 (and on a G3 laptop) running 10.2.8
and MacPy 2.3.3, but with no luck---the build halts with a segfault.  I've
followed Chris's instructions on the scipy web site, with the exception of
not installing Gnuplot & AquaTerm. The one possible complication is that I
have some fink stuff installed (not python, though), including f77, but
I've renamed it f77-fink, and verified that there is no f77 in my path
(the g77 install doesn't install one, so I was worried scipy or f2py might
find Fink's f77 rather than using g77).

On every first install attempt, I get an error compiling _configtest.c,
from code in the included file fputest.c.  If I merely restart the build
after the error, the build proceeds through this part successfully, but
perhaps this is an important symptom.  Here's the output from the first
build attempt:

	compiling '_configtest.c':
	#define FPU_DIGITAL
	#define CONFIG_SCRIPT
	#include "fputest.c"
	gcc options: '-fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes'
	compile options: '-I/Users/loredo/Python/SciPy_complete-0.3/build/temp.darwin-6.8-Power_Macintosh-2.3/config_pygist -I/Users/loredo/Python/SciPy_complete-0.3/Lib/xplt/src/play -c'
	gcc: _configtest.c
	In file included from fputest.c:10,
					 from _configtest.c:3:
	fpuset.c:27:27: machine/fpu.h: No such file or directory
	In file included from fputest.c:10,
					 from _configtest.c:3:
	fpuset.c: In function `u_fpu_setup':
	fpuset.c:45: warning: implicit declaration of function `ieee_set_fp_control'
	fpuset.c:45: `IEEE_TRAP_ENABLE_INV' undeclared (first use in this function)
	fpuset.c:45: (Each undeclared identifier is reported only once
	fpuset.c:45: for each function it appears in.)
	fpuset.c:45: `IEEE_TRAP_ENABLE_DZE' undeclared (first use in this function)
	fpuset.c:46: `IEEE_TRAP_ENABLE_OVF' undeclared (first use in this function)
	
	[snip many lines]
	
	removing: _configtest.c _configtest.o
	compiling '_configtest.c':
	#define FPU_SUN4
	#define CONFIG_SCRIPT
	#include "fputest.c"
	gcc options: '-fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes'
	compile options: '-I/Users/loredo/Python/SciPy_complete-0.3/build/temp.darwin-6.8-Power_Macintosh-2.3/config_pygist -I/Users/loredo/Python/SciPy_complete-0.3/Lib/xplt/src/play -c'
	gcc: _configtest.c
	In file included from fputest.c:10,
					 from _configtest.c:3:
	fpuset.c: In function `u_fpu_setup':
	fpuset.c:133: warning: implicit declaration of function `nonstandard_arithmetic'
	fpuset.c:134: warning: implicit declaration of function `ieee_handler'
	Traceback (most recent call last):
	  File "setup.py", line 110, in ?
		setup_package(ignore_packages)
	  File "setup.py", line 83, in setup_package
		ignore_packages = ignore_packages)
	  File "scipy_core/scipy_distutils/misc_util.py", line 459, in get_subpackages
		config = setup_module.configuration(*args)
	  File "/Users/loredo/Python/SciPy_complete-0.3/Lib/xplt/setup_xplt.py", line 210, in configuration
		conf.run()
	  File "/Users/loredo/Python/SciPy_complete-0.3/Lib/xplt/config_pygist.py", line 64, in run
		self.config_unix()
	  File "/Users/loredo/Python/SciPy_complete-0.3/Lib/xplt/config_pygist.py", line 193, in config_unix
		self.find_sigfpe(configfile)
	  File "/Users/loredo/Python/SciPy_complete-0.3/Lib/xplt/config_pygist.py", line 311, in find_sigfpe
		include_dirs=self.unix_include_dirs):
	  File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/distutils/command/config.py", line 260, in try_link
		libraries, library_dirs, lang)
	  File "/Users/loredo/Python/SciPy_complete-0.3/Lib/xplt/config_pygist.py", line 28, in _link
		library_dirs=library_dirs)
	  File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/distutils/ccompiler.py", line 860, in link_executable
		debug, extra_preargs, extra_postargs, None, target_lang)
	  File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/distutils/unixccompiler.py", line 153, in link
		libraries)
	  File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/distutils/ccompiler.py", line 1249, in gen_lib_options
		(lib_dir, lib_name) = os.path.split (lib)
	  File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/posixpath.py", line 77, in split
		i = p.rfind('/') + 1
	AttributeError: 'NoneType' object has no attribute 'rfind'


As I said, merely running "python setup.py build" again continues the build without 
complaint, starting:

	fftw_info:
	  FOUND:
		libraries = ['rfftw', 'fftw']
		library_dirs = ['/usr/local/lib']
		define_macros = [('SCIPY_FFTW_H', None)]
		include_dirs = ['/usr/local/include']

etc..  But it eventually halts with a segfault working on cblas:

	f2py: build/src/cblas.pyf
	Reading fortran codes...
			Reading file 'build/src/cblas.pyf'
	Post-processing...
			Block: cblas
							Block: empty_module
	Building modules...
			Building module "cblas"...
					Constructing wrapper function "empty_module"...
					  empty_module()
			Wrote C/API module "cblas" to file "build/src/build/src/cblasmodule.c"
	  adding 'build/src/fortranobject.c' to sources.
	  adding 'build/src' to include_dirs.
	building extension "scipy.linalg.flapack" sources
	generating flapack interface
	Segmentation fault
	
Any help anyone can offer on how to diagnose this would be appreciated.

Thanks,
Tom


More information about the Pythonmac-SIG mailing list