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

link openssl statically for Windows #3118

Merged
merged 3 commits into from
Oct 14, 2024
Merged

link openssl statically for Windows #3118

merged 3 commits into from
Oct 14, 2024

Conversation

yihau
Copy link
Member

@yihau yihau commented Oct 9, 2024

Problem

a refined version of the timeline for future reference:

Summary of Changes

> ldd solana-test-validator
  	ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ffe8ccc0000)
  	KERNEL32.DLL => /c/Windows/System32/KERNEL32.DLL (0x7ffe8b580000)
  	KERNELBASE.dll => /c/Windows/System32/KERNELBASE.dll (0x7ffe8a240000)
  	apphelp.dll => /c/Windows/SYSTEM32/apphelp.dll (0x7ffe88280000)
  	bcryptprimitives.dll => /c/Windows/System32/bcryptprimitives.dll (0x7ffe8ab70000)
  	USER32.dll => /c/Windows/System32/USER32.dll (0x7ffe8b3d0000)
  	win32u.dll => /c/Windows/System32/win32u.dll (0x7ffe8ab40000)
  	POWRPROF.dll => /c/Windows/SYSTEM32/POWRPROF.dll (0x7ffe8a120000)
  	GDI32.dll => /c/Windows/System32/GDI32.dll (0x7ffe8c610000)
  	ucrtbase.dll => /c/Windows/System32/ucrtbase.dll (0x7ffe8a800000)
  	gdi32full.dll => /c/Windows/System32/gdi32full.dll (0x7ffe8a6e0000)
  	RPCRT4.dll => /c/Windows/System32/RPCRT4.dll (0x7ffe8c1f0000)
  	msvcp_win.dll => /c/Windows/System32/msvcp_win.dll (0x7ffe8aaa0000)
  	CRYPT32.dll => /c/Windows/System32/CRYPT32.dll (0x7ffe8a910000)
  	WS2_32.dll => /c/Windows/System32/WS2_32.dll (0x7ffe8b7d0000)
  	ADVAPI32.dll => /c/Windows/System32/ADVAPI32.dll (0x7ffe8b710000)
  	msvcrt.dll => /c/Windows/System32/msvcrt.dll (0x7ffe8b320000)
  	sechost.dll => /c/Windows/System32/sechost.dll (0x7ffe8c640000)
  	bcrypt.dll => /c/Windows/System32/bcrypt.dll (0x7ffe8aa70000)
  	SHLWAPI.dll => /c/Windows/System32/SHLWAPI.dll (0x7ffe8c5b0000)
  	shell32.dll => /c/Windows/System32/shell32.dll (0x7ffe8b8d0000)
  	secur32.dll => /c/Windows/SYSTEM32/secur32.dll (0x7ffe7db70000)
  	ole32.dll => /c/Windows/System32/ole32.dll (0x7ffe8b1e0000)
  	combase.dll => /c/Windows/System32/combase.dll (0x7ffe8c910000)
  	VCRUNTIME140.dll => /c/Windows/SYSTEM32/VCRUNTIME140.dll (0x7ffe7e9a0000)
  	MSVCP140.dll => /c/Windows/SYSTEM32/MSVCP140.dll (0x7ffe7e9c0000)
  	VCRUNTIME140_1.dll => /c/Windows/SYSTEM32/VCRUNTIME140_1.dll (0x7ffe7f450000)
  	CRYPTBASE.DLL => /c/Windows/SYSTEM32/CRYPTBASE.DLL (0x7ffe899b0000)
  	SSPICLI.DLL => /c/Windows/SYSTEM32/SSPICLI.DLL (0x7ffe89bf0000)
  • fixed openssl version to 3.3.2
  • update ci

@yihau yihau requested a review from joncinque October 9, 2024 08:59
@yihau
Copy link
Member Author

yihau commented Oct 9, 2024

(will re-enable those 2 pipelines when this one is ready to merge)

Copy link

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Apologies for the lateness! The bin in the release works for me on windows, even in cmd.exe, and I was able to (eventually) build this on my local Windows box, so the change looks good! I got a bit confused about the Perl stuff, so just a nit to add a comment

Comment on lines +46 to +48
run: |
echo "PERL=$((where.exe perl)[0])" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
echo "OPENSSL_SRC_PERL=$((where.exe perl)[0])" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8

Choose a reason for hiding this comment

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

Could you add a comment linking to this issue sfackler/rust-openssl#2149? I was very confused about this line, and I'm assuming this helped you too 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

sure! 84af4f9 🫶

Comment on lines +42 to +45
- name: Set Perl environment variables
run: |
echo "PERL=$((where.exe perl)[0])" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
echo "OPENSSL_SRC_PERL=$((where.exe perl)[0])" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8

Choose a reason for hiding this comment

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

Same here, can you add a comment linking to this issue? sfackler/rust-openssl#2149

Copy link
Member Author

Choose a reason for hiding this comment

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

put it in the same commit! 84af4f9

Copy link

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this!

@yihau yihau merged commit 49d2298 into anza-xyz:master Oct 14, 2024
35 checks passed
@yihau yihau added the v2.0 Backport to v2.0 branch label Oct 14, 2024
Copy link

mergify bot commented Oct 14, 2024

Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis.

mergify bot pushed a commit that referenced this pull request Oct 14, 2024
* ci: fix windows pipeline

* vendor openssl for windows

* add comment for the workaround

(cherry picked from commit 49d2298)
yihau added a commit that referenced this pull request Oct 15, 2024
link openssl statically for Windows (#3118)

* ci: fix windows pipeline

* vendor openssl for windows

* add comment for the workaround

(cherry picked from commit 49d2298)

Co-authored-by: Yihau Chen <yihau.chen@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2.0 Backport to v2.0 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants