Skip to content

Always build TSQLite but accept unresolved symbols #19046

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

guitargeek
Copy link
Contributor

Always build TSQLite but accept unresolved symbols such that we can always build our SQLite interface without needing a build flag or to detect sqlite3 on the system.

The price for us is that we need to duplicate the used sqlite3 interface declarations in our repository, but this should be acceptable since the interface is stable.

The price for our users is that they need to explicitly link any library that uses TSQLite also against sqlite3, and if they use TSQLite in a macro they have to call gInterpreter->Load("libsqlite3.so").

It was checked that this works by running the TSQLite tutorials with this modification.

The goal of this commit is that we can still provide TSQLite to our users, but without any maintenance cost like additional build options.

@guitargeek guitargeek self-assigned this Jun 14, 2025
@guitargeek
Copy link
Contributor Author

Note that the question remains what we should do with the SQLite data source of RDF.

Always build TSQLite but accept unresolved symbols such that we can
always build our SQLite interface without needing a build flag or to
detect sqlite3 on the system.

The price for us is that we need to duplicate the used sqlite3 interface
declarations in our repository, but this should be acceptable since the
interface is stable.

The price for our users is that they need to explicitly link any library
that uses TSQLite also against `sqlite3`, and if they use TSQLite in a
macro they have to call `gInterpreter->Load("libsqlite3.so")`.

It was checked that this works by running the TSQLite tutorials with
this modification.

The goal of this commit is that we can still provide TSQLite to our
users, but without any maintenance cost like additional build options.
Copy link

Test Results

    18 files      18 suites   3d 7h 31m 4s ⏱️
 2 812 tests  2 812 ✅ 0 💤 0 ❌
49 416 runs  49 416 ✅ 0 💤 0 ❌

Results for commit f1642c9.

@linev
Copy link
Member

linev commented Jun 16, 2025

The price for our users is that they need to explicitly link any library that uses TSQLite
also against sqlite3, and if they use TSQLite in a macro they have to call gInterpreter->Load("libsqlite3.so").

But can we keep sqllite option and use such workaround only when normal library is not present?

@pcanal
Copy link
Member

pcanal commented Jun 16, 2025

The price for our users is that they need to explicitly link any library that uses TSQLite also against sqlite3, and if they use TSQLite in a macro they have to call gInterpreter->Load("libsqlite3.so").

This is an unusual requirement (for a plugin to also require explicitly loading the target library) and a regression/backward incompatibility ....

@@ -4,6 +4,6 @@
# For the licensing terms see $ROOTSYS/LICENSE.
# For the list of contributors see $ROOTSYS/README/CREDITS.

if(sqlite)
if(NOT MSVC)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why disabling sqlite on Windows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants