Opened 7 years ago

Closed 7 years ago

#53709 closed defect (fixed)

ghc @7.8.3: segmentation fault during build

Reported by: kkbt Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: 9peppe (Giuseppe C), kencu (Ken), mojca (Mojca Miklavec), dliessi (Davide Liessi)
Port: ghc

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Build of ghc fails when trying to install port pandoc.
A segmentation fault is reported:

	:info:build make[1]: *** [compiler/stage2/dll-split.stamp] Segmentation fault: 11

The OS and software versions are:

MacBook Air with Mac OS X 10.11.6 (15G1217)
with current MacPorts 2.4.1

ports:
pandoc @1.12.4.2_1 (textproc)
ghc @7.8.3_5 (lang, haskell)

The command was:

	sudo port -N install pandoc

Surprisingly, an installation a day earlier on a MacBook with identical OS and software versions was successful.

Logs are attached.

Attachments (1)

Logs.txt (7.7 KB) - added by kkbt 7 years ago.
Logs

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by kkbt

Attachment: Logs.txt added

Logs

comment:1 Changed 7 years ago by mf2k (Frank Schima)

Priority: HighNormal

The Priority field is for Macports Developers only. Please do not set it.

comment:2 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: ghc pandoc removed
Summary: Build of ghc fails when trying to install port pandocghc @7.8.3: segmentation fault during build

Please attach the entire main.log (compressed if large).

comment:3 Changed 7 years ago by 9peppe (Giuseppe C)

Cc: 9peppe added

comment:4 Changed 7 years ago by mojca (Mojca Miklavec)

Cc: kencu added
Version: 2.4.1

Here are the logs (not necessarily failing for the same reason):

It is worth noting that ghc builds just fine on 10.6/x86_64, 10.7, 10.9, 10.10, 10.12.

Now, if you take a look at the blacklist:

# Compilation fails with older versions of clang. clang-4.1 from Xcode 4.5 is
# too old, clang-5.1 from from Xcode 5.1 works. I do not have any data points in
# between, so I'm blacklisting everything lower than 5.1. If you want to test
# the versions in between, be my guest.
# Also avoid LLVM GCC 4.2 and GCC 4.2, which are before MacPorts' clang 3.4 in
# the fallback list on some systems.
# NOTE that it is actually the C compiler used in ghc-bootstrap that is
# relevant here. This code block is duplicated in this port to avoid
# inconsistencies.
compiler.blacklist-append \
                llvm-gcc-4.2 \
                gcc-4.2 \
                {clang < 503.0.38} \
                macports-clang-3.3

the clang < 503.0.38 blacklists the system compiler on 10.7 and earlier, but not on 10.8 and later. It could be that the system compiler on 10.8 is simply no longer up to the task. I guess that blacklisting clang on 10.8 would solve the problem on that OS, but that's probably orthogonal to the problem on 10.11.

Do we have anyone with 10.8?

Does anyone have ideas about 10.11?

Last edited 7 years ago by mojca (Mojca Miklavec) (previous) (diff)

comment:5 Changed 7 years ago by mojca (Mojca Miklavec)

Cc: mojca added

comment:6 Changed 7 years ago by mojca (Mojca Miklavec)

Owner: set to neverpanic
Status: newassigned

comment:7 Changed 7 years ago by kencu (Ken)

I think ghc may not available for i386 any more - there is no ghc-bootstrap compiler available for i386. Likewise ppc is no longer available (although I see there is an older version for 10.5 ppc that can be installed from a binary if that ever really matters to anybody, and an even older version for 10.4 PPC).

The failure on 10.8 is almost certainly because the clang version written into /opt/local/share/ghc-bootstrap/libexec/clang-wrapper in the installed binary is missing when ghc-bootstrap is reinstalled from a binary.

I don't have any idea why the build segfaults on 10.11, tho.

comment:8 Changed 7 years ago by dliessi (Davide Liessi)

Cc: dliessi added

comment:9 Changed 7 years ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed

In b6060617db664a7ca586df1d8894da2054f7db75/macports-ports:

ghc and ghc-bootstrap: specify compiler to clang-4.0

on older systems and on 10.11
and add a build and runtime dependency for clang-4.0
as this compiler needs to be present when ghc is used.
closes: #54363
closes: #53709
closes: #50962
closes: #50480

Note: See TracTickets for help on using tickets.