-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Docs on how to compile and link SQLite #74
base: master
Are you sure you want to change the base?
Docs on how to compile and link SQLite #74
Conversation
For the record, this is related to https://forum.crystal-lang.org/t/upgrade-sqlite3-binding-version/3384 @chillfox could you add a paragraph describing in what situations someone would need/want to compile sqlite from source. I'm thinking in case your distro is out of date or you want to use development version of sqlite3. Right? Somehow I think this was also about compiling sqlite3 for static linking, but it seems it's not 🙃 Other than that I think this is good to go. Thanks! |
Yeah, the main reasons people usually want to compile SQLite is to get some feature from a new release or development. The other one is enabling some compile time feature that's not commonly enabled. It would definitely be good to cover compiling for static linking as that will likely be a common use case. |
@bcardiff I had a bit of a look at how to compile SQLite for static linking and unfortunately, it requires deeper knowledge of c and the build tools than I currently have. As far as I can tell it is something along these lines, but I am still missing something. clang -c -Wall -o libsqlite3.o -I sqlite3.h sqlite3.c
llvm-ar rcs libsqlite3.a libsqlite3.o
crystal build --release --static --link-flags -Llibsqlite3.a app.cr |
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.
Content looks good.
I'm wondering if the file should be placed in a doc/
folder for a tidy root directory.
@straight-shoota sure, why not. I will move it. |
@straight-shoota doc is in |
Maybe just go with |
that's where |
Ah, right. I believe that should be in |
This should cover the basics of how to use a newer version of SQLite on Ubuntu.
I think it could be improved by covering the following, but I do think this is a decent start.