New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stack build --profile is broken? #4275
Comments
@waddlaw Please try running |
@snoyberg Thanks for advice. But, problem isn't resolved yet...
|
Thanks for confirming. If you don't mind, please try out one more repro attempt: does this bug occur when using Stack 1.7.1 (the latest official release) to perform the build? |
command logupgrade to latest (stable) stack. $ stack upgrade --binary-version 1.7.1
Current Stack version: 1.10.0, available download version: 1.7.1
Forcing binary upgrade
Querying for archive location for platform: linux-x86_64-static
Querying for archive location for platform: linux-x86_64
Downloading from: https://github.com/commercialhaskell/stack/releases/download/v1.7.1/stack-1.7.1-linux-x86_64.tar.gz
Download complete, testing executable
Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2
New stack executable available at /home/bm12/.local/bin/stack
Also copying stack executable to /home/bm12/.local/bin/stack (deleted)
Stack executable copied successfully!
$ stack --version
Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2 remove cabal files. $ rm stack.cabal
$ rm subs/pantry/pantry.cabal
$ rm subs/curator/curator.cabal run
run $ stack build --profile
...
Configuring pantry-0.1.0.0...
Preprocessing library for pantry-0.1.0.0..
Building library for pantry-0.1.0.0..
[ 1 of 14] Compiling Data.Aeson.Extended
[ 2 of 14] Compiling Pantry.Internal.StaticBytes
[ 3 of 14] Compiling Pantry.SHA256
[ 4 of 14] Compiling Pantry.Types
[ 5 of 14] Compiling Pantry.Storage
[ 6 of 14] Compiling Pantry.Tree
[ 7 of 14] Compiling Pantry.Internal
[ 8 of 14] Compiling Pantry.HTTP
[ 9 of 14] Compiling Hackage.Security.Client.Repository.HttpLib.HttpClient
[10 of 14] Compiling Pantry.Archive
[11 of 14] Compiling Pantry.Repo
[12 of 14] Compiling Pantry.Hackage
[13 of 14] Compiling Pantry
[14 of 14] Compiling Paths_pantry
[ 1 of 14] Compiling Data.Aeson.Extended
[ 2 of 14] Compiling Pantry.Internal.StaticBytes
[ 3 of 14] Compiling Pantry.SHA256
[ 4 of 14] Compiling Pantry.Types
[ 5 of 14] Compiling Pantry.Storage
ghc: ^^ Could not load 'pantryzm0zi1zi0zi0zmKdylfgftpdrFajQXv5VfSy_PantryziTypes_zdfPersistFieldSqlFileSizze1_closure', dependency unresolved. See top entry above.
ByteCodeLink.lookupCE
During interactive linking, GHCi couldn't find the following symbol:
pantryzm0zi1zi0zi0zmKdylfgftpdrFajQXv5VfSy_PantryziTypes_zdfPersistFieldSqlFileSizze1_closure
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session. Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.
Alternatively, this link failure might indicate a bug in GHCi.
If you suspect the latter, please send a bug report to:
glasgow-haskell-bugs@haskell.org Is there any other way? |
Interesting. Thanks for going through all of those steps. That looks like a bug in either Cabal or, more likely, GHC, but it's possible that either (1) there's a bug in how Stack is configuring Cabal, or (2) there's something in the Pantry package that's causing this to happen. I'll have a look, but I'm not terribly familiar with the profiling build pipeline. |
More in line with it being a GHC bug, there's https://ghc.haskell.org/trac/ghc/ticket/14210. |
One possible alternative: you could try the command |
Unfortunately, it didn't work out :( $ stack clean --full
$ stack build --profile --stack-yaml stack-nightly.yaml
...
-- While building custom Setup.hs for package pantry-0.1.0.0 using:
/home/bm12/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1 build lib:pantry --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
Logs have been written to: /home/bm12/Desktop/repo/upstream/stack/.stack-work/logs/pantry-0.1.0.0.log
Configuring pantry-0.1.0.0...
Preprocessing library for pantry-0.1.0.0..
Building library for pantry-0.1.0.0..
[ 1 of 14] Compiling Data.Aeson.Extended
[ 2 of 14] Compiling Pantry.Internal.StaticBytes
[ 3 of 14] Compiling Pantry.SHA256
[ 4 of 14] Compiling Pantry.Types
[ 5 of 14] Compiling Pantry.Storage
[ 6 of 14] Compiling Pantry.Tree
[ 7 of 14] Compiling Pantry.Internal
[ 8 of 14] Compiling Pantry.HTTP
[ 9 of 14] Compiling Hackage.Security.Client.Repository.HttpLib.HttpClient
[10 of 14] Compiling Pantry.Archive
[11 of 14] Compiling Pantry.Repo
[12 of 14] Compiling Pantry.Hackage
[13 of 14] Compiling Pantry
[14 of 14] Compiling Paths_pantry
[ 1 of 14] Compiling Data.Aeson.Extended
[ 2 of 14] Compiling Pantry.Internal.StaticBytes
[ 3 of 14] Compiling Pantry.SHA256
[ 4 of 14] Compiling Pantry.Types
[ 5 of 14] Compiling Pantry.Storage
ghc: ^^ Could not load 'pantryzm0zi1zi0zi0zmA9yWaNaa2bk93b550QHp2ZZ_PantryziTypes_zdfPersistFieldSqlFileSizze1_closure', dependency unresolved. See top entry above.
ByteCodeLink.lookupCE
During interactive linking, GHCi couldn't find the following symbol:
pantryzm0zi1zi0zi0zmA9yWaNaa2bk93b550QHp2ZZ_PantryziTypes_zdfPersistFieldSqlFileSizze1_closure
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session. Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.
Alternatively, this link failure might indicate a bug in GHCi.
If you suspect the latter, please send a bug report to:
glasgow-haskell-bugs@haskell.org |
@snoyberg profiling-build is broken in a smiliar way on my work project. How confident are you that it's related to https://ghc.haskell.org/trac/ghc/ticket/14210 ? What can I do to put more info and bump it in priority? Seems like a quite a serious issue to not have a profiling build working, unlike the "low" priority GHC bug. |
Side-note: our project builds with profiling fine if optimizations are turned off ( edit: also with mentioning, we're on nightly-2018-06-06 |
This looks to be a problem described (documented bug is a feature?) in the Haskell User Guide - https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#using-template-haskell-with-profiling |
@qrilka thanks a lot for digging into this! Adding |
it's great to hear that it did help you @k-bx I thought that it could be good to have such an option but for me
So either it doesn't resolve the problem for all of the cases or there's something else in Stack which gets triggered. |
Looks like it's about https://ghc.haskell.org/trac/ghc/ticket/12932 and probably we stumble upon the fact of experimental nature of this |
Closing as an upstream issue. |
Steps to reproduce
stack build
is working fine.Stack version
The text was updated successfully, but these errors were encountered: