Skip to content

Windows: Fixup bundle improvements

Windows recently added new dlls that gets linked, here is what I get on github windows-latest image when packaging a superbuild:

2024-03-09T02:41:18.6751399Z 2: CMake Error at D:/a/f3d-superbuild/f3d-superbuild/build/cpack/f3d/NSIS/build/cmake_install.cmake:46 (message):
2024-03-09T02:41:18.6752859Z 2:   Failed to install f3d:
2024-03-09T02:41:18.6753306Z 2: 
2024-03-09T02:41:18.6753689Z 2:   Traceback (most recent call last):
2024-03-09T02:41:18.6754200Z 2: 
2024-03-09T02:41:18.6755371Z 2:     File "D:\a\f3d-superbuild\f3d-superbuild\source\superbuild\cmake\scripts\fixup_bundle.windows.py", line 463, in <module>
2024-03-09T02:41:18.6756578Z 2:       main(sys.argv[1:])
2024-03-09T02:41:18.6757813Z 2:     File "D:\a\f3d-superbuild\f3d-superbuild\source\superbuild\cmake\scripts\fixup_bundle.windows.py", line 455, in main
2024-03-09T02:41:18.6759522Z 2:       _install_binary(main_exe, is_excluded, bundle_dest, libdir, installed, manifest, dry_run=opts.dry_run)
2024-03-09T02:41:18.6761443Z 2:     File "D:\a\f3d-superbuild\f3d-superbuild\source\superbuild\cmake\scripts\fixup_bundle.windows.py", line 373, in _install_binary
2024-03-09T02:41:18.6762949Z 2:       deps.extend(dep.dependencies.values())
2024-03-09T02:41:18.6763534Z 2:                   ^^^^^^^^^^^^^^^^
2024-03-09T02:41:18.6764868Z 2:     File "D:\a\f3d-superbuild\f3d-superbuild\source\superbuild\cmake\scripts\fixup_bundle.windows.py", line 175, in dependencies
2024-03-09T02:41:18.6766220Z 2:       deplib = Library.from_reference(dep, self, ignore=self._ignore)
2024-03-09T02:41:18.6766882Z 2:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-09T02:41:18.6767765Z 2:     File "D:\a\f3d-superbuild\f3d-superbuild\source\superbuild\cmake\scripts\fixup_bundle.windows.py", line 222, in from_reference
2024-03-09T02:41:18.6768954Z 2:       raise RuntimeError('Unable to find the %s library from %s: %s' % (ref, loader.path, ', '.join(paths)))
2024-03-09T02:41:18.6769749Z 2: 
2024-03-09T02:41:18.6770350Z 2:   RuntimeError: Unable to find the api-ms-win-security-base-l1-1-0.dll

This dll does seems very new, but for some reasons the superbuild is trying to package it now: https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-security-base-l1-1-0dll

Adding it to the skip list should fix it.

This also properly skip MSVC and VC runtime and they currently were not, as a grep on ParaView superbuild package can easily show:

find ./ | grep vc.*.dll
./vcomp140.dll
./msvcp140_2.dll
./vcruntime140_1.dll
./msvcp140_codecvt_ids.dll
./msvcp140_atomic_wait.dll
./vcruntime140.dll
./msvcp140.dll
./msvcp140_1.dll
Edited by Mathieu Westphal (Kitware)

Merge request reports