On 2019/03/29 17:41, Jeremie Courreges-Anglas wrote: > On Fri, Mar 29 2019, Stuart Henderson <s...@spacehopper.org> wrote: > > yesterday I bumped the SHARED_LIBS version to enforce updates of sqlite > > because some users have a tight check on build vs library version; > > Whining if the runtime lib is newer than expected looks plain useless to > me. Printing a warning if the runtime lib is older may look nice. But > *erroring out* ?!? > > My opinion is that this pattern is wrong, that the advice given to > developers using sqlite[0] is wrong in the general case, and that > subversion should be fixed to not error out. > > [0] https://www.sqlite.org/c3ref/libversion.html > > --8<-- > Cautious programmers might include assert() statements in their > application to verify that values returned by these interfaces match > the macros in the header, and thus ensure that the application is > compiled with matching library and header files. > > assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER ); > assert( strncmp(sqlite3_sourceid(),SQLITE_SOURCE_ID,80)==0 ); > assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 ); > -->8-- > > > on > > reflection I think it would be simpler to set PKGSPEC so that an extra > > step is not needed. > > > > ok/comments? > > I find it is a too big hammer just because of what looks like a special > snowflake. Ranting aside, I'd prefer if we kept your current solution, > ie bumping the minor version when upgrading sqlite.
If it was just subversion then I'd consider patching that. But it's wider and seems a bit silly to patch all over the place .. Looks like mozillas have a hard exit in some cases - // Ensure that we are using the same version of SQLite that we compiled with // or newer. Our configure check ensures we are using a new enough version // at compile time. if (SQLITE_VERSION_NUMBER > ::sqlite3_libversion_number()) { nsCOMPtr<nsIPromptService> ps(do_GetService(NS_PROMPTSERVICE_CONTRACTID)); if (ps) { nsAutoString title, message; title.AppendLiteral("SQLite Version Error"); message.AppendLiteral("The application has been updated, but the SQLite " "library wasn't updated properly and the application " "cannot run. Please try to launch the application again. " "If that should still fail, please try reinstalling " "it, or visit https://support.mozilla.org/."); (void)ps->Alert(nullptr, title.get(), message.get()); } MOZ_CRASH("SQLite Version Error"); } - freeradius has a tighter dependency but at least is only a warning: if (sqlite3_libversion_number() != SQLITE_VERSION_NUMBER) { WARN("rlm_sql_sqlite: libsqlite version changed since the server was built"); WARN("rlm_sql_sqlite: linked: %s built: %s", sqlite3_libversion(), SQLITE_VERSION); }