#54908 closed defect (worksforme)
ghc @7.8.3_6: fails to build in trace mode on 10.11
Reported by: | dliessi (Davide Liessi) | Owned by: | neverpanic (Clemens Lang) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | ghc |
Description
Probably missing dependencies?
See in particular the trace mode warnings regarding files provided by Haskell ports and gc.h
.
Full log attached.
Terminal output:
$ sudo port -ts destroot ghc ---> Computing dependencies for ghc ---> Fetching distfiles for ghc ---> Verifying checksums for ghc ---> Extracting ghc ---> Applying patches to ghc ---> Configuring ghc Warning: The following existing files were hidden from the build system by trace mode: /opt/local/bin/alex /opt/local/bin/gmake /opt/local/bin/gnutar /opt/local/bin/grep /opt/local/bin/gsed /opt/local/bin/happy /opt/local/share/xml/docbook/4.1.2/catalog.xml /opt/local/share/xml/docbook/4.2/catalog.xml /opt/local/share/xml/docbook/4.3/catalog.xml /opt/local/share/xml/docbook/4.4/catalog.xml /opt/local/share/xml/docbook/4.5/catalog.xml /opt/local/share/xml/docbook/5.0/catalog.xml /opt/local/share/xsl/docbook-xsl/catalog.xml Warning: The following file inside the MacPorts prefix not installed by a port was accessed: /opt/local/etc/xml/catalog ---> Building ghc Warning: The following existing files were hidden from the build system by trace mode: /opt/local/bin/alex /opt/local/bin/grep /opt/local/bin/haddock /opt/local/bin/happy /opt/local/bin/hpc /opt/local/bin/pkg-config /opt/local/include/gc/gc.h /opt/local/include/mach-o/fat.h /opt/local/include/mach-o/loader.h /opt/local/include/mach-o/nlist.h /opt/local/include/mach-o/reloc.h /opt/local/include/mach-o/x86_64/reloc.h Warning: The following file inside the MacPorts prefix not installed by a port was accessed: /opt/local/include/GC.h Error: Failed to build ghc: command execution failed Error: See /opt/local/var/macports/logs/_opt_macports-git_macports-ports_lang_ghc/ghc/main.log for details. Error: Follow https://guide.macports.org/#project.tickets to report a bug. Error: Processing of port ghc failed
Attachments (1)
Change History (4)
Changed 7 years ago by dliessi (Davide Liessi)
Attachment: | main.log.bz2 added |
---|
comment:1 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | neverpanic removed |
---|---|
Owner: | set to neverpanic |
Status: | new → assigned |
comment:2 Changed 5 years ago by neverpanic (Clemens Lang)
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
I'm assuming this is fixed with the recent update to GHC 8.6 as merged in https://github.com/macports/macports-ports/pull/4794.
Also, I'm no longer maintaining GHC as of https://github.com/macports/macports-ports/pull/5049, so should this still be a problem, this ticket should be assigned to the new maintainer.
Note: See
TracTickets for help on using
tickets.
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.