Build Issue with ROOT 6.16.00 (SQLite3)

Hi,

I recently attempted to build ROOT 6.16.00 and the compilation failed with the following messages:

With gcc 6.3.0:

[ 91%] Built target Unfold
[ 91%] Building CXX object tree/dataframe/CMakeFiles/ROOTDataFrame.dir/src/RSqliteDS.cxx.o
root/gcc_6.3.0/6.16.00/source/tree/dataframe/src/RSqliteDS.cxx: In destructor ‘virtual ROOT::RDF::RSqliteDS::~RSqliteDS()’:
root/gcc_6.3.0/6.16.00/source/tree/dataframe/src/RSqliteDS.cxx:480:34: error: ‘sqlite3_close_v2’ was not declared in this scope
    sqlite3_close_v2(fDataSet->fDb);
                                  ^
root/gcc_6.3.0/6.16.00/source/tree/dataframe/src/RSqliteDS.cxx: In member function ‘void ROOT::RDF::RSqliteDS::SqliteError(int)’:
root/gcc_6.3.0/6.16.00/source/tree/dataframe/src/RSqliteDS.cxx:632:36: error: ‘sqlite3_errstr’ was not declared in this scope
    errmsg += sqlite3_errstr(errcode);
                                    ^
make[2]: *** [tree/dataframe/CMakeFiles/ROOTDataFrame.dir/src/RSqliteDS.cxx.o] Error 1
make[1]: *** [tree/dataframe/CMakeFiles/ROOTDataFrame.dir/all] Error 2
make: *** [all] Error 2

With gcc 8.1.0:

[ 91%] Built target Unfold
[ 91%] Building CXX object tree/dataframe/CMakeFiles/ROOTDataFrame.dir/src/RSqliteDS.cxx.o
root/gcc_8.1.0/6.16.00/source/tree/dataframe/src/RSqliteDS.cxx: In destructor ‘virtual ROOT::RDF::RSqliteDS::~RSqliteDS()’:
root/gcc_8.1.0/6.16.00/source/tree/dataframe/src/RSqliteDS.cxx:480:4: error: ‘sqlite3_close_v2’ was not declared in this scope
    sqlite3_close_v2(fDataSet->fDb);
    ^~~~~~~~~~~~~~~~
root/gcc_8.1.0/6.16.00/source/tree/dataframe/src/RSqliteDS.cxx:480:4: note: suggested alternative: ‘sqlite3_close’
    sqlite3_close_v2(fDataSet->fDb);
    ^~~~~~~~~~~~~~~~
    sqlite3_close
root/gcc_8.1.0/6.16.00/source/tree/dataframe/src/RSqliteDS.cxx: In member function ‘void ROOT::RDF::RSqliteDS::SqliteError(int)’:
root/gcc_8.1.0/6.16.00/source/tree/dataframe/src/RSqliteDS.cxx:632:14: error: ‘sqlite3_errstr’ was not declared in this scope
    errmsg += sqlite3_errstr(errcode);
              ^~~~~~~~~~~~~~
root/gcc_8.1.0/6.16.00/source/tree/dataframe/src/RSqliteDS.cxx:632:14: note: suggested alternative: ‘sqlite3_errmsg’
    errmsg += sqlite3_errstr(errcode);
              ^~~~~~~~~~~~~~
              sqlite3_errmsg
make[2]: *** [tree/dataframe/CMakeFiles/ROOTDataFrame.dir/src/RSqliteDS.cxx.o] Error 1
make[1]: *** [tree/dataframe/CMakeFiles/ROOTDataFrame.dir/all] Error 2
make: *** [all] Error 2

Any suggestions on how to proceed?

Thanks


ROOT Version: 6.16.00
Platform: RHEL6
Compiler: gcc 6.30 & gcc 8.1.0


1 Like

If you are on RHEL 6, your SQLite version is probably too old for ROOT. What version do you have? I think that you will have to disable SQLite to be able to proceed, or install a recent version manually somewhere. Cheers,

I’m running SQLite 3.6.20. This worked with no issue on ROOT 6.14.06, was there a recent change? I suppose the CMake file needs to be updated to check the SQLite version. Disabling sqlite with -Dsqlite=OFF resolves the issue.

Yes, the recent change was the addition of the SQLite data source for RDataFrame, which is what gives you the compilation failure. Just for comparison, on my machine I have SQLite 3.26.0.

RDataFrame will still work though? I will just be unable to use the SQLite data source?

Correct, you just won’t get the SQLite data source, but RDataFrame will still work fine.

I don’t seem to see an obvious place where the minimum version for SQLite3 is set in the CMake files.

Yes, 3.x should have been enough, we need to find out which version is the minimum and check for at least that version. I will try to search the documentation for when the functions you cannot compile were introduced.

Alternatively, you may be able to switch to the suggested functions.
sqlite3_errstr -> sqlite3_errmsg
sqlite3_close_v2 -> sqlite3_close

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.