-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fail to build release 5.2rc03 on ArchLinux #154
Comments
How is the build invoked? |
export CC=clang
export CXX=clang++
python setup.py build I use clang instead of gcc, because I used to build python-itk 5.1.2 with clang. |
Does the same issue occur with the |
yes, check the latest build log for v5.2.0 here. |
I got this error when building with clang 11.1.0:
check the complete build log here I could build itk with gcc 10.2.0. I create pkg for ArchLinux with: python setup.py build
python setup.py install --root="${pkgdir}" --optimize=1 --skip-build But I fail to read example image with
and
Did I use the wrong method to build and create pkg for python-itk? |
@hubutui please test this patch:
The default build does not enable support for all pixel types. To add support for more pixels type, enable CMake configurations such as: ITKPythonPackage/scripts/internal/manylinux-build-wheels.sh Lines 126 to 128 in e019220
|
OK, I could now build python-itk with pull 156 and pull 2498 patches applied. cd ${srcdir}/ITK-5.2.0
patch -p1 -i https://github.com/InsightSoftwareConsortium/ITK/pull/2498
cd ${srcdir}/ITKPythonPackage-5.2.0
patch -p1 -i https://github.com/InsightSoftwareConsortium/ITKPythonPackage/pull/156
python setup.py build -- \
-DITK_WRAP_unsigned_short:BOOL=ON \
-DITK_WRAP_double:BOOL=ON \
-DITK_WRAP_IMAGE_DIMS:STRING="2;3;4" \
-DITK_SOURCE_DIR="${srcdir}/ITK-5.2.0" However, I still fail to read the example image with Are these wheels from PyPI build with:
? |
This indicated the
The error message says 2D signed short images are wrapped. However, I do not see 3D listed.
As with #156, we may need to remove the quotes. |
@thewtex I'm confused, if I run python setup.py build -- \
-DITK_WRAP_unsigned_short:BOOL=ON \
-DITK_WRAP_double:BOOL=ON \
-DITK_WRAP_IMAGE_DIMS:STRING=2;3;4 \
-DITK_SOURCE_DIR="${srcdir}/ITK-5.2.0" doesn't it means: python setup.py build -- \
-DITK_WRAP_unsigned_short:BOOL=ON \
-DITK_WRAP_double:BOOL=ON \
-DITK_WRAP_IMAGE_DIMS:STRING=2
3
4 -DITK_SOURCE_DIR="${srcdir}/ITK-5.2.0" ? |
@hubutui yes, how about |
I could build python-itk with: cd ${srcdir}/ITK-5.2.0
patch -p1 -i https://github.com/InsightSoftwareConsortium/ITK/pull/2498
cd ${srcdir}/ITKPythonPackage-5.2.0
patch -p1 -i https://github.com/InsightSoftwareConsortium/ITKPythonPackage/pull/156
python setup.py build -- \
-DITK_WRAP_unsigned_short:BOOL=ON \
-DITK_WRAP_double:BOOL=ON \
-DITK_WRAP_IMAGE_DIMS:STRING="2;3;4" \
-DITK_SOURCE_DIR="${srcdir}/ITK-5.2.0" However, it seems that |
I check
|
I check the build log, and log messages mentioned
|
update: python setup.py install --root="${pkgdir}" --optimize=1 --skip-build Nothing is installed except an
check the complete build log here |
@hubutui thanks for the update. Does |
_itkver=5.2.0
python setup.py bdist_wheel -- \
-DITK_WRAP_unsigned_short:BOOL=ON \
-DITK_WRAP_double:BOOL=ON \
-DITK_WRAP_IMAGE_DIMS:STRING="2;3;4" \
-DITK_SOURCE_DIR="${srcdir}/ITK-${_itkver}"
PIP_CONFIG_FILE=/dev/null pip install --isolated --root="${pkgdir}" --ignore-installed --no-deps dist/*.whl No, it didn't work. Check the complete build log here. |
A quick looks, and I am having a hard time finding the error. Any pointers? It seems to end with
and the fils that were built in the package, which look to be in their correct location:
|
I check the build wheel file, it's less than 1MB. According to ITKPythonPackage/scripts/internal/manylinux-build-wheels.sh Lines 51 to 79 in f7fb031
I rebuid with these commands: # build step
python setup.py bdist_wheel -- \
-DITK_WRAP_unsigned_short:BOOL=ON \
-DITK_WRAP_double:BOOL=ON \
-DITK_WRAP_IMAGE_DIMS:STRING="2;3;4" \
-DITKPythonPackage_ITK_BINARY_REUSE=OFF \
-DITKPythonPackage_WHEEL_NAME="itk" \
-DITK_SOURCE_DIR="${srcdir}/ITK-${_itkver}"
# package (or install) step
PIP_CONFIG_FILE=/dev/null pip install --isolated --root="${pkgdir}" --ignore-installed --no-deps dist/*.whl
python -O -m compileall "${pkgdir}/usr/lib" I could now build the wheel file, but the file
I manually move
and
see also the complete build log here. |
I also try to build the python binding with only ITK source, not using this repo. cmake_opts=(
-DBUILD_SHARED_LIBS=ON
-DBUILD_TESTING=OFF
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_C_COMPILER=gcc
-DCMAKE_CXX_COMPILER=g++
-DCMAKE_INSTALL_PREFIX=/usr
-DCMAKE_SKIP_INSTALL_RPATH=ON
-DITK_BUILD_DEFAULT_MODULES=ON
-DITK_USE_MKL=ON
-DITK_USE_SYSTEM_CASTXML=ON
-DITK_USE_SYSTEM_DOUBLECONVERSION=OFF
-DITK_USE_SYSTEM_EIGEN=ON
-DITK_USE_SYSTEM_EXPAT=ON
-DITK_USE_SYSTEM_FFTW=ON
-DITK_USE_SYSTEM_GDCM=ON
-DITK_USE_SYSTEM_GOOGLETEST=ON
-DITK_USE_SYSTEM_HDF5=ON
-DITK_USE_SYSTEM_JPEG=ON
-DITK_USE_SYSTEM_PNG=ON
-DITK_USE_SYSTEM_SWIG=ON
-DITK_USE_SYSTEM_TIFF=ON
-DITK_USE_SYSTEM_ZLIB=ON
-DITK_WRAP_unsigned_short=ON
-DITK_WRAP_double=ON
-DITK_WRAP_IMAGE_DIMS="2;3;4"
-DITK_WRAP_PYTHON=ON
)
git clone https://github.com/InsightSoftwareConsortium/ITK.git
_pkgname=ITK
cmake -B "build" -S "${srcdir}/${_pkgname}" \
${cmake_opts[@]} \
-DITK_USE_GPU=ON
make -C "${srcdir}/build"
make -C "${srcdir}/build" DESTDIR="${pkgdir}" install everything works great. I could build and install both ITK and its python binding. |
Error log:
See the complete build log here
The text was updated successfully, but these errors were encountered: