View Issue Details

IDProjectCategoryView StatusLast Update
0003055Slicer4Core: Building (CMake, Superbuild)public2014-03-06 05:59
Reporterpieper Assigned Tojcfr  
PrioritynormalSeverityblockReproducibilityhave not tried
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.3.0Fixed in VersionSlicer 4.3.0 
Summary0003055: SimpleITK python bindings won't install
Description

After building a successful slicer on mac (it runs and is usable) I tried enabling SimpleITK in cmake. The libraries appear to build correctly, but there's an issue with tarfile (see below).

Steps To Reproduce

Build slicer
Enable SimpleITK in cmake
Try building (fails)

The error is reported, but does not break the build and slicer build continues and ultimately succeeds, but of course SimpleITK cannot be imported.

Additional Information

[100%] Built target SimpleGaussian
Scanning dependencies of target SimpleITK_PYTHON
[100%] Building CXX object Wrapping/CMakeFiles/SimpleITK_PYTHON.dir/SimpleITKPYTHON_wrap.cxx.o
Linking CXX shared module ../lib/_SimpleITK.so
[100%] Built target SimpleITK_PYTHON
[ 96%] Performing install step for 'SimpleITK'
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz
Extracting in /var/folders/5g/8696sbjd1blch9pwpqwzq8c40000gn/T/tmpkNqKEp
Traceback (most recent call last):
File "/Users/pieper/slicer4/latest/Slicer-superbuild/SimpleITK-build/Wrapping/PythonPackage/setup.py", line 2, in <module>
use_setuptools()
File "/Users/pieper/slicer4/latest/Slicer-superbuild/SimpleITK-build/Wrapping/PythonPackage/distribute_setup.py", line 145, in use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "/Users/pieper/slicer4/latest/Slicer-superbuild/SimpleITK-build/Wrapping/PythonPackage/distribute_setup.py", line 125, in _do_download
_build_egg(egg, tarball, to_dir)
File "/Users/pieper/slicer4/latest/Slicer-superbuild/SimpleITK-build/Wrapping/PythonPackage/distribute_setup.py", line 98, in _build_egg
tar = tarfile.open(tarball)
File "/Users/pieper/slicer4/latest/Slicer-superbuild/python-install/lib/python2.7/tarfile.py", line 1665, in open
raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully
[ 96%] Completed 'SimpleITK'
[ 96%] Built target SimpleITK
[ 97%] Performing configure step for 'Slicer'
...

TagsNo tags attached.

Relationships

related to 0003052 closedjcfr cannot load any sample data - urllib not build correctly 

Activities

jcfr

jcfr

2013-04-05 11:09

administrator   ~0008323

Probable cause: CMake'ified python is not built with ZLib

Possible Solution:
Update External_python.cmake

 * On Win32: 
     1) add zlib as a dependency  [Already built for LibArchive]
     2) Pass the following options:
           -DZLIB_LIBRARIES:FILEPATH=${zlib_DIR}/lib/zlib.lib

 * On Unix:
     1) Pass option:
           -DUSE_SYSTEM_ZLIB:BOOL=ON

Topic to test: https://github.com/jcfr/Slicer/compare/build-python-with-zlib

pieper

pieper

2013-04-05 13:00

administrator   ~0008327

No, sorry to report it still doesn't work.

During the python build it reports the following:

[ 61%] Performing update step for 'python'
-- python update command succeeded. See also /tmp/cm/Slicer-superbuild/python-prefix/src/python-stamp/python-update-*.log

[ 63%] Performing configure step for 'python'
-- SRC_DIR: /tmp/cm/Slicer-superbuild/python-build/../Python-2.7.3
-- The system name is Darwin
-- The system version is 12.3.0
-- Looking for CMake command configure_package_config_file
-- Looking for CMake command configure_package_config_file - found
-- Looking for CMake command write_basic_package_version_file
-- Looking for CMake command write_basic_package_version_file - found
-- ptmx: //dev/ptmx ptc: HAVE_DEV_PTC-NOTFOUND
-- Checking for XOPEN_SOURCE
-- Checking for XOPEN_SOURCE - no
-- Checking for Large File Support
-- Checking for Large File Support - yes
-- Using unsigned short for unicode
--
-- The following extensions will NOT be built:
--
-- crypt (not set: HAVE_LIBCRYPT)
-- nis (not set: HAVE_LIBNSL)
-- spwd (not set: HAVE_GETSPNAM HAVE_GETSPENT)
-- linuxaudiodev (not set: LINUX)
-- ossaudiodev (not set: LINUX)
-- _msi (not set: WIN32)
-- msvcrt (not set: MSVC)
-- nt (not set: WIN32)
-- _subprocess (not set: WIN32)
-- _winreg (not set: WIN32)
-- _bsddb (not set: DB_INCLUDE_PATH DB_LIBRARIES)
-- bz2 (not set: BZIP2_LIBRARIES)
-- _curses_panel (not set: CURSES_LIBRARIES)
-- _curses (not set: CURSES_LIBRARIES)
-- dbm (not set: GDBM_INCLUDE_PATH GDBM_LIBRARY GDBM_COMPAT_LIBRARY)
-- gdbm (not set: GDBM_INCLUDE_PATH GDBM_LIBRARY GDBM_COMPAT_LIBRARY)
-- _hashlib (not set: OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES)
-- readline (not set: READLINE_INCLUDE_PATH READLINE_LIBRARY CURSES_LIBRARIES)
-- _sqlite3 (not set: SQLITE3_INCLUDE_PATH SQLITE3_LIBRARY)
-- _ssl (not set: OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES)
-- zlib (not set: ZLIB_LIBRARIES)
--
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/cm/Slicer-superbuild/python-build
[ 65%] Performing build step for 'python'
[ 0%] Built target extension_array
[ 1%] Built target extension_audioop

jcfr

jcfr

2013-04-05 14:02

administrator   ~0008328

Just updated the topic: https://github.com/jcfr/Slicer/compare/build-python-with-zlib

pieper

pieper

2013-04-05 14:22

administrator   ~0008329

with commit 68c75b0be0982c8b742ffe56e8331fd5ce81ce45

It looks like the same result.

Script started on Fri Apr 5 18:11:51 2013
bash: __git_ps1: command not found
[?1034h
#1 Slicer-superbuild $ make python
-- Building Slicer version [4.2.0]
-- Configuring Slicer with Qt 4.8.3 (using modules: CORE, GUI, NETWORK, UITOOLS, XML, WEBKIT, SVG, SQL, SCRIPT, )
-- SuperBuild - Slicer => Requires cmcurl, teem, VTK, ITKv4, CTK, jqPlot, LibArchive, SimpleITK, qMidasAPI, DCMTK, CTKAPPLAUNCHER, python, NUMPY, incrTcl, MultiVolumeExplorer, MultiVolumeImporter,
-- SuperBuild - cmcurl[OK]
-- SuperBuild - teem => Requires VTK,
-- SuperBuild - VTK => Requires python,
-- SuperBuild - python => Requires CTKAPPLAUNCHER, tcl, tk,
-- SuperBuild - CTKAPPLAUNCHER[OK]
-- SuperBuild - tcl[OK]
-- SuperBuild - tk => Requires tcl[INCLUDED],
-- SuperBuild - tk[OK]
-- SuperBuild - python[OK]
-- TCL_LIBRARY:/tmp/cm/Slicer-superbuild/tcl-build/lib/libtcl8.4.dylib
-- TK_LIBRARY:/tmp/cm/Slicer-superbuild/tcl-build/lib/libtk8.4.dylib
-- slicer_PYTHON_INCLUDE:/tmp/cm/Slicer-superbuild/python-install/include/python2.7
-- slicer_PYTHON_LIBRARY:/tmp/cm/Slicer-superbuild/python-install/lib/libpython2.7.dylib
-- slicer_PYTHON_EXECUTABLE:/tmp/cm/Slicer-superbuild/python-install/bin/customPython
-- SuperBuild - VTK[OK]
-- SuperBuild - teem[OK]
-- SuperBuild - ITKv4 => Requires DCMTK,
-- SuperBuild - DCMTK[OK]
-- SuperBuild - ITKv4[OK]
-- SuperBuild - CTK => Requires VTK[INCLUDED], ITKv4[INCLUDED], python[INCLUDED], DCMTK[INCLUDED],
-- SuperBuild - CTK[OK]
-- SuperBuild - jqPlot[OK]
-- SuperBuild - LibArchive[OK]
-- SuperBuild - SimpleITK => Requires ITKv4[INCLUDED], Swig, python[INCLUDED],
-- SuperBuild - Swig => Requires PCRE,
-- SuperBuild - PCRE[OK]
-- SuperBuild - Swig[OK]
-- SuperBuild - SimpleITK[OK]
-- SuperBuild - qMidasAPI[OK]
-- SuperBuild - NUMPY => Requires python[INCLUDED],
-- SuperBuild - NUMPY[OK]
-- SuperBuild - NUMPY[OK] - Building without Fortran compiler - Non-optimized code will be built !
-- SuperBuild - incrTcl => Requires tcl[INCLUDED], tk[INCLUDED],
-- SuperBuild - incrTcl[OK]
-- SuperBuild - MultiVolumeExplorer[OK]
-- SuperBuild - MultiVolumeImporter[OK]
-- SuperBuild - Slicer[OK]
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/cm/Slicer-superbuild
[ 16%] Built target python-source
[ 36%] Built target tcl
[ 52%] Built target CTKAPPLAUNCHER
[ 76%] Built target tk
[ 80%] Performing update step for 'python'
-- python update command succeeded. See also /tmp/cm/Slicer-superbuild/python-prefix/src/python-stamp/python-update-*.log

[ 84%] Performing configure step for 'python'
-- SRC_DIR: /tmp/cm/Slicer-superbuild/python-build/../Python-2.7.3
-- The system name is Darwin
-- The system version is 12.3.0
-- Looking for CMake command configure_package_config_file
-- Looking for CMake command configure_package_config_file - found
-- Looking for CMake command write_basic_package_version_file
-- Looking for CMake command write_basic_package_version_file - found
-- ptmx: //dev/ptmx ptc: HAVE_DEV_PTC-NOTFOUND
-- Checking for XOPEN_SOURCE
-- Checking for XOPEN_SOURCE - no
-- Checking for Large File Support
-- Checking for Large File Support - yes
-- Using unsigned short for unicode
--
-- The following extensions will NOT be built:
--
-- crypt (not set: HAVE_LIBCRYPT)
-- nis (not set: HAVE_LIBNSL)
-- spwd (not set: HAVE_GETSPNAM HAVE_GETSPENT)
-- linuxaudiodev (not set: LINUX)
-- ossaudiodev (not set: LINUX)
-- _msi (not set: WIN32)
-- msvcrt (not set: MSVC)
-- nt (not set: WIN32)
-- _subprocess (not set: WIN32)
-- _winreg (not set: WIN32)
-- _bsddb (not set: DB_INCLUDE_PATH DB_LIBRARIES)
-- bz2 (not set: BZIP2_LIBRARIES)
-- _curses_panel (not set: CURSES_LIBRARIES)
-- _curses (not set: CURSES_LIBRARIES)
-- dbm (not set: GDBM_INCLUDE_PATH GDBM_LIBRARY GDBM_COMPAT_LIBRARY)
-- gdbm (not set: GDBM_INCLUDE_PATH GDBM_LIBRARY GDBM_COMPAT_LIBRARY)
-- _hashlib (not set: OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES)
-- readline (not set: READLINE_INCLUDE_PATH READLINE_LIBRARY CURSES_LIBRARIES)
-- _sqlite3 (not set: SQLITE3_INCLUDE_PATH SQLITE3_LIBRARY)
-- _ssl (not set: OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES)
-- zlib (not set: ZLIB_LIBRARIES)
--
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/cm/Slicer-superbuild/python-build
[ 88%] Performing build step for 'python'
[ 0%] Built target extension_array
[ 1%] Built target extension_audioop
[ 1%] Built target extension_binascii
[ 2%] Built target extension_bisect

pieper

pieper

2013-04-06 12:53

administrator   ~0008343

Tried again with a fresh build tree and it looks like it worked this time - nice!

jcfr

jcfr

2013-04-08 12:08

administrator   ~0008350

Good news. I tweaked the topic to have a more robust way of setting option. See https://github.com/jcfr/Slicer/compare/build-python-with-zlib

Issue History

Date Modified Username Field Change
2013-04-05 10:20 pieper New Issue
2013-04-05 10:20 pieper Status new => assigned
2013-04-05 10:20 pieper Assigned To => jcfr
2013-04-05 10:21 pieper Relationship added related to 0003052
2013-04-05 10:25 jcfr Projection none => minor fix
2013-04-05 10:25 jcfr ETA none => < 1 day
2013-04-05 11:09 jcfr Note Added: 0008323
2013-04-05 11:09 jcfr Status assigned => feedback
2013-04-05 13:00 pieper Note Added: 0008327
2013-04-05 14:02 jcfr Note Added: 0008328
2013-04-05 14:22 pieper Note Added: 0008329
2013-04-06 12:53 pieper Note Added: 0008343
2013-04-06 12:53 pieper Status feedback => closed
2013-04-06 12:53 pieper Resolution open => fixed
2013-04-08 12:08 jcfr Note Added: 0008350
2014-03-06 05:59 jcfr Fixed in Version => Slicer 4.3.0