Skip to content
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

check: Add step to install libsqlite3-dev system dependency #999

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

Conversation

rajveermalviya
Copy link
Collaborator

The package:sqlite3 requires the system-installed sqlite3 shared library (libsqlite3.so) when running directly via Dart, on Linux. Whereas, when running under Flutter, it uses bundled libraries provided by package:sqlite3_flutter_libs.

Recently, the ubuntu-latest runner image has switched to defaulting to ubuntu-24.04:
actions/runner-images#10636
Previously, it used ubuntu-22.04, which had the libsqlite3-dev package pre-installed:
https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#installed-apt-packages
However, the ubuntu-24.04 image no longer includes this package by default:
https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md#installed-apt-packages

As a result, five unit tests now fail with the following error:

Invalid argument(s): Failed to load dynamic library 'libsqlite3.so': libsqlite3.so: cannot open shared object file: No such file or directory
  dart:ffi                                                        new DynamicLibrary.open
  package:sqlite3/src/ffi/load_library.dart 52:27                 _defaultOpen
  package:sqlite3/src/ffi/load_library.dart 127:12                OpenDynamicLibrary.openSqlite
  package:sqlite3/src/ffi/api.dart 13:39                          sqlite3
  package:drift/native.dart 313:12                                _NativeDelegate.openDatabase
  package:drift/src/sqlite3/database.dart 79:19                   Sqlite3Delegate.open
  package:drift/src/runtime/executor/helpers/engines.dart 431:22  DelegatedDatabase.ensureOpen.<fn>

To resolve these test failures, add a step to manually install the libsqlite3-dev package.

The `package:sqlite3` requires the system-installed sqlite3 shared
library (`libsqlite3.so`) when running directly via Dart, on Linux.
Whereas, when running under Flutter, it uses bundled libraries provided
by `package:sqlite3_flutter_libs`.

Recently, the `ubuntu-latest` runner image has switched to defaulting to
`ubuntu-24.04`:
  actions/runner-images#10636
Previously, it used `ubuntu-22.04`, which had the `libsqlite3-dev`
package pre-installed:
  https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#installed-apt-packages
However, the `ubuntu-24.04` image no longer includes this package by
default:
  https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md#installed-apt-packages

As a result, five unit tests now fail with the following error:
  Invalid argument(s): Failed to load dynamic library 'libsqlite3.so': libsqlite3.so: cannot open shared object file: No such file or directory
    dart:ffi                                                        new DynamicLibrary.open
    package:sqlite3/src/ffi/load_library.dart 52:27                 _defaultOpen
    package:sqlite3/src/ffi/load_library.dart 127:12                OpenDynamicLibrary.openSqlite
    package:sqlite3/src/ffi/api.dart 13:39                          sqlite3
    package:drift/native.dart 313:12                                _NativeDelegate.openDatabase
    package:drift/src/sqlite3/database.dart 79:19                   Sqlite3Delegate.open
    package:drift/src/runtime/executor/helpers/engines.dart 431:22  DelegatedDatabase.ensureOpen.<fn>

To resolve these test failures, add a step to manually install the
`libsqlite3-dev` package.
@rajveermalviya
Copy link
Collaborator Author

Well, just as I was putting this PR up, it looks like the ubuntu-latest == ubuntu-24.04 rollout is being rolled back:
actions/runner-images#10636 (comment)

fun 😄

@fombalang
Copy link

Well, just as I was putting this PR up, it looks like the ubuntu-latest == ubuntu-24.04 rollout is being rolled back: actions/runner-images#10636 (comment)

fun 😄

Oh, I was wondering why some test suddenly failed on the pipeline when I sent in my PR.

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.

2 participants