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

GH-36922: [CI][C++][Windows] Search OpenSSL from PATH #36923

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

kou
Copy link
Member

@kou kou commented Jul 28, 2023

Rationale for this change

It seems that OpenSSL install script adds the OpenSSL install folder to PATH:
https://github.com/actions/runner-images/blob/665e71067ff126acea71e7d93715c83db038597f/images/win/scripts/Installers/Install-OpenSSL.ps1#L37

If OpenSSL install folder exists in PATH, we don't need to specify OPENSSL_ROOT_DIR explicitly. Because find_* such as find_library() searches path in PATH by default:

On Windows hosts: <prefix>/lib/<arch> if CMAKE_LIBRARY_ARCHITECTURE is set, and <prefix>/lib for each <prefix>/[s]bin in PATH, and <entry>/lib for other entries in PATH.

What changes are included in this PR?

Remove OPENSSL_ROOT_DIR.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

@github-actions
Copy link

⚠️ GitHub issue #36922 has been automatically assigned in GitHub to PR creator.

@github-actions github-actions bot added the awaiting committer review Awaiting committer review label Jul 28, 2023
@kou
Copy link
Member Author

kou commented Jul 28, 2023

+1

https://github.com/apache/arrow/actions/runs/5686753795/job/15414095449?pr=36923#step:11:295

-- Found OpenSSL: optimized;C:/Program Files/OpenSSL/lib/VC/libcrypto64MD.lib;debug;C:/Program Files/OpenSSL/lib/VC/libcrypto64MDd.lib (found suitable version "3.1.1", minimum required is "1.0.2")  

@kou kou merged commit 5b744ab into apache:main Jul 28, 2023
14 checks passed
@kou kou deleted the ci-cpp-windows-openssl branch July 28, 2023 00:50
@kou kou removed the awaiting committer review Awaiting committer review label Jul 28, 2023
@conbench-apache-arrow
Copy link

After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 5b744ab.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about possible false positives for unstable benchmarks that are known to sometimes produce them.

R-JunmingChen pushed a commit to R-JunmingChen/arrow that referenced this pull request Aug 20, 2023
…6923)

### Rationale for this change

It seems that OpenSSL install script adds the OpenSSL install folder to `PATH`:
https://github.com/actions/runner-images/blob/665e71067ff126acea71e7d93715c83db038597f/images/win/scripts/Installers/Install-OpenSSL.ps1#L37

If OpenSSL install folder exists in `PATH`, we don't need to specify `OPENSSL_ROOT_DIR` explicitly. Because `find_*` such as [`find_library()`](https://cmake.org/cmake/help/latest/command/find_library.html) searches path in `PATH` by default:

> On Windows hosts: `<prefix>/lib/<arch>` if [`CMAKE_LIBRARY_ARCHITECTURE`](https://cmake.org/cmake/help/latest/variable/CMAKE_LIBRARY_ARCHITECTURE.html#variable:CMAKE_LIBRARY_ARCHITECTURE) is set, and `<prefix>/lib` for each `<prefix>/[s]bin` in `PATH`, and `<entry>/lib` for other entries in `PATH`.

### What changes are included in this PR?

Remove `OPENSSL_ROOT_DIR`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: apache#36922

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
…6923)

### Rationale for this change

It seems that OpenSSL install script adds the OpenSSL install folder to `PATH`:
https://github.com/actions/runner-images/blob/665e71067ff126acea71e7d93715c83db038597f/images/win/scripts/Installers/Install-OpenSSL.ps1#L37

If OpenSSL install folder exists in `PATH`, we don't need to specify `OPENSSL_ROOT_DIR` explicitly. Because `find_*` such as [`find_library()`](https://cmake.org/cmake/help/latest/command/find_library.html) searches path in `PATH` by default:

> On Windows hosts: `<prefix>/lib/<arch>` if [`CMAKE_LIBRARY_ARCHITECTURE`](https://cmake.org/cmake/help/latest/variable/CMAKE_LIBRARY_ARCHITECTURE.html#variable:CMAKE_LIBRARY_ARCHITECTURE) is set, and `<prefix>/lib` for each `<prefix>/[s]bin` in `PATH`, and `<entry>/lib` for other entries in `PATH`.

### What changes are included in this PR?

Remove `OPENSSL_ROOT_DIR`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: apache#36922

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
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.

[CI][C++][Windows] Can't find OpenSSL on GitHub Actions
1 participant