Skip to content

Missing libresvg.a for musl - Compilation Blocker for usql on Alpine or Nix builds #1

Description

@JuryA

The static library libresvg.a is missing for the musl libc environment, causing significant build issues for projects that depend on resvg, such as usql. Additionally, this issue disrupts Nix builds, as noted in xo/usql#494

Problem Description:

  • The dependency on libresvg.a is incompatible with musl, resulting in failed builds in musl-based environments (e.g., Alpine Linux).
  • This issue also affects Nix builds, as outlined in the referenced issue. The combination of these problems creates significant obstacles for compiling dependent projects across various environments.

Steps to Reproduce:

  1. Use a musl-based environment (e.g., Alpine Linux).
  2. Attempt to compile a project that depends on resvg, such as usql.
  3. Observe the failure caused by the absence of libresvg.a.
  4. Alternatively, attempt to build usql using Nix and encounter the same issue (see Build breaks on arm64, armv7, i386: undefined reference to `resvg_parse_tree_from_data' usql#494).

Expected Behavior:

  • The build process should successfully compile the project by including a musl-compatible version of libresvg.a.
  • Nix builds should proceed without errors stemming from the missing dependency.

Actual Behavior:

  • Compilation fails with errors indicating the absence of libresvg.a in musl environments.
  • Nix builds are similarly disrupted, further exacerbating the issue.

Proposed Solution:

  • Provide a precompiled musl-compatible version of libresvg.a.
  • Ensure compatibility with Nix builds, potentially by bundling the required static library or generating it dynamically during the build process.

Environment:

  • OS: musl-based (e.g., Alpine Linux)
  • Build Tool: Nix
  • Project: usql
  • Dependency: resvg

This enhancement is critical to restoring build compatibility in musl environments and with Nix. Resolving this issue will unblock a broader range of use cases and enable smoother integration with dependent projects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions