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

librobolectric-nativeruntime.so depends on GLIBC_2.29 causing SQLite tests failures #7879

Closed
ZSmallX opened this issue Dec 21, 2022 · 5 comments

Comments

@ZSmallX
Copy link
Contributor

ZSmallX commented Dec 21, 2022

Description

I tried to upgrade Robolectric from 4.8.2 to 4.9.1. And got the bellowing SQLite test failures. These tests are passed in 4.8.2.

java.lang.UnsatisfiedLinkError: /tmp/5453719588885568165librobolectric-nativeruntime.so: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by /tmp/5453719588885568165librobolectric-nativeruntime.so)
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2430)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2487)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2684)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2617)
at java.base/java.lang.Runtime.load0(Runtime.java:765)
at java.base/java.lang.System.load(System.java:1835)
at org.robolectric.nativeruntime.DefaultNativeRuntimeLoader.lambda$ensureLoaded$0(DefaultNativeRuntimeLoader.java:70)
at org.robolectric.util.PerfStatsCollector.measure(PerfStatsCollector.java:86)
at org.robolectric.nativeruntime.DefaultNativeRuntimeLoader.ensureLoaded(DefaultNativeRuntimeLoader.java:60)
at org.robolectric.nativeruntime.DefaultNativeRuntimeLoader.injectAndLoad(DefaultNativeRuntimeLoader.java:40)
at org.robolectric.shadows.ShadowNativeSQLiteConnection.nativeOpen(ShadowNativeSQLiteConnection.java:26)
at org.robolectric.shadows.ShadowNativeSQLiteConnection.nativeOpen(ShadowNativeSQLiteConnection.java:50)
at android.database.sqlite.SQLiteConnection.nativeOpen(SQLiteConnection.java)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:211)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:195)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:503)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:204)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:196)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:880)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:865)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:739)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:729)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:355)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:298)
at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(FrameworkSQLiteOpenHelper.java:96)
at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.java:54)
at com.my.sdk.common.data.manager.base.MigrationTest.test fresh init should have correct tables(DatabaseMigrationTest.kt:109)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.robolectric.RobolectricTestRunner$HelperTestRunner$1.evaluate(RobolectricTestRunner.java:580)
at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$2(SandboxTestRunner.java:287)
at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:99)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)

Steps to Reproduce

Using Robolectric 4.9.1.

Robolectric & Android Version

Robolectric: 4.9.1.
Android: compileSdkVersion 31
OS: Linux CentOS 7

Link to a public git repo demonstrating the problem:

None.

Any ideas or similar problems?

@utzcoz
Copy link
Member

utzcoz commented Dec 21, 2022

It might be related to 4c16132. @hoisie Do you download nativeruntime so files from latest master's action result?

@dellisd
Copy link

dellisd commented Dec 21, 2022

I think SQLDelight might be affected by this issue as well, although the stacktrace in the failed action logs don't have quite as much detail.
cashapp/sqldelight#3741

@hoisie
Copy link
Contributor

hoisie commented Dec 28, 2022

Just released 4.9.2 which should fix this issue.

@utzcoz
Copy link
Member

utzcoz commented Dec 28, 2022

@dellisd Looks like cashapp/sqldelight#3741 has been merged because of 4.9.2 fixes this issue for sqldelight.

@ZSmallX
Copy link
Contributor Author

ZSmallX commented Dec 28, 2022

Yeah, it works for me. Appreciated!

@ZSmallX ZSmallX closed this as completed Dec 28, 2022
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

No branches or pull requests

4 participants