haskellPackages.llvm-ffi cannot be built because it cannot find the path of libLLVM-13.so.
Steps To Reproduce
nixpkgs$ nix-build --no-out-link -A haskellPackages.llvm-ffi --arg config '{ allowBroken = true; }'
...
Setup: Missing dependency on a foreign library:
* Missing (or bad) C library: LLVM-13
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
library file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
builder for '/nix/store/nkqrqsabj1s309abk5mld46vg0w802bk-llvm-ffi-13.0.drv' failed with exit code 1
error: build of '/nix/store/nkqrqsabj1s309abk5mld46vg0w802bk-llvm-ffi-13.0.drv' failed
Idea for solution
When working with Cabal I would solve this problem by adding the options
--extra-include-dirs=$(llvm-config-13 --includedir) --extra-lib-dirs=$(llvm-config-13 --libdir)
or adding equivalent lines to a cabal.project.local file.
How can I achieve this in Nix?
What do I have to add to haskell-modules/configuration-common.nix?
Notify maintainers
@maralorn @sternenseemann
I have already asked about the problem at Discourse:
https://discourse.nixos.org/t/manually-setting-extra-include-dirs-and-extra-lib-dirs-for-haskell-cabal-packages/16222
Metadata
$ nix-channel --list
nixos https://nixos.org/channels/nixos-21.05
nixpkgs https://nixos.org/channels/nixos-21.05
But the problem still occurs in the current release (22.11).
haskellPackages.llvm-fficannot be built because it cannot find the path of libLLVM-13.so.Steps To Reproduce
Idea for solution
When working with Cabal I would solve this problem by adding the options
or adding equivalent lines to a
cabal.project.localfile.How can I achieve this in Nix?
What do I have to add to
haskell-modules/configuration-common.nix?Notify maintainers
@maralorn @sternenseemann
I have already asked about the problem at Discourse:
https://discourse.nixos.org/t/manually-setting-extra-include-dirs-and-extra-lib-dirs-for-haskell-cabal-packages/16222
Metadata
But the problem still occurs in the current release (22.11).