shunwang / numexpr

Automatically exported from code.google.com/p/numexpr
MIT License
0 stars 0 forks source link

numexpr-2.1 does not build with Python 3.2 (builds fine with Python 2.7) #100

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I am trying to compile numexpr-2.1 on my Gentoo system, but have been unable to 
build numexpr against Python 3.2. I confirmed that this problem occurs whether 
I build numexpr within Gentoo's Portage package manager, or whether I download 
the source and run "python3.2 setup.py build" manually. In either event, the 
build looks something like this:

Appending numexpr.tests configuration to numexpr
Ignoring attempt to set 'name' (from 'numexpr' to 'numexpr.tests')
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler 
options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler 
options
running build_src
build_src
building py_modules sources
creating build
creating build/src.linux-x86_64-3.2
creating build/src.linux-x86_64-3.2/numexpr
building extension "numexpr.interpreter" sources
build_src: building npy-pkg config files
running build_py
creating build/lib.linux-x86_64-3.2
creating build/lib.linux-x86_64-3.2/numexpr
copying numexpr/version.py -> build/lib.linux-x86_64-3.2/numexpr
copying numexpr/necompiler.py -> build/lib.linux-x86_64-3.2/numexpr
copying numexpr/utils.py -> build/lib.linux-x86_64-3.2/numexpr
copying numexpr/__init__.py -> build/lib.linux-x86_64-3.2/numexpr
copying numexpr/expressions.py -> build/lib.linux-x86_64-3.2/numexpr
copying numexpr/cpuinfo.py -> build/lib.linux-x86_64-3.2/numexpr
copying build/src.linux-x86_64-3.2/numexpr/__config__.py -> 
build/lib.linux-x86_64-3.2/numexpr
creating build/lib.linux-x86_64-3.2/numexpr/tests
copying ./numexpr/tests/__init__.py -> build/lib.linux-x86_64-3.2/numexpr/tests
copying ./numexpr/tests/test_numexpr.py -> 
build/lib.linux-x86_64-3.2/numexpr/tests
Skipping implicit fixer: buffer
Skipping implicit fixer: idioms
Skipping implicit fixer: set_literal
Skipping implicit fixer: ws_comma
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'numexpr.interpreter' extension
compiling C++ sources
C compiler: x86_64-pc-linux-gnu-g++ -pthread -fPIC

creating build/temp.linux-x86_64-3.2
creating build/temp.linux-x86_64-3.2/numexpr
compile options: '-I/usr/lib64/python3.2/site-packages/numpy/core/include 
-I/usr/include/python3.2 -c'
extra options: '-funroll-all-loops'
x86_64-pc-linux-gnu-g++: numexpr/numexpr_object.cpp
Warning: Assuming default configuration (numexpr/tests/{setup_tests,setup}.py 
was not found)Traceback (most recent call last):
  File "setup.py", line 209, in <module>
    setup_package()
  File "setup.py", line 194, in setup_package
    **extra_setup_opts
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/core.py", line 186, in setup
    return old_setup(**new_attr)
  File "/usr/lib64/python3.2/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib64/python3.2/distutils/dist.py", line 917, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python3.2/distutils/dist.py", line 936, in run_command
    cmd_obj.run()
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/command/build.py", line 37, in run
    old_build.run(self)
  File "/usr/lib64/python3.2/distutils/command/build.py", line 126, in run
    self.run_command(cmd_name)
  File "/usr/lib64/python3.2/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib64/python3.2/distutils/dist.py", line 936, in run_command
    cmd_obj.run()
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/command/build_ext.py", line 232, in run
    self.build_extensions()
  File "/usr/lib64/python3.2/distutils/command/build_ext.py", line 453, in build_extensions
    self.build_extension(ext)
  File "setup.py", line 206, in build_extension
    numpy_build_ext.build_extension(self, ext)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/command/build_ext.py", line 345, in build_extension
    **kws)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/ccompiler.py", line 26, in <lambda>
    m = lambda self, *args, **kw: func(self, *args, **kw)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/ccompiler.py", line 203, in CCompiler_compile
    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/ccompiler.py", line 26, in <lambda>
    m = lambda self, *args, **kw: func(self, *args, **kw)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/unixccompiler.py", line 35, in UnixCCompiler__compile
    extra_postargs, display = display)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/ccompiler.py", line 26, in <lambda>
    m = lambda self, *args, **kw: func(self, *args, **kw)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/ccompiler.py", line 57, in CCompiler_spawn
    s,o = exec_command(cmd)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/exec_command.py", line 197, in exec_command
    if _with_python and (0 or sys.__stdout__.fileno()==-1):
ValueError: underlying buffer has been detached

The problem seems to arise at the following line:

Warning: Assuming default configuration (numexpr/tests/{setup_tests,setup}.py 
was not found)Traceback (most recent call last):

I note that neither of the requested files exists, although there is a file 
named numexpr/tests/test_numexpr.py. Also, the package compiles without 
complaint using python2.7. Is it possible that Python 3.2 requires a different 
format of test file, one which is not found in this package? Would renaming the 
existing test file be a sufficient solution, or is further work necessary?

Original issue reported on code.google.com by rdwald on 9 May 2013 at 3:39

GoogleCodeExporter commented 9 years ago
I should probably also include the build log from the successful build using 
Python 2.7:

Warning: Assuming default configuration (numexpr/tests/{setup_tests,setup}.py 
was not found)Appending numexpr.tests configuration to numexpr
Ignoring attempt to set 'name' (from 'numexpr' to 'numexpr.tests')
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler 
options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler 
options
running build_src
build_src
building py_modules sources
creating build
creating build/src.linux-x86_64-2.7
creating build/src.linux-x86_64-2.7/numexpr
building extension "numexpr.interpreter" sources
build_src: building npy-pkg config files
running build_py
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/numexpr
copying numexpr/version.py -> build/lib.linux-x86_64-2.7/numexpr
copying numexpr/necompiler.py -> build/lib.linux-x86_64-2.7/numexpr
copying numexpr/utils.py -> build/lib.linux-x86_64-2.7/numexpr
copying numexpr/__init__.py -> build/lib.linux-x86_64-2.7/numexpr
copying numexpr/expressions.py -> build/lib.linux-x86_64-2.7/numexpr
copying numexpr/cpuinfo.py -> build/lib.linux-x86_64-2.7/numexpr
copying build/src.linux-x86_64-2.7/numexpr/__config__.py -> 
build/lib.linux-x86_64-2.7/numexpr
creating build/lib.linux-x86_64-2.7/numexpr/tests
copying ./numexpr/tests/__init__.py -> build/lib.linux-x86_64-2.7/numexpr/tests
copying ./numexpr/tests/test_numexpr.py -> 
build/lib.linux-x86_64-2.7/numexpr/tests
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'numexpr.interpreter' extension
compiling C++ sources
C compiler: x86_64-pc-linux-gnu-g++ -pthread -fPIC

creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/numexpr
compile options: '-I/usr/lib64/python2.7/site-packages/numpy/core/include 
-I/usr/include/python2.7 -c'
extra options: '-funroll-all-loops'
x86_64-pc-linux-gnu-g++: numexpr/numexpr_object.cpp
numexpr/numexpr_object.cpp: In function ‘int NumExpr_init(NumExprObject*, 
PyObject*, PyObject*)’:
numexpr/numexpr_object.cpp:99:49: warning: deprecated conversion from string 
constant to ‘char*’ [-Wwrite-strings]
numexpr/numexpr_object.cpp:99:49: warning: deprecated conversion from string 
constant to ‘char*’ [-Wwrite-strings]
numexpr/numexpr_object.cpp:99:49: warning: deprecated conversion from string 
constant to ‘char*’ [-Wwrite-strings]
numexpr/numexpr_object.cpp:99:49: warning: deprecated conversion from string 
constant to ‘char*’ [-Wwrite-strings]
numexpr/numexpr_object.cpp:99:49: warning: deprecated conversion from string 
constant to ‘char*’ [-Wwrite-strings]
numexpr/numexpr_object.cpp: At global scope:
numexpr/numexpr_object.cpp:370:1: warning: deprecated conversion from string 
constant to ‘char*’ [-Wwrite-strings]
numexpr/numexpr_object.cpp:370:1: warning: deprecated conversion from string 
constant to ‘char*’ [-Wwrite-strings]
numexpr/numexpr_object.cpp:370:1: warning: deprecated conversion from string 
constant to ‘char*’ [-Wwrite-strings]
numexpr/numexpr_object.cpp:370:1: warning: deprecated conversion from string 
constant to ‘char*’ [-Wwrite-strings]
numexpr/numexpr_object.cpp:370:1: warning: deprecated conversion from string 
constant to ‘char*’ [-Wwrite-strings]
numexpr/numexpr_object.cpp:370:1: warning: deprecated conversion from string 
constant to ‘char*’ [-Wwrite-strings]
numexpr/numexpr_object.cpp:370:1: warning: deprecated conversion from string 
constant to ‘char*’ [-Wwrite-strings]
x86_64-pc-linux-gnu-g++: numexpr/module.cpp
x86_64-pc-linux-gnu-g++: numexpr/interpreter.cpp
numexpr/interpreter.cpp: In function ‘int run_interpreter(NumExprObject*, 
NpyIter*, NpyIter*, bool, bool, int*)’:
numexpr/interpreter.cpp:789:22: warning: deprecated conversion from string 
constant to ‘char*’ [-Wwrite-strings]
x86_64-pc-linux-gnu-g++ -pthread -shared 
build/temp.linux-x86_64-2.7/numexpr/interpreter.o 
build/temp.linux-x86_64-2.7/numexpr/module.o 
build/temp.linux-x86_64-2.7/numexpr/numexpr_object.o -L/usr/lib64 -lm 
-lpython2.7 -o build/lib.linux-x86_64-2.7/numexpr/interpreter.so
running scons

It appears the very first line of this version references the same two missing 
files as the Python 3.2 version, so that's not the key difference...perhaps 
someone with closer knowledge of this package can help.

Original comment by rdwald on 9 May 2013 at 3:42

GoogleCodeExporter commented 9 years ago
Antonio, could you take a look at this?

Original comment by gdemen...@gmail.com on 22 May 2013 at 10:33

GoogleCodeExporter commented 9 years ago
Any progress on this bug? It's been over a month...I could provide additional 
info about my system (which still experiences this bug) if that would help.

Original comment by rdwald on 28 Jun 2013 at 4:32

GoogleCodeExporter commented 9 years ago
ditto rdwald

Original comment by del...@iinet.com.au on 15 Jul 2013 at 4:21