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

Wheels: 0.15.0.post2 #1406

Merged
merged 4 commits into from
Mar 31, 2023
Merged

Wheels: 0.15.0.post2 #1406

merged 4 commits into from
Mar 31, 2023

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented Mar 28, 2023

Applied Post-Release Patches

Skipped

library_builders.bat Outdated Show resolved Hide resolved
library_builders.bat Outdated Show resolved Hide resolved
library_builders.bat Outdated Show resolved Hide resolved
- zlib builds: remove `.dll`:
  As in Unix builds, avoid that a `.dll` can ever be picked up.
- bump version to `0.15.0.post2`
@@ -161,6 +161,11 @@ exit /b 0
cmake --build build-zlib --target install --config Release
if errorlevel 1 exit 1

set "zlib_dll=%BUILD_PREFIX:~1,-1%/zlib/bin/zlib.dll"
set "zlib_dll=%zlib_dll:/=\%"
del "%zlib_dll%"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows builds still pick up a zlib.dll somewhere, probably from the system...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HDF5:

2023-03-28T19:36:25.6925189Z -- Could NOT find ZLIB (missing: ZLIB_DIR)
2023-03-28T19:36:25.8188114Z -- Found ZLIB: C:/Program Files (x86)/zlib/lib/zlib.lib (found version "1.2.12")  

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compiled without any backends, the .dll dependencies are reduced to only allowed ones:

$ objdump -p openpmd_api_cxx.cp311-win_amd64.pyd | grep dll
	DLL Name: python311.dll
	DLL Name: KERNEL32.dll
	DLL Name: MSVCP140.dll
	DLL Name: VCRUNTIME140_1.dll
	DLL Name: VCRUNTIME140.dll
	DLL Name: api-ms-win-crt-string-l1-1-0.dll
	DLL Name: api-ms-win-crt-heap-l1-1-0.dll
	DLL Name: api-ms-win-crt-runtime-l1-1-0.dll
	211e44	   63  _seh_filter_dll
	DLL Name: api-ms-win-crt-convert-l1-1-0.dll
	DLL Name: api-ms-win-crt-math-l1-1-0.dll
	DLL Name: api-ms-win-crt-stdio-l1-1-0.dll
	DLL Name: api-ms-win-crt-locale-l1-1-0.dll
	DLL Name: api-ms-win-crt-filesystem-l1-1-0.dll
	DLL Name: api-ms-win-crt-environment-l1-1-0.dll
	DLL Name: api-ms-win-crt-time-l1-1-0.dll

Copy link
Member Author

@ax3l ax3l Mar 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Building only zlib & HDF5 already pulls in a zlib.dll again, even with zlib.dll removed in the zlib install path.

Unrelated: also found a PREFER_EXTERNAL_ZLIB option in blosc to avoid building an internal one.

Copy link
Member Author

@ax3l ax3l Mar 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • setting the HDF5 hints to our zlib explicitly does not help.
  • building HDF5 w/o zlib support also pulls in zlib.dll :-o (zlib built)
  • building HDF5 w/o zlib support (zlib not built) - this one does not pull a dep in!
  • test CMake 3.24+ option: ZLIB_USE_STATIC_LIBS - this one does not pull a dep in!
    • also, activates BUILD_SHARED_LIBS=ON for zlib, because it cannot be turned off conditionally with current zlib's CMake target logic and zlib1.dll is the correct target to build (and then remove)
  • also set zlib options for c-blosc and activate ADIOS2 again

@ax3l ax3l force-pushed the wheels-0.15.0.post2 branch 8 times, most recently from 5959f25 to 6e7013d Compare March 29, 2023 08:07
@ax3l ax3l self-assigned this Mar 29, 2023
@ax3l ax3l force-pushed the wheels-0.15.0.post2 branch 6 times, most recently from 3158723 to e70c2a3 Compare March 30, 2023 07:19
@ax3l ax3l force-pushed the wheels-0.15.0.post2 branch 2 times, most recently from a09b8d1 to 60215c6 Compare March 30, 2023 19:28
Comment on lines +146 to +147
CIBW_ENVIRONMENT: HDF5_USE_STATIC_LIBRARIES='ON' ZLIB_USE_STATIC_LIBS='ON' ADIOS_USE_STATIC_LIBS='ON' openPMD_CMAKE_openPMD_USE_HDF5='ON' openPMD_CMAKE_openPMD_USE_ADIOS2='ON'
CIBW_ENVIRONMENT_WINDOWS: HDF5_USE_STATIC_LIBRARIES='ON' ZLIB_USE_STATIC_LIBS='ON' openPMD_CMAKE_openPMD_USE_HDF5='ON' openPMD_CMAKE_openPMD_USE_ADIOS2='ON' CMAKE_PREFIX_PATH='C:/Program Files (x86)/ADIOS2;C:/Program Files (x86)/blosc;C:/Program Files (x86)/HDF5;C:/Program Files (x86)/ZFP;C:/Program Files (x86)/zlib'
Copy link
Member Author

@ax3l ax3l Mar 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ZLIB_USE_STATIC_LIBS='ON' env var here has probably no effect: not added to setup.py in #1410

We mostly need to pass this in library_builders.sh/bat when we build dependencies that directly pick up ZLIB.

@ax3l ax3l merged commit 59a7e99 into openPMD:wheels Mar 31, 2023
@ax3l ax3l deleted the wheels-0.15.0.post2 branch March 31, 2023 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant