Stack: Stack stopped working after upgrade to gcc-7.3.0

Created on 30 Jun 2018  路  9Comments  路  Source: commercialhaskell/stack

Using the latest release (currently stack-1.7.1).

General summary/comments

Upgraded system gcc to gcc-7.3.0 last week and now when I try to stack setup I get:

<no location info>: error:
    Warning: Couldn't figure out C compiler information!
             Make sure you're using GNU gcc, or clang
ghc: could not execute: /usr/x86_64-pc-linux-gnu/gcc-bin/6.4.0/gcc
The GHC located at /home/waivina/.stack/programs/x86_64-linux/ghc-ncurses6-8.0.2/bin/ghc failed to compile a sanity check.

It appears to still be looking for gcc-6.4.0...

Does Stack work with gcc-7.3.0? I searched for awhile and didn't find any documentation about what version of gcc Stack requires.

I attempted to use --with-gcc with no success.

Steps to reproduce

  1. Upgrade your system's gcc to gcc-7.3.0.
  2. Run command stack setup.

Expected

I expect Stack to be compatible with past and present versions of gcc, and/or documentation about what versions of gcc Stack is compatible with.

Actual

Stack appears to not be compatible with gcc-7.3.0

Stack version

$ stack --version
Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2

System Info

Gentoo Linux
GCC-7.3.0

further investigation required needs reproduction bug

All 9 comments

Can you please post the output of

/usr/x86_64-pc-linux-gnu/gcc-bin/6.4.0/gcc --version

Thanks

There is no longer a 6.4.0, it was uninstalled.

I reinstalled gcc-6.4.0 and everything is working again, so the immediate concern is solved.

It seems there are issues with --with-gcc and gcc-7.3.0, and not much documentation on which version of gcc is required as a dependency.

Thanks,
Nathan.

--with-gcc do not work, maybe.

relation?

  • #3902
  • #4073
  • haskell/cabal#4439

Can you link ${path}/gcc -> /usr/bin/gcc-7.3.0

Adding the symlink:

$ ln -s /usr/x86_64-pc-linux-gnu/gcc-bin/7.3.0/gcc /usr/x86_64-pc-linux-gnu/gcc-bin/6.4.0/gcc

appears to be another workaround. It successfully resolved the issue.

By the way, any idea who's hard coding gcc-6.4.0?

I skimmed the code base and didn't find any hardcoding.

When I query ~/.local/bin/stack path
It is including: /usr/x86_64-pc-linux-gnu/gcc-bin/7.3.0
I also read about a similar issue on Windows, something about the version of gcc that the binary ghc was built with GHC Issue #13560. Could it be something similar here?

Unlikely. Could you try wiping out the ~/.stack directory and trying again? My best guess is that, when installing GHC itself, the GHC configure scripts detect the GCC path.

Closing due to no response

Was this page helpful?
0 / 5 - 0 ratings

Related issues

s5k6 picture s5k6  路  3Comments

srghma picture srghma  路  3Comments

symbiont-joseph-kachmar picture symbiont-joseph-kachmar  路  3Comments

jwaldmann picture jwaldmann  路  4Comments

abhinav picture abhinav  路  4Comments