<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr">Hi,</div><div dir="ltr"><br><blockquote type="cite">On 3 Oct 2019, at 6:50 pm, Steven Smith <steve.t.smith@gmail.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><meta http-equiv="Content-Type" content="text/html; charset=utf-8">I have a build failure on a system with `port select --set gcc mp-gcc9` set:<div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">:info:build /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0/include-fixed/ma</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">th.h:45:10: error:</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">:info:build      fatal error: sys/cdefs.h: No such file or directory</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">:info:build        45 | #include <sys/cdefs.h></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">:info:build           |          ^~~~~~~~~~~~~</span></div></blockquote></div><div class=""><br class=""></div><div class="">This is with the port hlint, which uses port group haskell_cabal:</div><div class=""><a href="https://github.com/macports/macports-ports/blob/master/_resources/port1.0/group/haskell_cabal-1.0.tcl" class="">https://github.com/macports/macports-ports/blob/master/_resources/port1.0/group/haskell_cabal-1.0.tcl</a></div><div class=""><br class=""></div><div class="">The build works if I make sure that “gcc” points to /usr/bin/gcc.</div><div class=""><br class=""></div><div class="">How should this be done in MacPorts to avoid this issue? I just want to make sure that the native system gcc is used, not the MacPorts gcc.</div></div></blockquote><div><br></div>The build needs to be configured to use a fully specified compiler, with the full path, rather than relying on whatever it happens to pick up via the PATH env var, which is the only way a port select setting can have an impact on a port build.<div><br></div><div>B.t.w. MacOS no long really has gcc, at least on all but now ancient OS versions. /usr/bin/gcc is really just a convenience wrapper around the system clang compiler...</div><div><br></div><div>Chris</div><div><br><blockquote type="cite"><div dir="ltr"><div class=""><br class=""></div><div class="">We’re already setting these compiler options in haskell_cabal:</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class="">compiler.library_path<br class="">compiler.cpath</blockquote><div class=""><br class=""></div></div></div></blockquote></div></body></html>