Skip to content

Commit

Permalink
haskellPackages.lukko: fix ofd locking on 32bit Linux platforms
Browse files Browse the repository at this point in the history
Quoting the patch:

> Previously, OFD locking was broken on 32-bit, because it would somehow
> end up using the 64-bit fcntl() function, but pass it 32-bit off_t
> values in struct flock.  To fix this, tell libc to use always use
> 64-bit file offsets.
>
> This is the same fix that was applied for a similar issue in GHC.

(cherry picked from commit 4ba7115)
  • Loading branch information
sternenseemann authored and github-actions[bot] committed Jan 10, 2025
1 parent 362878b commit 5350a90
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkgs/development/haskell-modules/configuration-common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,16 @@ self: super: {
ghc-datasize = disableLibraryProfiling super.ghc-datasize;
ghc-vis = disableLibraryProfiling super.ghc-vis;

# Fix 32bit struct being used for 64bit syscall on 32bit platforms
# https://github.com/haskellari/lukko/issues/15
lukko = appendPatches [
(fetchpatch {
name = "lukko-ofd-locking-32bit.patch";
url = "https://github.com/haskellari/lukko/pull/32/commits/4e69ffad996c3771f50017b97375af249dd17c85.patch";
sha256 = "0n8vig48irjz0jckc20dzc23k16fl5hznrc0a81y02ms72msfwi1";
})
] super.lukko;

# Fixes compilation for basement on i686 for GHC >= 9.4
# https://github.com/haskell-foundation/foundation/pull/573
# Patch would not work for GHC >= 9.2 where it breaks compilation on x86_64
Expand Down

0 comments on commit 5350a90

Please sign in to comment.