@Srid I am trying to build https://hackage.haskell.org/package/rings on GHC 9.8.1, I have a flake set up with haskell-flake
. I am trying to get singleton-bool
(used in the test suite of lukko
, a dependency of hackage-security
) to be version 0.1.7 (Hackage latest). but no matter what I do, including using jailbreak = true
for lukko
, overriding the source of singleton-bool
to be either github master
or hackage 0.1.7, or check = false
for lukko to avoid building the test suite altogether, my build fails building singleton-bool-0.1.6
flake.nix
here is the flake I'm using
I can't figure out why version 0.1.6 is getting built at all, but nix-output-monitor
shows it as a dependency of lukko
I know just enough nix to get myself into trouble, so I'm having trouble digging deeper into what's going on
Can you paste the build log?
sure, is there a way to make a collapsible text snippet in zulip?
Yes, via spoilers: https://zulip.com/help/format-your-message-using-markdown#spoilers
But you can use regular Markdown code blocks as well
build.log
I'll just do it as a file
Is that full build log? Can you paste the entire output of nix develop -L
or nix build -L
?
it's pretty close. let's try a spoiler block
warning: Git tree '/home/peddie/programming/rings' is dirty
singleton-bool> Running phase: setupCompilerEnvironmentPhase
singleton-bool> Build with /nix/store/0i135sf11k1vy8l181jkxamq18jfasjy-ghc-9.8.1.
singleton-bool> Running phase: unpackPhase
singleton-bool> unpacking source archive /nix/store/aya82ycp978lffwr5dhlxdikkihqjnp2-singleton-bool-0.1.6.tar.gz
singleton-bool> source root is singleton-bool-0.1.6
singleton-bool> setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file singleton-bool-0.1.6/src/Data/Singletons/Bool.hs
singleton-bool> Running phase: patchPhase
singleton-bool> Replace Cabal file with edited version from mirror://hackage/singleton-bool-0.1.6/revision/2.cabal.
singleton-bool> Running phase: compileBuildDriverPhase
singleton-bool> setupCompileFlags: -package-db=/build/tmp.z1b55ghRmQ/setup-package.conf.d -j16 +RTS -A64M -RTS -threaded -rtsopts
singleton-bool> [1 of 2] Compiling Main ( Setup.hs, /build/tmp.z1b55ghRmQ/Main.o )
singleton-bool> [2 of 2] Linking Setup
singleton-bool> Running phase: updateAutotoolsGnuConfigScriptsPhase
singleton-bool> Running phase: configurePhase
singleton-bool> configureFlags: --verbose --prefix=/nix/store/9shs4z4ym0wyqs8dks47r40a70rvhxrl-singleton-bool-0.1.6 --libdir=$prefix/lib/$compiler/lib --libsubdir=$abi/$libname --docdir=/nix/store/6qk15snibs3b47m51xv82gws889rz54a-singleton-bool-0.1.6-doc/share/doc/singleton-bool-0.1.6 --with-gcc=gcc --package-db=/build/tmp.z1b55ghRmQ/package.conf.d --ghc-options=-j16 +RTS -A64M -RTS --disable-split-objs --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --ghc-option=-split-sections --ghc-options=-haddock --extra-lib-dirs=/nix/store/2dla9whd0hgqi4ygywrmv933bs8w8k7m-ncurses-6.4/lib --extra-lib-dirs=/nix/store/npfpil5nswlaqy7y56dwp0csj91pjiyd-libffi-3.4.4/lib --extra-lib-dirs=/nix/store/qnlgnpvh94xw2j3pm5f02iw102lx6llc-elfutils-0.190/lib --extra-lib-dirs=/nix/store/b5r5rikbdpr6qs4wfm6dxz9dbrmyvps6-gmp-with-cxx-6.3.0/lib
singleton-bool> Using Parsec parser
singleton-bool> Configuring singleton-bool-0.1.6...
singleton-bool> CallStack (from HasCallStack):
singleton-bool> withMetadata, called at libraries/Cabal/Cabal/src/Distribution/Simple/Utils.hs:368:14 in Cabal-3.10.2.0-inplace:Distribution.Simple.Utils
singleton-bool> Error: Setup: Encountered missing or private dependencies:
singleton-bool> base >=4.7 && <4.18, deepseq >=1.3 && <1.5
error: build of '/nix/store/rp57ihgmwx4fjipapyjbrfi7pwq3hqjp-singleton-bool-0.1.6.drv' on 'ssh://danboduo' failed: builder for '/nix/store/rp57ihgmwx4fjipapyjbrfi7pwq3hqjp-singleton-bool-0.1.6.drv' failed with exit code 1
error: builder for '/nix/store/rp57ihgmwx4fjipapyjbrfi7pwq3hqjp-singleton-bool-0.1.6.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/jff2ylcbkn4byb32zjxagnymmb3wlqw6-lukko-0.1.1.3.drv' failed to build
error: 1 dependencies of derivation '/nix/store/h6w86zn4wbh60r69w6bb63jzpphcsk2p-cabal-install-3.10.2.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/2hpj5jfyjbm6d7fnkm29kqar2vmc2blv-source-connections-sdist.tar.gz.drv' failed to build
error: 1 dependencies of derivation '/nix/store/9z7krhisrzcykv08fsbnxnqnnkrm6cp9-source-rings-sdist.tar.gz.drv' failed to build
error: 1 dependencies of derivation '/nix/store/97z6rwvxqpm6w5dyahx7082vkg4fflg2-rings-0.2.drv' failed to build
I can do nom build
if you want to see the graph I was looking at
This one's better as it gives you a package stacktrace. Look at the last few lines:
singleton-bool
lukko
cabal-install
In your flake, if you set lukka.check = false;
it should disable building singleton-bool (assuming that's its test dependency)
The flake you attached above only sets lukko.jailbreak
(All jailbreak
does is make cabal disrespect the version constraints in dependencies)
yes -- same error when setting lukko.check = false
as I mentioned in the first message
Are you sure it is the exact same log lines as well (not just same error message)?
My guess is something else depends on singleton-bool, and you'll see this in the nix build log
no, I'm not sure, here is the output with lukko.check
set to false
singleton-bool> Running phase: setupCompilerEnvironmentPhase
singleton-bool> Build with /nix/store/0i135sf11k1vy8l181jkxamq18jfasjy-ghc-9.8.1.
singleton-bool> Running phase: unpackPhase
singleton-bool> unpacking source archive /nix/store/aya82ycp978lffwr5dhlxdikkihqjnp2-singleton-bool-0.1.6.tar.gz
singleton-bool> source root is singleton-bool-0.1.6
singleton-bool> setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file singleton-bool-0.1.6/src/Data/Singletons/Bool.hs
singleton-bool> Running phase: patchPhase
singleton-bool> Replace Cabal file with edited version from mirror://hackage/singleton-bool-0.1.6/revision/2.cabal.
singleton-bool> Running phase: compileBuildDriverPhase
singleton-bool> setupCompileFlags: -package-db=/build/tmp.zzip926rdA/setup-package.conf.d -j16 +RTS -A64M -RTS -threaded -rtsopts
singleton-bool> [1 of 2] Compiling Main ( Setup.hs, /build/tmp.zzip926rdA/Main.o )
singleton-bool> [2 of 2] Linking Setup
singleton-bool> Running phase: updateAutotoolsGnuConfigScriptsPhase
singleton-bool> Running phase: configurePhase
singleton-bool> configureFlags: --verbose --prefix=/nix/store/9shs4z4ym0wyqs8dks47r40a70rvhxrl-singleton-bool-0.1.6 --libdir=$prefix/lib/$compiler/lib --libsubdir=$abi/$libname --docdir=/nix/store/6qk15snibs3b47m51xv82gws889rz54a-singleton-bool-0.1.6-doc/share/doc/singleton-bool-0.1.6 --with-gcc=gcc --package-db=/build/tmp.zzip926rdA/package.conf.d --ghc-options=-j16 +RTS -A64M -RTS --disable-split-objs --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --ghc-option=-split-sections --ghc-options=-haddock --extra-lib-dirs=/nix/store/2dla9whd0hgqi4ygywrmv933bs8w8k7m-ncurses-6.4/lib --extra-lib-dirs=/nix/store/npfpil5nswlaqy7y56dwp0csj91pjiyd-libffi-3.4.4/lib --extra-lib-dirs=/nix/store/qnlgnpvh94xw2j3pm5f02iw102lx6llc-elfutils-0.190/lib --extra-lib-dirs=/nix/store/b5r5rikbdpr6qs4wfm6dxz9dbrmyvps6-gmp-with-cxx-6.3.0/lib
singleton-bool> Using Parsec parser
singleton-bool> Configuring singleton-bool-0.1.6...
singleton-bool> CallStack (from HasCallStack):
singleton-bool> withMetadata, called at libraries/Cabal/Cabal/src/Distribution/Simple/Utils.hs:368:14 in Cabal-3.10.2.0-inplace:Distribution.Simple.Utils
singleton-bool> Error: Setup: Encountered missing or private dependencies:
singleton-bool> base >=4.7 && <4.18, deepseq >=1.3 && <1.5
error: build of '/nix/store/rp57ihgmwx4fjipapyjbrfi7pwq3hqjp-singleton-bool-0.1.6.drv' on 'ssh://danboduo' failed: builder for '/nix/store/rp57ihgmwx4fjipapyjbrfi7pwq3hqjp-singleton-bool-0.1.6.drv' failed with exit code 1
error: builder for '/nix/store/rp57ihgmwx4fjipapyjbrfi7pwq3hqjp-singleton-bool-0.1.6.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/jff2ylcbkn4byb32zjxagnymmb3wlqw6-lukko-0.1.1.3.drv' failed to build
error: 1 dependencies of derivation '/nix/store/h6w86zn4wbh60r69w6bb63jzpphcsk2p-cabal-install-3.10.2.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/2hpj5jfyjbm6d7fnkm29kqar2vmc2blv-source-connections-sdist.tar.gz.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ainss91nhn73kfkdbksfk23q806nsq9v-source-rings-sdist.tar.gz.drv' failed to build
error: 1 dependencies of derivation '/nix/store/pfwqipvwwc2afvyxlqv6h33w50grlwqw-rings-0.2.drv' failed to build
to me it still looked as if it's due to lukko
Why are you jailbreaking cabal-install btw?
just another random thing I tried at some point
All of this happening as a result of overriding cabal-install as that. If you don't know why you did it, just remove it and try again.
I did remove it, it looks like the same problem
Logs?
warning: Git tree '/home/peddie/programming/rings' is dirty
singleton-bool> Running phase: setupCompilerEnvironmentPhase
singleton-bool> Build with /nix/store/0i135sf11k1vy8l181jkxamq18jfasjy-ghc-9.8.1.
singleton-bool> Running phase: unpackPhase
singleton-bool> unpacking source archive /nix/store/aya82ycp978lffwr5dhlxdikkihqjnp2-singleton-bool-0.1.6.tar.gz
singleton-bool> source root is singleton-bool-0.1.6
singleton-bool> setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file singleton-bool-0.1.6/src/Data/Singletons/Bool.hs
singleton-bool> Running phase: patchPhase
singleton-bool> Replace Cabal file with edited version from mirror://hackage/singleton-bool-0.1.6/revision/2.cabal.
singleton-bool> Running phase: compileBuildDriverPhase
singleton-bool> setupCompileFlags: -package-db=/build/tmp.vuGByZQCdA/setup-package.conf.d -j16 +RTS -A64M -RTS -threaded -rtsopts
singleton-bool> [1 of 2] Compiling Main ( Setup.hs, /build/tmp.vuGByZQCdA/Main.o )
singleton-bool> [2 of 2] Linking Setup
singleton-bool> Running phase: updateAutotoolsGnuConfigScriptsPhase
singleton-bool> Running phase: configurePhase
singleton-bool> configureFlags: --verbose --prefix=/nix/store/9shs4z4ym0wyqs8dks47r40a70rvhxrl-singleton-bool-0.1.6 --libdir=$prefix/lib/$compiler/lib --libsubdir=$abi/$libname --docdir=/nix/store/6qk15snibs3b47m51xv82gws889rz54a-singleton-bool-0.1.6-doc/share/doc/singleton-bool-0.1.6 --with-gcc=gcc --package-db=/build/tmp.vuGByZQCdA/package.conf.d --ghc-options=-j16 +RTS -A64M -RTS --disable-split-objs --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --ghc-option=-split-sections --ghc-options=-haddock --extra-lib-dirs=/nix/store/2dla9whd0hgqi4ygywrmv933bs8w8k7m-ncurses-6.4/lib --extra-lib-dirs=/nix/store/npfpil5nswlaqy7y56dwp0csj91pjiyd-libffi-3.4.4/lib --extra-lib-dirs=/nix/store/qnlgnpvh94xw2j3pm5f02iw102lx6llc-elfutils-0.190/lib --extra-lib-dirs=/nix/store/b5r5rikbdpr6qs4wfm6dxz9dbrmyvps6-gmp-with-cxx-6.3.0/lib
singleton-bool> Using Parsec parser
singleton-bool> Configuring singleton-bool-0.1.6...
singleton-bool> CallStack (from HasCallStack):
singleton-bool> withMetadata, called at libraries/Cabal/Cabal/src/Distribution/Simple/Utils.hs:368:14 in Cabal-3.10.2.0-inplace:Distribution.Simple.Utils
singleton-bool> Error: Setup: Encountered missing or private dependencies:
singleton-bool> base >=4.7 && <4.18, deepseq >=1.3 && <1.5
error: build of '/nix/store/rp57ihgmwx4fjipapyjbrfi7pwq3hqjp-singleton-bool-0.1.6.drv' on 'ssh://danboduo' failed: builder for '/nix/store/rp57ihgmwx4fjipapyjbrfi7pwq3hqjp-singleton-bool-0.1.6.drv' failed with exit code 1
error: builder for '/nix/store/rp57ihgmwx4fjipapyjbrfi7pwq3hqjp-singleton-bool-0.1.6.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/jff2ylcbkn4byb32zjxagnymmb3wlqw6-lukko-0.1.1.3.drv' failed to build
error: 1 dependencies of derivation '/nix/store/h6w86zn4wbh60r69w6bb63jzpphcsk2p-cabal-install-3.10.2.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/2hpj5jfyjbm6d7fnkm29kqar2vmc2blv-source-connections-sdist.tar.gz.drv' failed to build
error: 1 dependencies of derivation '/nix/store/224qy6xglcxmzrgwd5f7x4i1faw0p4l4-source-rings-sdist.tar.gz.drv' failed to build
error: 1 dependencies of derivation '/nix/store/5srwd2dfdqj1rayrlbf20s2lji77bmm9-rings-0.2.drv' failed to build
Is this something I can reproduce locally on my machine?
I would hope so, that is the idea of nix, right? :) I can send you my flake.lock
, I just have the flake files inside my local checkout of rings
with no other changes
flake.nix
flake.lock
A minimal repro as git repo would be nice
OK I can make my own copy of rings
and add those files if that is that much easier
https://github.com/peddie/rings branch flake
On macOS or Linux?
linux
It is building the world ...
that seems like the normal process for using nix, so I'll interpret that as a good thing
nixos cache caches only pkgs.haskellPackages
I think
thanks for taking a look. I hope it's not something dumb caused by my lack of nix knowledge
By the way, @locallycompact is working on Horizon Haskell which provides package sets with caching, but there's one minor issue to resolve first: https://nixos.zulipchat.com/#narrow/stream/413949-haskell-flake/topic/Using.20horizon.20package.20set.20with.20haskell-flake
Matt Peddie said :
thanks for taking a look. I hope it's not something dumb caused by my lack of nix knowledge
We are actually writing a tutorial series to introduce Haskellers to Nix:
https://nixos.asia/en/nixify-haskell
Srid said :
nixos cache caches only pkgs.haskellPackages
I think
ah, damn, OK. I have a big remote builder under my desk and occasionally try to use CUDA with nix, so I long ago gave up paying attention to whether and how the caches were working
(on top of the Nix series )
Alright, your repo failed on Linux for me with a different error:
image.png
very cool about the tutorial! I'll give it a read. I already appreciated your good haskell-flake
docs many times
I haven't seen that error. what happened to reproducibility?
That ^ was the result of running nix develop -L
.
Let me try nix build -L
now.
the shell builds more packages than the package, necessarily. like HLS
Okay, I see it now:
image.png
I am guessing HLS doesn't work with 9.8.1 yet, or at least requires significant tweaking (in my experience it's a miracle when HLS runs OK)
right so singleton-bool-0.1.7
has those upper version bounds relaxed and I think should work, but I can't figure out why the package set contains singleton-bool-0.1.6
at all . . .
Regarding jailbreaking finite-typelits, you probably need latest anyway: https://github.com/mniip/finite-typelits/commit/03600fbac084e6bc6b95957665d6ceedb3722358
But it is just test change, so we can check=false it
thanks for the tip, I'll just get that from git then
I see what's happening. @Matt Peddie Try the no-fromSdist
branch of haskell-flake for now.
And looks like we need to do this after all:
Srid said :
One thing we should do is allow the user to disable the use of cabalSdist (toggle on/off module option).
trying now. what exactly is going on, if you don't mind? how did, for example, disabling lukko
tests not solve the problem?
cc @Robert Hensing - looks like our use of fromSdist is building its own cabal-install
ignoring what's in the user's package set. Which was causing this problem.
This ^ was going on I think. I'll file an issue on github.
cool, I appreciate you taking the time for this. keep up the good work on haskell-flake
. I look forward to learning to wield it more effectively from your tutorials
@Matt Peddie Can you let me know if https://github.com/srid/haskell-flake/pull/220 fixes it?
trying it now, but I'm not quite sure from looking at the patch and the discussion for which component I should be setting this new flag. cabal-install
? at a meta-level, this confusion may be supporting evidence for
Because these kinds of issues are not straightforward to debug without knowledge of the nixpkgs Haskell infrastructure.
https://github.com/srid/haskell-flake/pull/221 seems to work OK, though
Matt Peddie said :
https://github.com/srid/haskell-flake/pull/221 seems to work OK, though
Awesome, we are planning to merge 221 only (not 220).
Last updated: Nov 13 2024 at 11:14 UTC