Skip to content

Android failed to load libduckdb.so - empty/missing DT_HASH/DT_GNU_HASH #17853

@aprock

Description

@aprock

What happens?

When trying to load the duckdb nightly on Android 35 devices, I get the following error message.

Exception: Invalid argument(s): Failed to load dynamic library 'libduckdb.so': dlopen failed: empty/missing DT_HASH/DT_GNU_HASH in "/data/app/~~vbZRoXQ-AnRceuFF28_2AA==/com.example.duckdbexplorer-t5aPzYKlxuvUyuo0cEXh7Q==/lib/arm64/libduckdb.so" (new hash type from the future?)

I grabbed the nightly build from here.

This is caused by a change in required page sizes supported for Android.

16 KB Google Play compatibility requirement.

This is supported in ndk27.

Android V will allow OEMs to ship arm64-v8a devices with 16KiB page sizes. Devices that use this configuration will not be able to run existing apps that use native code. To be compatible with these devices, applications will need to rebuild all their native code to be 16KiB aligned, and rewrite any code which assumes a specific page size. ndk-build and CMake have options to enable this mode (see note about APP_SUPPORT_FLEXIBLE_PAGE_SIZES and ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES below). A future version of the NDK will enable this mode by default. If you're using or maintaining a third-party build system, consult the build system maintainers guide for instructions.

To Reproduce

to reproduce, load the current nightly android build into an Android 35 device/emulator.

OS:

android

DuckDB Version:

1.3.0

DuckDB Client:

dart

Hardware:

No response

Full Name:

Andy Prock

Affiliation:

TigerEye

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a nightly build

Did you include all relevant data sets for reproducing the issue?

Yes

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?

  • Yes, I have

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR submittedA pull request was submitted to fix the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions