Support compile static linux with GraalVM
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 20/100
Hướng nghiên cứu
Start with the linked native library directory, src/main/resources/org/sqlite/native/Linux/x86_64, and the GraalVM compile example linked in the issue. Investigate how that Linux library is built and why the static binary cannot load it; the issue gives a runtime error but no build steps or test to run. Done means a statically compiled Linux binary can load sqlite-jdbc and open a connection.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
@xerial I could make my Clojure app using sqlite compile with Graalvm for Windows/Linux/MacOS successfully here, but when compiling a Linux static binary, it doesn't work, it seems that the shipped sqlite lib is not static linked, but dynamic linked.
Running the static binary I get:
Failed to load native library:sqlite-unknown-5db626ec-518e-4fc0-a5f6-a21818a0c5c8-libsqlitejdbc.so. osinfo: Linux/x86_64
java.lang.UnsatisfiedLinkError: Can't load library: /tmp/sqlite-unknown-5db626ec-518e-4fc0-a5f6-a21818a0c5c8-libsqlitejdbc.so
Exception in thread "main" java.sql.SQLException: Error opening connection
at org.sqlite.SQLiteConnection.open(SQLiteConnection.java:239)
at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:61)
at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:28)
at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:21)
at org.sqlite.JDBC.createConnection(JDBC.java:115)
at org.sqlite.JDBC.connect(JDBC.java:90)
at java.sql.DriverManager.getConnection(DriverManager.java:677)
at java.sql.DriverManager.getConnection(DriverManager.java:189)
at next.jdbc.connection$get_driver_connection.invokeStatic(connection.clj:141)
at next.jdbc.connection$url_PLUS_etc$reify__747.getConnection(connection.clj:357)
at next.jdbc.connection$make_connection.invokeStatic(connection.clj:385)
at next.jdbc.connection$fn__760.invokeStatic(connection.clj:406)
at next.jdbc.connection$fn__760.invoke(connection.clj:406)
at next.jdbc.protocols$fn__563$G__558__570.invoke(protocols.clj:24)
at next.jdbc.connection$fn__764.invokeStatic(connection.clj:415)
at next.jdbc.connection$fn__764.invoke(connection.clj:406)
at next.jdbc.protocols$fn__563$G__558__570.invoke(protocols.clj:24)
at next.jdbc$get_connection.invokeStatic(jdbc.clj:155)
at sqlite_graalvm_sample.core$insert.invokeStatic(core.clj:15)
at sqlite_graalvm_sample.core$_main.invokeStatic(core.clj:36)
at sqlite_graalvm_sample.core$_main.doInvoke(core.clj:36)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at sqlite_graalvm_sample.core.main(Unknown Source)
Caused by: java.lang.Exception: No native library found for os.name=Linux, os.arch=x86_64, paths=[/org/sqlite/native/Linux/x86_64]
at org.sqlite.SQLiteJDBCLoader.loadSQLiteNativeLibrary(SQLiteJDBCLoader.java:367)
at org.sqlite.SQLiteJDBCLoader.initialize(SQLiteJDBCLoader.java:67)
at org.sqlite.core.NativeDB.load(NativeDB.java:63)
at org.sqlite.SQLiteConnection.open(SQLiteConnection.java:235)
... 24 more
Is that possible to build this lib statically to make that work?
- Ngôn ngữ chính
- Java
- Star
- 3.3k
- Fork
- 676
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 18
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của xerial/sqlite-jdbc
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
xerial/sqlite-jdbc#1515 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
xerial/sqlite-jdbc#1514 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
xerial/sqlite-jdbc#1513 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
xerial/sqlite-jdbc#1512 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
SIGSEGV (exit 134) in bundled `rightstr()` when the length argument is a large negative numberCó thể đã có người làm @sarthakdev143-lite đã nhận 2 ngày trước. Đang mởhelp wanted impacts:JNI
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 38/100
xerial/sqlite-jdbc#1508 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của xerial/sqlite-jdbc
Issue tương tự
-
hermes-queue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
chrisalunlloyd2-sudo/mindpalace#403 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Area/Configuration Type/Improvement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ballerina-platform/static-code-analysis-tool#217 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
SequenceEncoder: a value ending with a backslash swallows the tokens after it (“No state for trait”)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
vassalengine/vassal#15337 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
eclipse-dirigible/dirigible#8636 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug severity-medium XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
nikolas-charalambidis/facepalm-maven-plugin#291 ·
Maintainer thường phản hồi trong vòng 1 ngày