Opened 11 years ago

Last modified 10 years ago

#37022 new defect

py32-mahotas: ValueError in build_ext: underlying buffer has been detached

Reported by: cdeil (Christoph Deil) Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: petrrr
Port: py-mahotas

Description

I am getting this error when trying to install py32-mahotas on OS X 10.8.

Full log attached

:info:build running build_ext
:info:build customize UnixCCompiler
:info:build customize UnixCCompiler using build_ext
:info:build customize UnixCCompiler
:info:build #### ['/usr/bin/clang', '-DNDEBUG', '-g', '-fwrapv', '-O3', '-Wall', '-Wstrict-prototypes', '-arch', 'x86_64'] #######
:info:build Missing compiler_cxx fix for UnixCCompiler
:info:build customize UnixCCompiler using build_ext
:info:build building 'mahotas._histogram' extension
:info:build compiling C++ sources
:info:build C compiler: /usr/bin/clang++ -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64
:info:build 
:info:build creating build/temp.macosx-10.8-x86_64-3.2
:info:build creating build/temp.macosx-10.8-x86_64-3.2/mahotas
:info:build compile options: '-I/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c'
:info:build clang++: mahotas/_histogram.cpp
:info:build Traceback (most recent call last):
:info:build   File "setup.py", line 106, in <module>
:info:build     test_suite = 'nose.collector',
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/distutils/core.py", line 186, in setup
:info:build     return old_setup(**new_attr)
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/core.py", line 148, in setup
:info:build     dist.run_commands()
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 929, in run_commands
:info:build     self.run_command(cmd)
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 948, in run_command
:info:build     cmd_obj.run()
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/distutils/command/build.py", line 37, in run
:info:build     old_build.run(self)
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/command/build.py", line 126, in run
:info:build     self.run_command(cmd_name)
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/cmd.py", line 313, in run_command
:info:build     self.distribution.run_command(command)
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 948, in run_command
:info:build     cmd_obj.run()
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/distutils/command/build_ext.py", line 232, in run
:info:build     self.build_extensions()
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/command/build_ext.py", line 453, in build_extensions
:info:build     self.build_extension(ext)
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/distutils/command/build_ext.py", line 345, in build_extension
:info:build     **kws)
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/distutils/ccompiler.py", line 26, in <lambda>
:info:build     m = lambda self, *args, **kw: func(self, *args, **kw)
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/distutils/ccompiler.py", line 203, in CCompiler_compile
:info:build     self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/distutils/ccompiler.py", line 26, in <lambda>
:info:build     m = lambda self, *args, **kw: func(self, *args, **kw)
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/distutils/unixccompiler.py", line 35, in UnixCCompiler__compile
:info:build     extra_postargs, display = display)
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/distutils/ccompiler.py", line 26, in <lambda>
:info:build     m = lambda self, *args, **kw: func(self, *args, **kw)
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/distutils/ccompiler.py", line 57, in CCompiler_spawn
:info:build     s,o = exec_command(cmd)
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/distutils/exec_command.py", line 197, in exec_command
:info:build     if _with_python and (0 or sys.__stdout__.fileno()==-1):
:info:build ValueError: underlying buffer has been detached
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-mahotas/py32-mahotas/work/mahotas-0.9.4" && /opt/local/Library/Frameworks/Python.framework/Versions/3.2/bin/python3.2 setup.py --no-user-cfg build 
:info:build Exit code: 1
:error:build org.macports.build for port py32-mahotas returned: command execution failed
:debug:build Error code: CHILDSTATUS 74212 1
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
:info:build Warning: targets not executed for py32-mahotas: org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Please see the log file for port py32-mahotas for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-mahotas/py32-mahotas/main.log

Attachments (1)

main.log (43.6 KB) - added by cdeil (Christoph Deil) 11 years ago.

Download all attachments as: .zip

Change History (9)

Changed 11 years ago by cdeil (Christoph Deil)

Attachment: main.log added

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: stromnov@… removed
Owner: changed from macports-tickets@… to stromnov@…

comment:2 Changed 11 years ago by cdeil (Christoph Deil)

I do see the same error when trying to install py32-scikits-image, so maybe the problem is actually with py32-numpy?

https://github.com/luispedro/mahotas/issues/25

comment:3 Changed 11 years ago by cdeil (Christoph Deil)

Can anyone confirm this issue with py32-mahotas and py32-scikits-image so that we know it's not just a problem with my installation?

Also can someone please add py32-scikits-image and maybe py32-numpy to the ports field of this ticket?

Note that this issue could very well be Macports specific, since Google doesn't find anything useful on this issue.

comment:4 Changed 11 years ago by stromnov (Andrey Stromnov)

It's a problem with setuptools dist.py (in handle_display_option).

For some reason, this fails on OSX with py3.2:

    import sys
    sys.stdout.detach()

comment:5 Changed 11 years ago by cdeil (Christoph Deil)

For reference: discussion on this issue is taking place at https://github.com/statsmodels/statsmodels/issues/204#issuecomment-10535204

comment:6 Changed 10 years ago by petrrr

Cc: petr@… added

Cc Me!

comment:7 Changed 10 years ago by petrrr

Note that port py32-mahotas will not build anymore because py32-cython has been made obsolete during the python{31,32} deprecation process.

comment:8 Changed 10 years ago by petrrr

Port: py-mahotas added; py32-mahotas removed
Note: See TracTickets for help on using tickets.