Skip to content

feat: CMake builds with OpenSSL support#373

Merged
jfpanisset merged 4 commits intoAcademySoftwareFoundation:mainfrom
victorfleury:feature/build_cmake_with_openssl_support_326
Apr 1, 2026
Merged

feat: CMake builds with OpenSSL support#373
jfpanisset merged 4 commits intoAcademySoftwareFoundation:mainfrom
victorfleury:feature/build_cmake_with_openssl_support_326

Conversation

@victorfleury
Copy link
Copy Markdown
Contributor

@victorfleury victorfleury commented Mar 30, 2026

Summary

With this PR we add the OpenSSL support to cmake so we avoid the following error reported in #326:

CMake Error at ilmbase-stamp/download-ilmbase.cmake:163 (message):
  Each download failed!
    error: downloading 'https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.7.zip' failed
          status_code: 1
          status_string: "Unsupported protocol"
          log:
          --- LOG BEGIN ---
          Protocol "https" not supported
  closing connection #-1
          --- LOG END --

Steps to test

I have ran the following commands to test that cmake is built with openssl and can fetch archives from the web using https:// URIs

Builds :

# Building the base image for ci_2024/2025/2026 or --version 4 / 5 / 6
$ aswfdocker --verbose build --ci-image-type IMAGE --group baseos-gl-conan --version 4 --progress plain --target baseos-gl-conan

# building the openssl wrapper package
$ aswfdocker --verbose build --ci-image-type PACKAGE --group common-wrappers --version 4 --use-conan --target openssl --progress plain

# Building CMake / Ninja
$ aswfdocker --verbose build --ci-image-type PACKAGE --group common --version 4 --use-conan --progress plain --target ninja --target cmake

Testing :

I ran the following snippet inside the docker containers (for each version of ci_common)

cmake_minimum_required(VERSION 3.10)
project(test_ssl)
file(DOWNLOAD "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.7.zip" "/tmp/v2.5.7.zip" STATUS status)
list(GET status 0 code)
list(GET status 1 msg)
message(STATUS "Download result: code=${code} msg=${msg}")

Placed it in a /tmp/ folder and then ran cmake
I got this output :

[root@71d4f6293856 build]# cmake ..
-- Download result: code=0 msg="No error"
-- Configuring done (2.7s)
-- Generating done (0.0s)
-- Build files have been written to: /tmp/test_ssl/build
[root@71d4f6293856 build]# ls -alh /tmp/
total 28M
drwxrwxrwt. 1 root root   66 Mar 30 01:38 .
drwxr-xr-x. 1 root root    6 Mar 30 01:34 ..
...TRUNCATED.....
-rw-r--r--. 1 root root  28M Mar 30 01:38 v2.5.7.zip

So I would say this is working but happy to get any feedback and start the ball rolling :)

Thanks @jfpanisset for all the help getting this one out :)

This feature adds OpenSSL support for CMake.

Signed-off-by: victorfleury <victor.fleury@gmail.com>
@jfpanisset
Copy link
Copy Markdown
Contributor

You will want to check out this build failure:

https://github.com/AcademySoftwareFoundation/aswf-docker/actions/runs/23724396833/job/69111067775?pr=373

Normally the Python tests are supposed to run at git commit time, did they not run? Perhaps the switch to uv messed up the pre-commit hooks that are supposed to do that. We can take a look together tomorrow.

@jfpanisset
Copy link
Copy Markdown
Contributor

It looks like the commit hooks are still working, not sure why they didn't run for you? Perhaps an env var?

The tests in python/aswfdocker/tests/ expect specific locations for packages, so moving openssl from base to common would likely have changed the output from what the tests expected. So you'll want to update the expected output to reflect the new structure.

@victorfleury
Copy link
Copy Markdown
Contributor Author

I think it's my bad.
I haven't read carefully enough the CONTRIBUTING.md file and missed that I should install the pre-commit hook ...
I will do that tonight and re-run the test suite making sure everything goes through.
Sorry for the noise.

victorfleury and others added 3 commits March 30, 2026 21:40
Signed-off-by: victorfleury <victor.fleury@gmail.com>
Reformatting using `black`

Signed-off-by: victorfleury <victor.fleury@gmail.com>
@jfpanisset
Copy link
Copy Markdown
Contributor

The build for the cmake/4.0.2 Conan package failed, that's because it couldn't find the (wrapper) package openssl/1.1.1k@aswftesting/ci_common6 on the Artifactory server.

In .github/workflows/docker-builds.yml the following step will need to be added before the step that builds Ninja and CMake:

    - name: Build common-wrappers (Conan)
      run: |
        set -ex
        uv run aswfdocker \
          --verbose \
          build \
          --ci-image-type PACKAGE \
          --group common-wrappers \
          --version ${{ matrix.common_version_noclang }} \
          --use-conan \
          --build-missing \
          --push NO

This workflow never completes anyway, it will either run our of disk space or time, and needs some more restructuring anyway. So I'll let the branch in as is, and "fix" this workflow later.

@jfpanisset jfpanisset merged commit 07abcab into AcademySoftwareFoundation:main Apr 1, 2026
2 of 3 checks passed
@victorfleury
Copy link
Copy Markdown
Contributor Author

I can make another PR with the changes in .github/workflows/docker-builds.yml

As for the build in aswftesting/ci_common6 I will retry on my end, but I don't recall any issues building this (thogh it may have been aswf/ci_common6 instead.)

@jfpanisset
Copy link
Copy Markdown
Contributor

I made those changes in my own PR which I've just merged:

#375

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants