Skip to content
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

GHC-Options flags being ignored in newer Stack builds #2289

Closed
AaronFriel opened this issue Jun 20, 2016 · 5 comments
Closed

GHC-Options flags being ignored in newer Stack builds #2289

AaronFriel opened this issue Jun 20, 2016 · 5 comments
Milestone

Comments

@AaronFriel
Copy link
Contributor

Arch Linux and other rolling distro users are experiencing errors due to the assembler using an unhandled relocation type.

See:
DanielG/ghc-mod#762
IHaskell/IHaskell#636

One trend with these reports is that some users report success from putting in their config.yaml or stack.yaml the lines:

ghc-options:
  cryptonite: -opta-Wa,-mrelax-relocations=no

Or variations thereof (e.g.: "*": ...).

I'm experiencing this as well, even when I try to ghc-options all the things:

rebuild-ghc-options: true
apply-ghc-options: everything
ghc-options:
  cryptonite: -opta-Wa,-mrelax-relocations=no
  cipher-aes: -opta-Wa,-mrelax-relocations=no
  "*": -opta-Wa,-mrelax-relocations=no

Even when I do that, stack build cipher-aes won't rebuild unless I use ghc-pkg to remove it (what?!) and even when I do, I still get these errors when using ghc-mod:

ghc-mod: /home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/lib/x86_64-linux-ghc-7.10.3/cipher-aes-0.2.11-LCbQiUgBdfG1swKGFESvIB/libHScipher-aes-0.2.11-LCbQiUgBdfG1swKGFESvIB.a: unhandled ELF relocation(RelA) type 42

An interesting observation is that some users report that the ghc-options command worked for them, specifically, @Shimuuar noted:

stack-1.0.4.3, no ghc-options: unhandled ELF relocation
stack-1.0.4.3 cryptonite: -opta-Wa,-mrelax-relocations=no: works
stack-1.1.2 with or without ghc-options: unhandled ELF relocation

Since it looks like a GHC version that fixes this won't be released soon, I'm wondering if it might be possible to see why Stack 1.1.2 is not working with these options?

@AaronFriel
Copy link
Contributor Author

Edit: I have reproduced this, it took some time (and an intervening episode of a popular television series), but using Stack 1.0.4.3 and the config.yaml I showed above, I am able to compile and run ghc-mod against my source.

@AaronFriel AaronFriel changed the title Are GHC-Options flags being ignored in newer Stack builds? GHC-Options flags being ignored in newer Stack builds Jun 20, 2016
@mgsloan
Copy link
Contributor

mgsloan commented Jun 24, 2016

To check if --ghc-options isn't being passed to cabal, use -v. To additionally check if the options aren't being passed to ghc by cabal, use --cabal-verbose. Can I please get a -v --cabal-verbose log?

@mgsloan mgsloan added this to the Support milestone Jun 24, 2016
@AaronFriel
Copy link
Contributor Author

AaronFriel commented Jun 24, 2016

I have bisected the issue to this commit causing the problem: c891a24

The commit prior, 6f108a1, works and I am able to build and run ghc-mod with it on Arch. I will see about getting you verbose output, but I can guarantee you that commit is causing the ghc-options options in config.yaml and stack.yaml to be ignored.

@AaronFriel
Copy link
Contributor Author

Version 1.1.1, Git revision 6f108a10a4185de4838726ef607ea97044a81a35 (3563 commits) x86_64 hpack-0.13.0
2016-06-23 21:14:19.201914: [debug] Checking for project config at: /home/developer/github/project/web/stack.yaml @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Config src/Stack/Config.hs:792:9)
2016-06-23 21:14:19.202167: [debug] Checking for project config at: /home/developer/github/project/stack.yaml @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Config src/Stack/Config.hs:792:9)
2016-06-23 21:14:19.202228: [debug] Loading project config file /home/developer/github/project/stack.yaml @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Config src/Stack/Config.hs:810:13)
2016-06-23 21:14:19.203003: [debug] Checking whether stack was built with libgmp4 @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Config src/Stack/Config.hs:327:5)
2016-06-23 21:14:19.203097: [debug] Run process: ldd /home/developer/.local/bin/stack @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:283:3)
2016-06-23 21:14:19.211646: [debug] Stack was not built with libgmp4 @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Config src/Stack/Config.hs:331:14)
2016-06-23 21:14:19.211775: [debug] Trying to decode /home/developer/.stack/build-plan-cache/x86_64-linux/lts-6.4.cache @(stack_5x92oLOhmpXC2aqzYZkJW7:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-06-23 21:14:19.220295: [debug] Success decoding /home/developer/.stack/build-plan-cache/x86_64-linux/lts-6.4.cache @(stack_5x92oLOhmpXC2aqzYZkJW7:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-06-23 21:14:19.220416: [debug] Getting system compiler version @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Setup src/Stack/Setup.hs:341:17)
2016-06-23 21:14:19.222276: [debug] Asking GHC for its version @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Setup.Installed src/Stack/Setup/Installed.hs:94:13)
2016-06-23 21:14:19.222363: [debug] Run process: ghc --numeric-version @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:283:3)
2016-06-23 21:14:19.242290: [debug] Getting Cabal package version @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.GhcPkg src/Stack/GhcPkg.hs:165:5)
2016-06-23 21:14:19.242404: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:283:3)
2016-06-23 21:14:19.255693: [debug] Resolving package entries @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Setup src/Stack/Setup.hs:221:5)
2016-06-23 21:14:19.256151: [debug] Getting global package database location @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.GhcPkg src/Stack/GhcPkg.hs:48:5)
2016-06-23 21:14:19.256199: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:283:3)
2016-06-23 21:14:19.275750: [debug] Checking resolver: lts-6.4 @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Build.Source src/Stack/Build/Source.hs:163:17)
2016-06-23 21:14:19.275857: [debug] Trying to decode /home/developer/.stack/build-plan-cache/x86_64-linux/lts-6.4.cache @(stack_5x92oLOhmpXC2aqzYZkJW7:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-06-23 21:14:19.284247: [debug] Success decoding /home/developer/.stack/build-plan-cache/x86_64-linux/lts-6.4.cache @(stack_5x92oLOhmpXC2aqzYZkJW7:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-06-23 21:14:19.403897: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:283:3)
2016-06-23 21:14:19.429094: [debug] Ignoring package haskeline due to wanting version 0.7.2.3 instead of 0.7.2.1 @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-06-23 21:14:19.429224: [debug] Ignoring package terminfo due to wanting version 0.4.0.2 instead of 0.4.0.1 @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-06-23 21:14:19.429299: [debug] Ignoring package Cabal due to wanting version 1.22.8.0 instead of 1.22.5.0 @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-06-23 21:14:19.429639: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/pkgdb dump --expand-pkgroot @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:283:3)
2016-06-23 21:14:19.520381: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/developer/github/project/.stack-work/install/x86_64-linux/lts-6.4/7.10.3/pkgdb dump --expand-pkgroot @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:283:3)
2016-06-23 21:14:19.542382: [debug] Trying to decode /home/developer/.stack/indices/Hackage/00-index.cache @(stack_5x92oLOhmpXC2aqzYZkJW7:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-06-23 21:14:19.681728: [debug] Success decoding /home/developer/.stack/indices/Hackage/00-index.cache @(stack_5x92oLOhmpXC2aqzYZkJW7:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-06-23 21:14:19.731377: [debug] Getting global package database location @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.GhcPkg src/Stack/GhcPkg.hs:48:5)
2016-06-23 21:14:19.731469: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:283:3)
2016-06-23 21:14:19.777267: [info] cryptonite-0.15: configure @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Build.Execute src/Stack/Build/Execute.hs:731:23)
2016-06-23 21:14:19.777474: [debug] Run process: /home/developer/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --verbose --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.5.0 configure --with-ghc=/home/developer/.stack/programs/x86_64-linux/ghc-7.10.3/bin/ghc --with-ghc-pkg=/home/developer/.stack/programs/x86_64-linux/ghc-7.10.3/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/pkgdb --libdir=/home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/lib --bindir=/home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/bin --datadir=/home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/share --libexecdir=/home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/libexec --sysconfdir=/home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/etc --docdir=/home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/doc/cryptonite-0.15 --htmldir=/home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/doc/cryptonite-0.15 --haddockdir=/home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/doc/cryptonite-0.15 --dependency=base=base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d --dependency=bytestring=bytestring-0.10.6.0-9a873bcf33d6ce2fd2698ce69e2c1c66 --dependency=deepseq=deepseq-1.4.1.1-614b63b36dd6e29d2b35afff57c25311 --dependency=ghc-prim=ghc-prim-0.4.0.0-6cdc86811872333585fa98756aa7c51e --dependency=integer-gmp=integer-gmp-1.0.0.0-3c8c40657a9870f5c33be17496806d8d --dependency=memory=memory-0.13-039b91f332a8ac781f93bf90ac1b3d77 --ghc-options -opta-Wa,-mrelax-relocations=no --ghc-options -opta-Wa,-mrelax-relocations=no --ghc-options -opta-Wa,-mrelax-relocations=no @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:301:3)
2016-06-23 21:14:20.328502: [info] cryptonite-0.15: build @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Build.Execute src/Stack/Build/Execute.hs:731:23)
2016-06-23 21:14:20.328599: [debug] Run process: /home/developer/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --verbose --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.5.0 build --ghc-options " -ddump-hi -ddump-to-file" @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:301:3)
2016-06-23 21:14:48.472678: [info] cryptonite-0.15: copy/register @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Build.Execute src/Stack/Build/Execute.hs:731:23)
2016-06-23 21:14:48.472807: [debug] Run process: /home/developer/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --verbose --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.5.0 copy @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:301:3)
2016-06-23 21:14:48.544202: [debug] Run process: /home/developer/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --verbose --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.5.0 register @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:301:3)
2016-06-23 21:14:48.830164: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/pkgdb describe --simple-output cryptonite --expand-pkgroot @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:283:3)
Version 1.1.1, Git revision c891a247cead52bcc18c079bdaa91ab8980a834b (3564 commits) x86_64 hpack-0.13.0
2016-06-23 21:23:52.054731: [debug] Checking for project config at: /home/developer/github/project/web/stack.yaml @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Config src/Stack/Config.hs:792:9)
2016-06-23 21:23:52.054991: [debug] Checking for project config at: /home/developer/github/project/stack.yaml @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Config src/Stack/Config.hs:792:9)
2016-06-23 21:23:52.055066: [debug] Loading project config file /home/developer/github/project/stack.yaml @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Config src/Stack/Config.hs:810:13)
2016-06-23 21:23:52.055957: [debug] Checking whether stack was built with libgmp4 @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Config src/Stack/Config.hs:327:5)
2016-06-23 21:23:52.056064: [debug] Run process: ldd /home/developer/.local/bin/stack @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:283:3)
2016-06-23 21:23:52.068279: [debug] Stack was not built with libgmp4 @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Config src/Stack/Config.hs:331:14)
2016-06-23 21:23:52.068427: [debug] Trying to decode /home/developer/.stack/build-plan-cache/x86_64-linux/lts-6.4.cache @(stack_5x92oLOhmpXC2aqzYZkJW7:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-06-23 21:23:52.086275: [debug] Success decoding /home/developer/.stack/build-plan-cache/x86_64-linux/lts-6.4.cache @(stack_5x92oLOhmpXC2aqzYZkJW7:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-06-23 21:23:52.086424: [debug] Getting system compiler version @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Setup src/Stack/Setup.hs:341:17)
2016-06-23 21:23:52.086956: [debug] Asking GHC for its version @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Setup.Installed src/Stack/Setup/Installed.hs:94:13)
2016-06-23 21:23:52.087061: [debug] Run process: ghc --numeric-version @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:283:3)
2016-06-23 21:23:52.114972: [debug] Getting Cabal package version @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.GhcPkg src/Stack/GhcPkg.hs:165:5)
2016-06-23 21:23:52.115120: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:283:3)
2016-06-23 21:23:52.132945: [debug] Resolving package entries @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Setup src/Stack/Setup.hs:221:5)
2016-06-23 21:23:52.133531: [debug] Getting global package database location @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.GhcPkg src/Stack/GhcPkg.hs:48:5)
2016-06-23 21:23:52.133700: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:283:3)
2016-06-23 21:23:52.160603: [debug] Checking resolver: lts-6.4 @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Build.Source src/Stack/Build/Source.hs:202:17)
2016-06-23 21:23:52.160794: [debug] Trying to decode /home/developer/.stack/build-plan-cache/x86_64-linux/lts-6.4.cache @(stack_5x92oLOhmpXC2aqzYZkJW7:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-06-23 21:23:52.171221: [debug] Success decoding /home/developer/.stack/build-plan-cache/x86_64-linux/lts-6.4.cache @(stack_5x92oLOhmpXC2aqzYZkJW7:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-06-23 21:23:52.289405: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:283:3)
2016-06-23 21:23:52.318064: [debug] Ignoring package haskeline due to wanting version 0.7.2.3 instead of 0.7.2.1 @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-06-23 21:23:52.318240: [debug] Ignoring package terminfo due to wanting version 0.4.0.2 instead of 0.4.0.1 @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-06-23 21:23:52.318325: [debug] Ignoring package Cabal due to wanting version 1.22.8.0 instead of 1.22.5.0 @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-06-23 21:23:52.318691: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/pkgdb dump --expand-pkgroot @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:283:3)
2016-06-23 21:23:52.403131: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/developer/github/project/.stack-work/install/x86_64-linux/lts-6.4/7.10.3/pkgdb dump --expand-pkgroot @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:283:3)
2016-06-23 21:23:52.424668: [debug] Trying to decode /home/developer/.stack/indices/Hackage/00-index.cache @(stack_5x92oLOhmpXC2aqzYZkJW7:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-06-23 21:23:52.569073: [debug] Success decoding /home/developer/.stack/indices/Hackage/00-index.cache @(stack_5x92oLOhmpXC2aqzYZkJW7:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-06-23 21:23:52.585810: [debug] Getting global package database location @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.GhcPkg src/Stack/GhcPkg.hs:48:5)
2016-06-23 21:23:52.586088: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:283:3)
2016-06-23 21:23:52.636751: [info] cryptonite-0.15: configure @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Build.Execute src/Stack/Build/Execute.hs:731:23)
2016-06-23 21:23:52.637006: [debug] Run process: /home/developer/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --verbose --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.5.0 configure --with-ghc=/home/developer/.stack/programs/x86_64-linux/ghc-7.10.3/bin/ghc --with-ghc-pkg=/home/developer/.stack/programs/x86_64-linux/ghc-7.10.3/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/pkgdb --libdir=/home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/lib --bindir=/home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/bin --datadir=/home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/share --libexecdir=/home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/libexec --sysconfdir=/home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/etc --docdir=/home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/doc/cryptonite-0.15 --htmldir=/home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/doc/cryptonite-0.15 --haddockdir=/home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/doc/cryptonite-0.15 --dependency=base=base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d --dependency=bytestring=bytestring-0.10.6.0-9a873bcf33d6ce2fd2698ce69e2c1c66 --dependency=deepseq=deepseq-1.4.1.1-614b63b36dd6e29d2b35afff57c25311 --dependency=ghc-prim=ghc-prim-0.4.0.0-6cdc86811872333585fa98756aa7c51e --dependency=integer-gmp=integer-gmp-1.0.0.0-3c8c40657a9870f5c33be17496806d8d --dependency=memory=memory-0.13-039b91f332a8ac781f93bf90ac1b3d77 @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:301:3)
2016-06-23 21:23:53.209522: [info] cryptonite-0.15: build @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Build.Execute src/Stack/Build/Execute.hs:731:23)
2016-06-23 21:23:53.209616: [debug] Run process: /home/developer/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --verbose --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.5.0 build --ghc-options " -ddump-hi -ddump-to-file" @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:301:3)
2016-06-23 21:24:20.244826: [info] cryptonite-0.15: copy/register @(stack_5x92oLOhmpXC2aqzYZkJW7:Stack.Build.Execute src/Stack/Build/Execute.hs:731:23)
2016-06-23 21:24:20.244954: [debug] Run process: /home/developer/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --verbose --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.5.0 copy @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:301:3)
2016-06-23 21:24:20.311259: [debug] Run process: /home/developer/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --verbose --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.5.0 register @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:301:3)
2016-06-23 21:24:20.567796: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/developer/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/pkgdb describe --simple-output cryptonite --expand-pkgroot @(stack_5x92oLOhmpXC2aqzYZkJW7:System.Process.Read src/System/Process/Read.hs:283:3)

I had ghc-options lines in my config.yaml, in ./project/stack.yaml and in ./project/web/stack.yaml. I suspect this is why the options show up three times in the result:

In 6f108a1 but not c891a24:

--ghc-options -opta-Wa,-mrelax-relocations=no --ghc-options -opta-Wa,-mrelax-relocations=no --ghc-options -opta-Wa,-mrelax-relocations=no

AaronFriel added a commit to AaronFriel/stack that referenced this issue Jun 25, 2016
Commit c891a24 created a regression, ghc-options were no longer applied to
packages in the snapshot. The "mini build plan" for missing snapshot packages
did not check the configuration's "ghc-options" settings at all, so even
configurations with "apply-ghc-options: everything" would not apply those
options.

This commit, combined with a change to config.yaml, fixes these issues:

DanielG/ghc-mod#762
IHaskell/IHaskell#636

To fix those issues,  (usually located in ) should
contain:

And for snapshots already installed, the following command will force stack
to rebuild them with those options:

*Not tested:* Alternatively, add the line  to
. This may cause undesirable behavior in forcing all ghc-options
changes to rebuild the snapshot.
mgsloan added a commit that referenced this issue Jun 30, 2016
Fix issue #2289, apply ghc-options to snapshot pkg
@sjakobi
Copy link
Member

sjakobi commented Jul 18, 2016

Fixed via #2305.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants