Skip to content

Builds fail when built with musl #75

@odrling

Description

@odrling

Builds fail when built with musl libc while calling the karaberus executable to generate the openapi spec.
The executable segfaults on startup due to golang/go#13492.
There is apparently no known workaround.

Building with c-archive has been the most stable way I've found to build the project with meson, because then the final executable is just a C program that links to our dependencies and the karaberus go library which is fairly easy and straightforward.

I was slightly surprised that the cli args "just worked" when building with c-archive, and it's sad that we now pay the cost in portability.

Quick Dockerfile/Containerfile to reproduce the issue on Alpine:

FROM alpine
RUN apk add go gcc npm meson musl-dev libass-dev ffmpeg-dev git
RUN git clone https://github.com/Japan7/karaberus /karaberus
RUN meson setup /build /karaberus -Dtest=false -Ds3_tests=disabled && meson compile -C /build

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions