Building Main/StackSetupShim triggers un-silenceable -nopie warnings with clang #4009
In attempting to upgrade a library (haskell-tree-sitter) to a newer Stackage nightly (
These errors also appear when compiling dependent C code in the project itself; I was able to fix them with the following stanza in my stack.yaml:
However, I'm unable to figure out how to silence these warnings when building the
I am running macOS 10.13.4 with stack 1.7.1. The output of
Steps to reproduce
A clean build free of C errors.
Seemingly-unsilenceable errors from
Method of installation
EDIT: fixed repository link
The text was updated successfully, but these errors were encountered:
This is probably an upstream issue https://ghc.haskell.org/trac/ghc/ticket/15112 which unfortunately doesn't look near being closed. According to that, there's an incompatibility with XCode's clang. Specifying the c compiler to use may help (although
The workaround looks like the best approach, for now, though there should probably be some documentation fixes for os x.
It may be possible to edit the default settings, though.
Replacing gcc(clang) in "C compiler command" field with brew installed gcc works for me.