Skip to content

Change of Linux build image to Ubuntu 20.04 breaks libe_sqlite3.so compatibility with older distros #27

Description

@rosenqui-cysiv

Just ran into this after upgrading SQLitePCL and wanted to point this out for posterity.

The change last May that updated the GitHub build image to use Ubuntu 20.04 breaks binary compatibility with older distros that don't have GLIBC >= 2.28. Those include Amazon2, CentOS/RedHat/Oracle 7.X, Ubuntu 18.04, SuSE 12SP5, etc.

When trying to use SQLitePCL, one runs into errors like this:

System.TypeInitializationException: The type initializer for 'SQLite.SQLiteConnection' threw an exception.
 ---> System.DllNotFoundException: Unable to load shared library 'e_sqlite3' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: 
/opt/vendor/product/e_sqlite3.so: cannot open shared object file: No such file or directory
/lib64/libc.so.6: version `GLIBC_2.28' not found (required by /opt/vendor/product/libe_sqlite3.so)
libe_sqlite3.so: cannot open shared object file: No such file or directory
/opt/vendor/product/e_sqlite3: cannot open shared object file: No such file or directory
/opt/vendor/product/libe_sqlite3: cannot open shared object file: No such file or directory

   at SQLitePCL.SQLite3Provider_e_sqlite3.NativeMethods.sqlite3_libversion_number()
   at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number()
   at SQLitePCL.raw.SetProvider(ISQLite3Provider imp)
   at SQLitePCL.Batteries_V2.Init()
   at SQLite.SQLiteConnection..cctor()
   --- End of inner exception stack trace ---
   at SQLite.SQLiteConnection..ctor(String databasePath, Boolean storeDateTimeAsTicks)

The Ubuntu 18.04 runner is no longer available on GitHub, so there isn't really a good fix for this unless there's an easy way to target an older GLIBC when compiling on Ubuntu 20.04.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions