SQLite Forum

3.25 math functions vs. extension-functions.c
Login
I'm guessing that you started seeing those error with the 3.35.0 release.

Yes, the SQLite library has had, since version 3.35.0 as a compile-time option, a set of SQL functions that can also be found in extensions. And, yes, this could create build-time issues due to name collisions.

What is the proper way to cope with such issues?
 
You mention "the extension-functions.c" as if it is especially relevant. I cannot find it in the SQLite source repository or mentioned in the project documentation. I remember that there was a contributed files page at sqlite.org awhile ago, but I can no longer find it. I also remember that the collection was quite dated, so I am not surprised that it goes unmentioned in the site docs now.

People who wish to use their old extension code (whether obtained from sqlite.org long ago or elsewhere) can compile the SQLite library to leave out most/all of the functions added in version 3.35.0, or they can remove like-named and/or duplicative functions from their extensions. Either way would be effective and proper, IMO.

On your compilation errors:

The name collision causes a short cascade of errors. First, the local signFunc() function fails to compile, which is a legitimate compiler response to a duplicate definition. Second, an array of function pointers, initialized to include a pointer to the signFunc() function which failed to compile, cannot have its sizeof taken. This too is a reasonable compiler response, even if not strictly necessary. The solution is to avoid name collisions and duplicate definitions.