Skip to content

haskellPackages.llvm-ffi: always use default LLVM version#439264

Merged
wolfgangwalther merged 1 commit intoNixOS:masterfrom
wolfgangwalther:haskell-llvm-ffi
Sep 1, 2025
Merged

haskellPackages.llvm-ffi: always use default LLVM version#439264
wolfgangwalther merged 1 commit intoNixOS:masterfrom
wolfgangwalther:haskell-llvm-ffi

Conversation

@wolfgangwalther
Copy link
Contributor

@wolfgangwalther wolfgangwalther commented Sep 1, 2025

The previous approach of selecting the highest possible LLVM version brought complications, especially when the latest LLVM release candidate was properly released and the llvm-ffi version on master didn't support this, yet. This would result in an eval failure that was impossible to properly solve on master.

We only introduced the logic of selecting the latest LLVM version, because we didn't know about the cabal flags supporting lower LLVM versions at first. We then stuck with this approach. However, we can also just always use the default LLVM version that is present in llvmPackages. This is more in the spirit of a default version anyway.

This will not result in any eval failures / warnings. There is only one failure mode: haskellPackages.llvm-ffi not supporting the new default LLVM version. In this case it's perfectly fine to wait for an update of llvm-ffi via haskell-updates.

Targeting master to unblock #437137 properly, hopefully without creating merge conflicts.

Things done


Add a 👍 reaction to pull requests you find important.

The previous approach of selecting the highest possible LLVM version
brought complications, especially when the latest LLVM release candidate
was properly released and the llvm-ffi version on master didn't support
this properly, yet. This would result in an eval failure that was
impossible to properly solve on master.

We only introduced the logic of selecting the latest LLVM version,
because we didn't know about the cabal flags supporting lower LLVM
versions at first. We then stuck with this approach. However, we can
also just always use the default LLVM version that is present in
`llvmPackages`. This is more in the spirit of a *default* version
anyway.

This will not result in any eval failures / warnings. There is only one
failure mode: `haskellPackages.llvm-ffi` not supporting the new default
LLVM version. In this case it's perfectly fine to wait for an update of
llvm-ffi via `haskell-updates`.
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 6.topic: haskell General-purpose, statically typed, purely functional programming language labels Sep 1, 2025
@nix-owners nix-owners bot requested a review from maralorn September 1, 2025 17:32
@wolfgangwalther
Copy link
Contributor Author

wolfgangwalther commented Sep 1, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 439264
Commit: c4a5576f7bdd10916321d8d580881368f7fe9f85


x86_64-linux

✅ 3 packages built:
  • haskellPackages.llvm-ffi
  • haskellPackages.llvm-ffi.doc
  • haskellPackages.llvm-tf

aarch64-linux

✅ 3 packages built:
  • haskellPackages.llvm-ffi
  • haskellPackages.llvm-ffi.doc
  • haskellPackages.llvm-tf

x86_64-darwin

❌ 1 package failed to build:
  • haskellPackages.llvm-tf
✅ 2 packages built:
  • haskellPackages.llvm-ffi
  • haskellPackages.llvm-ffi.doc

aarch64-darwin

❌ 1 package failed to build:
  • haskellPackages.llvm-tf
✅ 2 packages built:
  • haskellPackages.llvm-ffi
  • haskellPackages.llvm-ffi.doc

Error logs: `x86_64-darwin`
haskellPackages.llvm-tf
    To import instances alone, use: import Control.Applicative()
   |
49 | import Control.Applicative (liftA2, pure, (<$>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

private/LLVM/ExecutionEngine/Marshal.hs:56:50: warning: [GHC-38856] [-Wunused-imports]
The import of ‘Word’ from module ‘Data.Word’ is redundant
|
56 | import Data.Word (Word8, Word16, Word32, Word64, Word)
| ^^^^

private/LLVM/ExecutionEngine/Marshal.hs:222:54: warning: [GHC-62161] [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a lambda abstraction: Patterns of type ‘[a]’ not matched: []
|
222 | MS.evalState $ Trav.sequence $ pure $ MS.state $ (y:ys) -> (y,ys)
| ^^^^^^^^^^^^^^^^^
ld: framework not found vecLib
clang: error: linker command failed with exit code 1 (use -v to see invocation)
cc' failed in phase Linker'. (Exit code: 1)


Error logs: `aarch64-darwin`
haskellPackages.llvm-tf
    To import instances alone, use: import Control.Applicative()
   |
49 | import Control.Applicative (liftA2, pure, (<$>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

private/LLVM/ExecutionEngine/Marshal.hs:56:50: warning: [GHC-38856] [-Wunused-imports]
The import of ‘Word’ from module ‘Data.Word’ is redundant
|
56 | import Data.Word (Word8, Word16, Word32, Word64, Word)
| ^^^^

private/LLVM/ExecutionEngine/Marshal.hs:222:54: warning: [GHC-62161] [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a lambda abstraction: Patterns of type ‘[a]’ not matched: []
|
222 | MS.evalState $ Trav.sequence $ pure $ MS.state $ (y:ys) -> (y,ys)
| ^^^^^^^^^^^^^^^^^
ld: framework not found vecLib
clang: error: linker command failed with exit code 1 (use -v to see invocation)
cc' failed in phase Linker'. (Exit code: 1)


haskellPackages.llvm-tf seems to be already broken on master for darwin, so that's not a regression.

Copy link
Member

@emilazy emilazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes me happy, thank you!

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Sep 1, 2025
@wolfgangwalther wolfgangwalther merged commit bbf2f9d into NixOS:master Sep 1, 2025
37 of 40 checks passed
@wolfgangwalther wolfgangwalther deleted the haskell-llvm-ffi branch September 1, 2025 18:48
@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants