[MacPorts] #54908: ghc @7.8.3_6: fails to build in trace mode on 10.11

MacPorts noreply at macports.org
Wed Sep 27 12:50:27 UTC 2017


#54908: ghc @7.8.3_6: fails to build in trace mode on 10.11
----------------------+------------------------
  Reporter:  dliessi  |      Owner:  neverpanic
      Type:  defect   |     Status:  assigned
  Priority:  Normal   |  Milestone:
 Component:  ports    |    Version:
Resolution:           |   Keywords:
      Port:  ghc      |
----------------------+------------------------
Changes (by ryandesign):

 * cc: neverpanic (removed)
 * owner:   => neverpanic
 * status:  new => assigned


Comment:

 {{{
 :info:build /opt/local/bin/clang-mp-4.0 -E -I/opt/local/include -m64
 -DPROFILING -DTHREADED_RTS -DDEBUG -Irts/dist/build  -m64 -fno-stack-
 protector  -Wall -Wextra -Wstrict-prototypes  -Wmissing-prototypes
 -Wmissing-declarations -Winline -Waggregate-return -Wpointer-arith
 -Wmissing-noreturn -Wnested-externs -Wredundant-decls  -Iincludes
 -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-
 ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -fno-strict-
 aliasing -fno-common -DDTRACE        -O2 -fomit-frame-pointer
 -DRtsWay=\"rts_v\" -Wno-strict-prototypes
 -I/opt/local/lib/libffi-3.2.1/include   -DPARALLEL_GC -Irts/sm -MM -x c
 rts/dist/build/sm/Evac_thr.c -MF rts/dist/build/.depend-v-p-dyn-l-debug-
 thr-thr_debug-thr_l-thr_p-debug_dyn-thr_dyn-thr_debug_dyn-l_dyn-
 thr_l_dyn.c_asm.bit
 }}}
 {{{
 :info:build rts/dist/build/sm/Evac_thr.c:19:10: warning: non-portable path
 to file '"gc.h"'; specified path differs in case from file name on disk
 [-Wnonportable-include-path]
 :info:build #include "GC.h"
 :info:build          ^~~~~~
 :info:build          "gc.h"
 :info:build In file included from rts/dist/build/sm/Evac_thr.c:19:
 :info:build /opt/local/include/GC.h:2:10: fatal error: 'gc/gc.h' file not
 found
 :info:build #include <gc/gc.h>
 :info:build          ^~~~~~~~~
 :info:build 7 warnings and 1 error generated.
 }}}

 The `#include` wants to find a file in the ghc project called "GC.h". But
 because the build system incorrectly lists `-I/opt/local/include` first on
 the compile line, before any `-I` directives that specify the directory
 containing GC.h, and because you have installed a port such as boehmgc
 that provides the file /opt/local/include/gc.h, and because you have a
 case-insensitive filesystem, ghc finds /opt/local/include/gc.h instead of
 its own GC.h. The two files are not similar or interchangeable, hence the
 build failure.

 I'm actually surprised MacPorts allowed it to get that far; I thought the
 whole point of trace mode was that it prevented access to files from ports
 that aren't dependencies, but that doesn't appear to have been prevented
 here.

 The solution is to fix the order of the `-I` flags in the build system, or
 if that is too difficult, replace `-I/opt/local/include` with
 `-isystem/opt/local/include`; directories listed with `-isystem` are
 always searched after directories specified with `-I`, even if the
 `-isystem` directories appear earlier in the command line.

--
Ticket URL: <https://trac.macports.org/ticket/54908#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list