Skip to content

Haskell binaries with excessive closure sizes on aarch64-darwin #318013

@sternenseemann

Description

@sternenseemann

As you may remember from #140774, GHC on aarch64-darwin can't properly eliminate dead code, leading to a lot of references if Paths_ modules are involved that may not be necessary.

A common case is that binaries that depend on other libraries that use a Paths_ module will incur a reference on that library's out path despite being statically linked against the library (even though the reference itself is dead code). On other platforms (even x86_64-darwin) GHC is able to eliminate such references, but not on aarch64-darwin. For such packages, justStaticExecutables is practically useless since GHC is pulled in transitively.

@9999years has contributed an extra check to justStaticExecutables which prevents this scenario (#304352). As a consequence, a few packages are broken on aarch64-darwin. In the interest of landing the bundled changes from haskell-updates soon, I'll disable justStaticExecutables for the following packages on aarch64-darwin since it wasn't doing much anyways:

This will take effect when #315167 is merged.

Maintainers are encouraged to submit a workaround for the issue on aarch64-darwin via remove-references-to (which seems to be the only solution at the moment) and to reenable justStaticExecutables. Examples for such fixes are:

Please make sure these fixes are conditional to aarch64-darwin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: enhancementAdd something new or improve an existing system.2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md3.skill: sprintableA larger issue which is split into distinct actionable tasks5.scope: trackingLong-lived issue tracking long-term fixes or multiple sub-problems6.topic: darwinRunning or building packages on Darwin6.topic: haskellGeneral-purpose, statically typed, purely functional programming language

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions