Skip to content
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

Fix version number in egg-info file for Windows + Build pyi files #271

Merged
merged 11 commits into from
Jan 8, 2023

Conversation

mwtoews
Copy link
Member

@mwtoews mwtoews commented Dec 18, 2022

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

Closes #234
Closes #268

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@mwtoews
Copy link
Member Author

mwtoews commented Dec 18, 2022

@conda-forge-admin, please rerender

conda-forge-webservices[bot] and others added 2 commits December 18, 2022 23:55
@mwtoews
Copy link
Member Author

mwtoews commented Dec 19, 2022

Also set DVTK_BUILD_PYI_FILES:BOOL=ON to fix #268

@mwtoews
Copy link
Member Author

mwtoews commented Dec 19, 2022

There is an error with the Windows builds:

-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - found
-- Found Threads: TRUE  
CMake Error at Common/Core/CMakeLists.txt:362 (message):
  Failed to determine the thread implementation in use by the compiler.

A possibly related issue was raised upstream a year ago: https://gitlab.kitware.com/vtk/vtk/-/issues/18281

@Tobias-Fischer
Copy link
Contributor

Can we simply patch the relevant cmake part in vtk and set
set(CMAKE_USE_PTHREADS_INIT 0)
set(CMAKE_USE_WIN32_THREADS_INIT 1)
as described in the issue?

@Tobias-Fischer
Copy link
Contributor

@conda-forge-admin please restart ci

@Tobias-Fischer
Copy link
Contributor

The problem seems to be that the pthreads-win32 is being installed in these builds, whereas it was not installed in previous builds. Now I assume there are multiple thread implementations and cmake is getting confused.

@Tobias-Fischer Tobias-Fischer changed the title Fix version number in egg-info file for Windows Fix version number in egg-info file for Windows + Build pyi files Jan 3, 2023
@Tobias-Fischer
Copy link
Contributor

Hmm I'm not sure what's going on when cross-compiling:

2023-01-03T04:35:37.4141709Z [2928/9487] : && $BUILD_PREFIX/bin/aarch64-conda-linux-gnu-c++ -fPIC -fvisibility-inlines-hidden -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/vtk-9.2.2 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix  -O3 -DNDEBUG  -Wl,-lc  -Wl,-lc -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--allow-shlib-undefined -Wl,-rpath,$PREFIX/lib -Wl,-rpath-link,$PREFIX/lib -L$PREFIX/lib -shared  -o lib/python3.9/site-packages/vtkmodules/vtkCommonCore.so CMakeFiles/vtkCommonCorePython.dir/CMakeFiles/vtkCommonCorePython/vtkABIPython.cxx.o CMakeFiles/vtkCommonCorePython.dir/CMakeFiles/vtkCommonCorePython/vtkArrayIteratorIncludesPython.cxx.o 
...
023-01-03T05:13:00.7198723Z cd $SRC_DIR/build/lib/python3.9/site-packages && $PREFIX/bin/python -m vtkmodules.generate_pyi -p vtkmodules -o $SRC_DIR/build/lib/python3.9/site-packages/vtkmodules vtkCommonCore vtkWebCore vtkCommonMath vtkCommonTransforms vtkCommonDataModel vtkCommonExecutionModel vtkIOCore vtkImagingCore vtkIOImage vtkIOXMLParser vtkIOXML vtkCommonMisc vtkFiltersCore vtkRenderingCore vtkRenderingContext2D vtkRenderingFreeType vtkRenderingSceneGraph vtkRenderingVtkJS vtkIOExport vtkWebGLExporter vtkInteractionStyle vtkFiltersGeneral vtkFiltersSources vtkInteractionWidgets vtkViewsCore vtkViewsInfovis vtkCommonColor vtkViewsContext2D vtkTestingRendering vtkRenderingLabel vtkRenderingQt vtkPythonContext2D vtkImagingMath vtkRenderingHyperTreeGrid vtkRenderingUI vtkRenderingOpenGL2 vtkRenderingVolume vtkRenderingVolumeOpenGL2 vtkRenderingMatplotlib vtkRenderingLOD vtkRenderingLICOpenGL2 vtkRenderingImage vtkRenderingContextOpenGL2 vtkIOLegacy vtkIOXdmf2 vtkIOVeraOut vtkIOTecplotTable vtkIOSegY vtkIOXdmf3 vtkIOParallelXML vtkIOPLY vtkIOMovie vtkIOOggTheora vtkIONetCDF vtkIOMotionFX vtkIOGeometry vtkIOParallel vtkIOMINC vtkIOLSDyna vtkIOInfovis vtkIOImport vtkParallelCore vtkIOIOSS vtkIOVideo vtkIOFFMPEG vtkIOExportPDF vtkRenderingGL2PSOpenGL2 vtkIOExportGL2PS vtkIOExodus vtkIOEnSight vtkIOCityGML vtkIOChemistry vtkIOCesium3DTiles vtkIOCONVERGECFD vtkIOHDF vtkIOCGNSReader vtkIOAsynchronous vtkIOAMR vtkInteractionImage vtkImagingStencil vtkImagingStatistics vtkImagingGeneral vtkImagingMorphological vtkImagingFourier vtkIOSQL vtkImagingSources vtkInfovisCore vtkGeovisCore vtkInfovisLayout vtkRenderingAnnotation vtkImagingHybrid vtkImagingColor vtkFiltersTopology vtkFiltersSelection vtkFiltersSMP vtkFiltersPython vtkFiltersProgrammable vtkFiltersModeling vtkFiltersPoints vtkFiltersVerdict vtkFiltersStatistics vtkFiltersImaging vtkFiltersExtraction vtkFiltersGeometry vtkFiltersHybrid vtkFiltersTexture vtkFiltersParallel vtkFiltersParallelImaging vtkCommonSystem vtkFiltersParallelDIY2 vtkFiltersGeneric vtkCommonComputationalGeometry vtkFiltersFlowPaths vtkFiltersAMR vtkDomainsChemistry vtkDomainsChemistryOpenGL2 vtkFiltersHyperTree vtkCommonPython vtkChartsCore
2023-01-03T05:13:00.7203661Z Traceback (most recent call last):
2023-01-03T05:13:00.7204199Z   File "$BUILD_PREFIX/lib/python3.9/runpy.py", line 197, in _run_module_as_main
2023-01-03T05:13:00.7204985Z     return _run_code(code, main_globals, None,
2023-01-03T05:13:00.7205399Z   File "$BUILD_PREFIX/lib/python3.9/runpy.py", line 87, in _run_code
2023-01-03T05:13:00.7205777Z     exec(code, run_globals)
2023-01-03T05:13:00.7206327Z   File "$SRC_DIR/build/lib/python3.9/site-packages/vtkmodules/generate_pyi.py", line 37, in <module>
2023-01-03T05:13:00.7206840Z     from vtkmodules.vtkCommonCore import vtkObject, vtkSOADataArrayTemplate
2023-01-03T05:13:00.7207519Z ImportError: $SRC_DIR/build/lib/python3.9/site-packages/vtkmodules/vtkCommonCore.so: cannot open shared object file: No such file or directory

@Tobias-Fischer
Copy link
Contributor

Hi @mwtoews @conda-forge/vtk - would you be happy with this PR in the current state? Importantly, besides fixing #234 and partly addressing #268 (only for native builds), it fixes the Windows builds that are currently blocking PRs #272 and #273

@mwtoews
Copy link
Member Author

mwtoews commented Jan 4, 2023

Thanks for fixing the more difficult aspects @Tobias-Fischer I haven't checked the build logs, but the CI pass looks good to me.

@Tobias-Fischer Tobias-Fischer merged commit b77cf71 into conda-forge:main Jan 8, 2023
@mwtoews mwtoews deleted the fix-version-on-windows branch January 8, 2023 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants