-
Notifications
You must be signed in to change notification settings - Fork 847
Closed
Description
Problem description
I'm building a project with some C code and I want to use a specific GCC version. So I'm invoking stack like stack --with-gcc /usr/bin/gcc-6.4.0 .... It seems that stack just does not respect this setting somehow, because it fails with error:
Building library for <libname>...
gcc: error: unrecognized command line option ‘--std=c++17’
What is more interesting:
- If I change the GCC path to non-existing one, the build fails earlier with info " Cannot find the program 'gcc'" - which is good, it shows that this option actually makes some effect.
- If I change my
package.yamlcc-optionsfrom--std=c++17to--version(a little dirty hack), then I can see in my terminal printedgcc (Gentoo 4.9.3 p1.5, pie-0.6.4) 4.9.3which is my system-wide GCC - so clearly stack uses wrong GCC here. - If I create a local folder (lets call it
localbin) and I create symlinkgcc -> /usr/bin/gcc-6.4.0and export it to be on the beginning of$PATHand then invoke stack, everything works.
Stack version
1.6.5
Method of installation
- Official binary, downloaded from stackage.org or fpcomplete's package repository
mouse07410
Metadata
Metadata
Assignees
Labels
No labels