-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fixes for Windows mswin & sqlcipher #332
Conversation
Hey, @MSP-Greg - thank you for putting this together! I think the output "3.39.1/3.37.2" is telling us that this isn't working as expected -- I think it's compiling against sqlite3 and dynamically loading sqlcipher (or vice-versa). This is pointing at a lack of both compile-time and run-time assertions that we're pulling in the expected flavor of db library, a shortcoming that dates back to the original PR, #232. I'm going to add a commit onto this PR that will introduce some checking and I think that will confirm my suspicions by failing CI. |
Need.more.coffee. Thank you! Last night I looked here to double check whether it was running CI against mswin. I'm working on some custom Ruby builds, and wanted to see about extension gems. This morning I'm looking at the code...
So that's runtime vs compile, correct? Question - if one builds with sqlcipher, can one use it just like 'normal' sqlite3? Or, is it mutually exclusive? Regardless, I've got vcpkg locally, anything I can check about the sqlcipher install? |
Installed vcpkg sqlcipher locally. Two files EDIT: I've got two vcpkg installs, one using VS 2019 & OpenSSL 1.1.1, and one with VS 2022 & OpenSSL 3.0.x Installed sqllite3 to one and sqlcipher to the other:
Hacked a few files and sqlcipher installed correctly and showed |
74ef441
to
24b678c
Compare
I rebased onto |
24b678c
to
b6a7cc2
Compare
I came up with a possible solution, not sure about naming, etc. Seems like all CI passes. I rebased a few hours ago, and added a commit. Might be a bit hacky... Test suites: sqlcipher log: Seems like the main issue is that vcpkg sqlcipher is the only platform with the two header files in an |
Your solution seems reasonable to me, though I'm realizing now there are a few problems that are interacting here:
I'm going to add your commit to this PR to see what happens. |
Sorry, forgot. The vcpkg input needs to be |
9c56a65
to
cba4d66
Compare
Right, thanks. Fixed! |
Trying to tighten what runs it, as the only problem is mswin & sqlcipher? |
🤔 I'm going to remove my attempt in the extconf to determine whether the libraries is "really sqlcipher", because the sqlcipher library doesn't appear to present that information in a stable, predictable way. That will get mswin green, I think. I'm still worried about macos versioning being strange, but I can handle that in a different PR. |
cba4d66
to
026cb8f
Compare
@MSP-Greg I'm not too worried about making this code perfect -- sqlcipher is an edge case that I don't think many people opt into, and if they do they're responsible for bringing their own (and using the config flags if necessary). If you'd like to clean it up, I'd be happy to take it, but I'm a bit under water today and won't get to it. |
and allow for header in sqlcipher folder Co-authored-by: Mike Dalessio <mike.dalessio@gmail.com>
026cb8f
to
b7ccee6
Compare
I think this can be merged! @MSP-Greg thanks again for digging in on this. Are you OK with the changeset as-is? |
Yes. Maybe later we can look at reducing the calls to some methods. Thanks for the quick review, etc... JFYI, SQLCipher has a new release (4.5.2, uses SQLite 3.39.2), opened a PR in vcpkg to update it. Haven't checked MSYS2 yet. |
Changing the vcpkg input from "sqlcipher" to "sqlite3 sqlcipher" seems to allow compile & test to pass? Not.sure.
Also, ci log for 'bundle exec rake test' shows:
Not sure what 'sqlite3 version: 3.39.1/3.37.2' is about?
Lastly, CI is ran on Windows 'mingw', which is a Ruby head build, 'ucrt' is also available... Didn't change.