-
Notifications
You must be signed in to change notification settings - Fork 168
fix(c): Generate versioned DLLs and import LIBs when building with MSVC #2858
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
Conversation
|
Thanks for figuring this out. Overall this looks reasonable. If you don't mind I can attempt to push a Windows pipeline to this PR so we can test it. |
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
…o window-build
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Yes please @lidavidm that would be helpful. |
|
Got it - I'll try to get to it soon |
|
pre-commit issues addressed |
|
Hmm not sure why the pre-commit is still failing. Is it because I've run mine on a Windows machine so it's not capturing everything the CI does (which runs on Ubuntu from the looks of it)? 🤔 |
|
How are you running it? |
|
Using this command: |
|
I don't see a problem. I guess it could be Windows. |
lidavidm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I have some questions but they aren't blockers.
| DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) | ||
|
|
||
| # If we're building on Windows using vcpkg, ensure the runtime dependencies of binaries are copied to the install folder. | ||
| if(ADBC_BUILD_VCPKG) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this automatically be detected somehow? e.g. by checking CMake's platform property and something the vcpkg-cmake integration sets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm had a quick look but can't see a better way at the moment. The problem is that runtime dependencies copying doesn't work for other builds like python/conda etc. Maybe we can spend more time investigating in a separate PR if that's OK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me.
| id: winlibs-version | ||
| shell: pwsh | ||
| run: | | ||
| $winlibs_asset_name = "winlibs-x86_64-posix-seh-gcc-15.2.0-mingw-w64ucrt-13.0.0-r4.7z" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this has to be updated periodically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We can always get the latest, but I think it's safer pinning the version and updating manually.
kou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Co-authored-by: David Li <li.davidm96@gmail.com>
Co-authored-by: David Li <li.davidm96@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
…o window-build
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
|
I'll take one last look but also I wanna make sure we file any follow up issues that were mentioned here 😅 Thanks again for figuring out all of this! |
Removed Windows configuration handling for test binaries.
Co-authored-by: David Li <li.davidm96@gmail.com>
Thanks @lidavidm, I see you've created the relevant issues. Regarding packaging the debug and release binaries, do you have anything specific in mind, as I'm not sure what the packaging patterns are in this rep. We can update the vcpkg job to upload the artifacts, but not sure how these will make it to the tagged release as assets. Thanks |
|
We don't actually ship Windows packages, only wheels. (We do ship packages for some Linux distros, but not macOS either.) So I'm not sure there's too much to do here in terms of packaging. |
Hi.
This is to address building binaries and LIBs on Windows. The PR is mainly for consideration purposes, as it's my first PR against this repo so not necessarily a complete one. Following are the changes I needed to make:
vcpkgroot is expected so that third party packages (sqlite, postgres etc) can be installed and found via vcpkg.GoUtils.cmakeis not automatically copying the driver DLLs to the location of the test executables, causing the tests for those drivers to fail. Added a post build command to ensure the DLLs are copied.2to the second variable name.What I haven't done is update the GitHub actions to verify a complete build on a Windows machine as I'm not too familiar with the CI/CD pipeline in this repo.
Hopefully this is a good start to get everything building successfully and Windows.
Closes #2846