-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Properly configure SQLite on Linux and OS X #287
Conversation
Add all necessary -DHAVE_* flags that result from a run of the configure script on Linux and OS X so that we build SQLite properly. In particular, this fixes mattn/go-sqlite3 #285 in which I spotted erratic backoff behavior due to the lack of usleep support.
@jmmv, are you sure that sqlite amalgamation required so many defines? But |
Did you check some of breaking compatibility, append of dependency, performance issue or etc? |
@vovkasm Many of the defines should not be necessary, particularly those for headers that can be found "everywhere", but they come from standard And now that you mention this... it's possible that some of the defines exist only for extra tools shipped with sqlite3 that are not part of the amalgamation distribution. @mattn All of the defines added are for features that should be widely available on any major Linux distribution; they are nothing really special. Is there any specific platform you would like to validate? This will be much easier to reason about if we do as @vovkasm says by only define a minimal set of things. What do you mean with "append of dependency"? Regarding performance: well, the behavior of these bindings without the fix was really bad under contention and now they fly. I'm running this binding as the backend for a FUSE file system that is receiving significant load from various cores and they behave great now. (Yeah, yeah, I know, I don't have numbers to back these claims, but if you have something specific in mind, I could maybe check too.) |
So:
The code is checking for many more constants than just Based on this, I still think that just using the defines generated by the configure script is better than attempting to curate them by hand; less room for mistakes. Or am I missing something? |
I'am not sure about best solution for this exactly case. So it all for @mattn to judge ;-) So I will only provide additional information that may help with solution.
From above I can say, that
|
Most options already implemented, case outdated. @mattn Please close. |
Add all necessary -DHAVE_* flags that result from a run of the configure
script on Linux and OS X so that we build SQLite properly. In particular,
this fixes mattn/go-sqlite3 #285 in which I spotted erratic backoff behavior
due to the lack of usleep support.