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

stack build network fails during configuration #3537

Closed
dkasak opened this issue Oct 31, 2017 · 5 comments
Closed

stack build network fails during configuration #3537

dkasak opened this issue Oct 31, 2017 · 5 comments

Comments

@dkasak
Copy link
Contributor

dkasak commented Oct 31, 2017

Running stack build network fails, producing the following output:

network-2.6.3.2: configure

--  While building package network-2.6.3.2 using:
    /tmp/stack32197/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/dkasak/.local/share/stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/bin/ghc --with-ghc-pkg=/home/dkasak/.local/share/stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/home/dkasak/.local/share/stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.11/8.0.2/pkgdb --libdir=/home/dkasak/.local/share/stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.11/8.0.2/lib --bindir=/home/dkasak/.local/share/stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.11/8.0.2/bin --datadir=/home/dkasak/.local/share/stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.11/8.0.2/share --libexecdir=/home/dkasak/.local/share/stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.11/8.0.2/libexec --sysconfdir=/home/dkasak/.local/share/stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.11/8.0.2/etc --docdir=/home/dkasak/.local/share/stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.11/8.0.2/doc/network-2.6.3.2 --htmldir=/home/dkasak/.local/share/stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.11/8.0.2/doc/network-2.6.3.2 --haddockdir=/home/dkasak/.local/share/stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.11/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: /home/dkasak/code/poljar/fialka/.stack-work/logs/network-2.6.3.2.log

    [1 of 2] Compiling Main             ( /tmp/stack32197/network-2.6.3.2/Setup.hs, /tmp/stack32197/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/dkasak/.local/share/stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /tmp/stack32197/network-2.6.3.2/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/StackSetupShim.o )
    Linking /tmp/stack32197/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/stack32197/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

stack version:

Version 1.6.0, Git revision 2d9721356270e11a37add59b772bde7174ebeb67 x86_64 hpack-0.18.1

The resolver used is lts-9.11. I noticed that #1714, which is now closed, has a very similar error message and is also concerning the network package so it may be related somehow.

@dkasak
Copy link
Contributor Author

dkasak commented Oct 31, 2017

I just found #3459, which seems identical (I'm on Arch Linux as well). I'll try the workaround from #3448 that was mentioned there.

@ZedPea: When you said that the workaround from #3448 worked to resolve your error, did you mean this one?

@dkasak dkasak closed this as completed Oct 31, 2017
@dkasak dkasak reopened this Oct 31, 2017
@zpalmtree
Copy link

@dkasak Yes, but that stopped working a while ago, after an update. The fix which worked for me last time it happened was:

  • Add ghc-build: nopie to my ~/.stack/config.yaml
  • Install ncurses5-compat-libs from the AUR

@dkasak
Copy link
Contributor Author

dkasak commented Oct 31, 2017

Yeah, the old workaround didn't work. I already had ncurses5-compat-libs installed, so adding ghc-build: nopie did the trick.

Does anyone have an idea why this is necessary, though? stack was already downloading the nopie bindist.

@zpalmtree
Copy link

@dkasak I can't say I know why it keeps breaking, it's something to do with ncurses for sure. There's a bug report here which seems to show a missing symlink: https://bugs.archlinux.org/task/56101

@dkasak
Copy link
Contributor Author

dkasak commented Nov 1, 2017

I'm going to close this since I can see there are a lot of duplicates and the workaround works for me.

For reference, these are the duplicates I encountered: #3488, #3459, #3509.

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

2 participants