You are not logged in.
Hiya,
The recent version of (I think) stack, is causing my project to no longer build. I believe it's due to stack, as I got a ton of haskell upgrades, and downgrading cabal-install didn't prevent the issue.
I tried downgrading the stack version, but that caused it to not load the dependencies, I guess I would also have to downgrade the 100+ packages it depends on, and I wasn't sure how to automate that.
Anyway, to the issue. Before updating
stack install
successfully builds a project.
After the issue
stack install
gives this output:
Progress: 6/23
-- While building package network-2.6.3.2 using:
/tmp/stack19184/network-2.6.3.2/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/setup --builddir=.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0 configure --with-ghc=/home/zach/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/bin/ghc --with-ghc-pkg=/home/zach/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/home/zach/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.2/8.0.2/pkgdb --libdir=/home/zach/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.2/8.0.2/lib --bindir=/home/zach/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.2/8.0.2/bin --datadir=/home/zach/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.2/8.0.2/share --libexecdir=/home/zach/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.2/8.0.2/libexec --sysconfdir=/home/zach/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.2/8.0.2/etc --docdir=/home/zach/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.2/8.0.2/doc/network-2.6.3.2 --htmldir=/home/zach/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.2/8.0.2/doc/network-2.6.3.2 --haddockdir=/home/zach/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.2/8.0.2/doc/network-2.6.3.2 --dependency=base=base-4.9.1.0 --dependency=bytestring=bytestring-0.10.8.1 --dependency=unix=unix-2.7.2.1
Process exited with code: ExitFailure 1
Logs have been written to: /media/Documents/Code/Haskell/networked-poker/.stack-work/logs/network-2.6.3.2.log
[1 of 2] Compiling Main ( /tmp/stack19184/network-2.6.3.2/Setup.hs, /tmp/stack19184/network-2.6.3.2/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/Main.o )
[2 of 2] Compiling StackSetupShim ( /home/zach/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /tmp/stack19184/network-2.6.3.2/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/StackSetupShim.o )
Linking /tmp/stack19184/network-2.6.3.2/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/setup ...
Configuring network-2.6.3.2...
configure: WARNING: unrecognized options: --with-compiler
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... /usr/bin/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/tmp/stack19184/network-2.6.3.2':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
Here's a minimal example which should illustrate the issue.
fail.cabal:
name: fail
build-type: Simple
version: 0.0.1
cabal-version: >= 1.20
executable fail
main-is: fail.hs
build-depends: base >=4.10 && <4.11, network
default-language: Haskell2010
stack.yaml:
install-ghc: true
resolver: nightly-2017-09-19
packages:
- .
Then attempt to compile with stack install and you should see a similar error to the above. To confirm it's an error in stack and not cabal, you can create a file
fail.hs:
main = putStrLn "hi!"
And compile with cabal install, and it should work.
I couldn't see anything about this in the forums, sorry if I've missed a similar topic.
Offline
I just ran into this today myself. https://github.com/commercialhaskell/st … -332881927 points to the issue being with ncurses again. I removed the package mentioned in the comment and replaced it with ncurses-full. If you are still having issues, you can run the following:
stack unpack network
cd network-<specific version>
stack init
stack build
That should leave the config.log for you to look through, but my guess is it's complaining about -fPIC and it's probably doing it now because the system's GHC isn't the same as the snapshot's.
Offline
Hi,
I am having the same problem. Indeed, installing `ncurses-full` from AUR solves the problem. Then, stack pulls a different GHC version for me (ghc-tinfo6-nopie-8.0.2 with normal ncurses and ghc-ncurses6-nopie-8.0.2 with ncurses-full). I am thinking about reporting this issue, let me know what you think.
Dominik
Offline
Hiya,
Yeah, I managed to fix it last time by linking libncursesw.so.6.0 to libncurses.so, but that method broke today.
Installing ncurses-full did fix it, thanks!
It would be nice to get it working out the box for sure, I'm not sure whether it needs to be fixed in arch, or stack though.
Offline
I just realized that I cannot compile my xmonad configuration when ncurses-full is installed (some error about libtinfo), so this is also not really a fix for me.
Offline
Yeah, I just noticed I can't run ghc, or ghci, they both complain about libtinfo.so.6 not existing.
Furthermore, hdevtools doesn't function correctly, which is pretty essential to my workflow.
Not sure what the solution is then.
Offline
I opened an issue at the stack repo.
Offline
Stack ghc seems to still work with ncurses-full and won't without it. What I'm doing for now to get around the system ghc being broken is using stack to manage my xmonad build which you can read more about here: https://github.com/xmonad/xmonad-testing
Offline
What worked for me as suggested on the github repo was putting
ghc-build: nopie
In my ~/.stack/config.yaml
Offline
When I use
ghc-build: nopie
in my ~/.stack/config.yaml, it gives me this error:
/home/swilliams/.stack/programs/x86_64-linux/ghc-nopie-8.0.2/lib/ghc-8.0.2/bin/ghc-pkg: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
with the official ncurses package. I'm only able to work around that with either ncurses-full or not using the nopie build flag. But if I don't have ncurses-full some packages like network refuse to build.
Offline
I think you need to install ncurses5-compat-libs as well, my mistake
Offline
That does the trick. Hopefully these problems get sorted out so we don't have to be using AUR packages in the future for community packages.
Offline
I also ran into this to issue today.
ghc-build: nopie
worked for me.
Offline
These together worked for me:
ncurses-full
libtinfo5
ghc-build: nopie
Offline