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

build cilacc.dll as release #1928

Merged
merged 4 commits into from
Sep 13, 2024
Merged

Conversation

gfardell
Copy link
Member

@gfardell gfardell commented Sep 13, 2024

Changes

Added:
--config RelWithDebInfo

specified the generator and toolkit in the windows build script to keep consistency between builders.

OUTDATED
Need to build the shared library as 'Release'. Previous build 'RelWithDebug' requires debug dlls which are not included in the VC redistributable installed in the conda environment.

Built as 'RelWithDebug':

Dependencies:
Success: ippcore.dll, Version: 2021,12,0,1052
Success: ipps.dll, Version: 2021,12,0,1087
Success: ippi.dll, Version: 2021,12,0,1083
Failure: VCOMP140D.DLL, Error: DLL not found
Failure: VCRUNTIME140D.dll, Error: DLL not found
Failure: ucrtbased.dll, Error: DLL not found
Success: KERNEL32.dll, Version: 10.0.19041.4717 (WinBuild.160101.0800)

Testing you performed

Please add any demo scripts to https://github.com/TomographicImaging/CIL-Demos/tree/main/misc
Built and tested on windows. Confirmed dll dependencies in conda environments.

Related issues/links

Needed to address for #1880

Checklist

  • I have performed a self-review of my code
  • I have added docstrings in line with the guidance in the developer guide
  • I have updated the relevant documentation
  • I have implemented unit tests that cover any new or modified functionality
  • CHANGELOG.md has been updated with any functionality change
  • Request review from all relevant developers
  • Change pull request label to 'Waiting for review'

Contribution Notes

Please read and adhere to the developer guide and local patterns and conventions.

  • The content of this Pull Request (the Contribution) is intentionally submitted for inclusion in CIL (the Work) under the terms and conditions of the Apache-2.0 License
  • I confirm that the contribution does not violate any intellectual property rights of third parties

@gfardell gfardell self-assigned this Sep 13, 2024
Copy link
Member

@casperdcl casperdcl left a comment

Choose a reason for hiding this comment

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

sad... Ideally adding windows debug libs to conda would be better.

@gfardell
Copy link
Member Author

sad... Ideally adding windows debug libs to conda would be better.

As far as I know they are not included the redistributable folder and therefore license so I'm not sure we could. I don't see what we lose with this. Anyone needing to debug should be able to build whichever they want locally.

Copy link
Contributor

@paskino paskino left a comment

Choose a reason for hiding this comment

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

The CMAKE_BUILD_TYPE has no effect with visual compilers such as VS. At compile time you need to pass the --config RelWithDebInfo. CMake Docs read that CMAKE_BUILD_TYPE

Specifies the build type on single-configuration generators (e.g. Makefile Generators or Ninja).

If I'm not mistaken the default configuration of VS is Debug not RelWithDebInfo.

@gfardell
Copy link
Member Author

Hmm I'm mostly sure I looked at the dependencies with --config RelWithDebInfo but not 100% now....

@gfardell
Copy link
Member Author

gfardell commented Sep 13, 2024

@paskino you are correct, RelWithDebInfo doesn't link against the debug libraries. It was defaulting to the debug build before. I'll revert the changes from RelWithDebInfo and keep --config RelWithDebInfo.

Building:

Building Custom Rule C:/Users/gemst/GitHub/CIL/CMakeLists.txt
  -- Install configuration: "RelWithDebInfo"
  -- Installing: C:/Users/gemst/miniforge3/envs/cil_test_fd/Library/bin/cilacc.dll

Path of loaded dll:

>>> path_dll = find_dll(dll_name)
>>> path_dll
'C:\\Users\\gemst\\miniforge3\\envs\\cil_test_fd\\Library\\bin\\cilacc.dll'

Dependencies of loaded dll:

Success: VCOMP140.DLL, Version: 14.40.33810.0
Success: VCRUNTIME140.dll, Version: 14.40.33810.0
Success: api-ms-win-crt-heap-l1-1-0.dll, Version: 10.0.22621.1 (WinBuild.160101.0800)
Success: api-ms-win-crt-stdio-l1-1-0.dll, Version: 10.0.22621.1 (WinBuild.160101.0800)
Success: api-ms-win-crt-runtime-l1-1-0.dll, Version: 10.0.22621.1 (WinBuild.160101.0800)
Success: KERNEL32.dll, Version: 10.0.22621.3374 (WinBuild.160101.0800)

Copy link
Member

@casperdcl casperdcl left a comment

Choose a reason for hiding this comment

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

yay

@gfardell gfardell merged commit 7be568d into TomographicImaging:master Sep 13, 2024
9 checks passed
@gfardell gfardell deleted the build_release branch September 13, 2024 15:38
@gfardell gfardell added this to the v24.2.0 milestone Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants