-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Haskell binaries with excessive closure sizes on aarch64-darwin #318013
Copy link
Copy link
Open
Labels
0.kind: enhancementAdd something new or improve an existing system.Add something new or improve an existing system.2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md3.skill: sprintableA larger issue which is split into distinct actionable tasksA larger issue which is split into distinct actionable tasks5.scope: trackingLong-lived issue tracking long-term fixes or multiple sub-problemsLong-lived issue tracking long-term fixes or multiple sub-problems6.topic: darwinRunning or building packages on DarwinRunning or building packages on Darwin6.topic: haskellGeneral-purpose, statically typed, purely functional programming languageGeneral-purpose, statically typed, purely functional programming language
Metadata
Metadata
Assignees
Labels
0.kind: enhancementAdd something new or improve an existing system.Add something new or improve an existing system.2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md3.skill: sprintableA larger issue which is split into distinct actionable tasksA larger issue which is split into distinct actionable tasks5.scope: trackingLong-lived issue tracking long-term fixes or multiple sub-problemsLong-lived issue tracking long-term fixes or multiple sub-problems6.topic: darwinRunning or building packages on DarwinRunning or building packages on Darwin6.topic: haskellGeneral-purpose, statically typed, purely functional programming languageGeneral-purpose, statically typed, purely functional programming language
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
In Progress
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'soutpath 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,justStaticExecutablesis practically useless since GHC is pulled in transitively.@9999years has contributed an extra check to
justStaticExecutableswhich prevents this scenario (#304352). As a consequence, a few packages are broken on aarch64-darwin. In the interest of landing the bundled changes fromhaskell-updatessoon, I'll disablejustStaticExecutablesfor 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.