Running driver on not officially supported platforms
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by tracing the cpuArch and osName entry points, the OVERRIDE_JDBC_OS_ARCH handling, and the plain duckdb_java loading path in DuckDBNative. Clarify which proposed strategy is wanted; done should allow the JDBC driver to run on an unsupported platform while preserving a useful original error if loading fails.
Written by the indexing model from the issue text.
Description
Description
It's not possible to run the driver on platforms that are not officially supported.
- Regardless of which version of
duckdb_jdbc_*is used, it callscpuArchandosNameunconditionally before it tries to load plainduckdb_java.
Each of them throwsIllegalStateExceptionif being run not on one of the hardcoded OS's / architectures. - There's
OVERRIDE_JDBC_OS_ARCHto enforce the correct arch for the native part, but there's no such option forOS_NAME.
I'd be happy to provide a PR for this.
Any ideas on how to address it?
From my side, I can see the below options.
Suggestions
For the native part
Introduce OVERRIDE_JDBC_OS_NAME.
Option 1 for the Java part (more generic)
Package a properties file that'd contain all the mappings between os.name / os.arch <-> OS / arch used by DuckDBNative, and load it in runtime.
It could contain all the officially supported platforms + extra platforms defined in build time / edited in pre-built jars.
E.g.
<...>
duckdb.os.arch.arm64 = aarch64,arm64
duckdb.os.name.linux = linux
<...>
It'd allow using the official build in the most flexible way.
Option 2 for the Java part (more conservative)
Catch IllegalStateException("Unsupported <...>"), try to load plain duckdb_java. If the latter fails, throw the original error.
Or something like this.
It'd allow using duckdb_jdbc-*-nolib.jar on such platforms.
Thank you.
- Dominant language
- C++
- Stars
- 127
- Forks
- 81
- Avg merge
- 7h 57m
- Merged PRs (30d)
- 38
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from duckdb/duckdb-java
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
duckdb/duckdb-java#832 · 2 comments ·
Maintainers usually reply within 1 day
-
Native SIGSEGV in DuckDB JDBC when repeatedly executing queries with window functions and LIMIT 0Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
duckdb/duckdb-java#871 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
duckdb/duckdb-java#872 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
duckdb/duckdb-java#837 ·
Maintainers usually reply within 1 day
-
executeBatch()` on a prepared INSERT runs s are ~1–2 orders of magnitude slower than the AppenderOpen
Difficulty 5/5 Over a week Newbie friendliness 42/100
duckdb/duckdb-java#815 · 1 comment ·
Maintainers usually reply within 1 day
All issues in duckdb/duckdb-java
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
espressif/esp-matter#1874 ·
-
cudev: Fix MSVC build failures with 64-bit integers (int64_t/uint64_t) in vec_traits.hppPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opencv/opencv_contrib#4231 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
MiSTer-devel/Main_MiSTer#1341 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
linux-test-project/lcov#552 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
Maintainers usually reply within 1 day