Skip to content

install-c-lib download a libduckdb.so "incompatible" with Alpine #53

@bicf

Description

@bicf

Alpine (amd64) do not use glibc. Use instead musl libc, and the downloaded (linux-amd64) libduckdb.so is not compatible.

Alpine offer "native" duckDb binaries:

echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
apk add --no-cache duckdb duckdb-dev

furthermore is not possible to set 2 different path (one for the header and one for the library) in Saturio\DuckDB\FFI\FindLibrary :

    private static function headerPath(): string
    {
        return implode(DIRECTORY_SEPARATOR, [self::path(), 'duckdb-ffi.h']);
    }

    /**
     * @throws NotSupportedException
     */
    private static function libPath(): string
    {
        $file = PlatformInfo::getPlatformInfo()['file'];

        return implode(DIRECTORY_SEPARATOR, [self::path(), $file]);
    }

    private static function path(): string
    {
        return
            self::getConfiguredDuckdbPath()
            ?? self::defaultPath();
    }

With a (optional) dedicated-to-lib-path environment variable the code can refer to the system library.

System libduckdb.so works well.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions