Bug 260130 - lang/ghc fails to build
Summary: lang/ghc fails to build
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Only Me
Assignee: freebsd-haskell (Nobody)
URL: https://cloud.zyxst.net/~john/FreeBSD...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-30 01:49 UTC by tech-lists
Modified: 2021-12-17 14:09 UTC (History)
2 users (show)

See Also:
arrowd: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tech-lists 2021-11-30 01:49:54 UTC
Hi,

rpi4b so arm64.aarch64 bare metal, default ports options.

Fails here:

[...]
[00:39:14] libraries/Cabal/Cabal/Distribution/Utils/Structured.hs:90:1: warning: [-Wdeprecations]
[00:39:14]     Module ‘Data.ByteString.Lazy.Builder’ is deprecated:
[00:39:14]       Use Data.ByteString.Builder instead
[00:39:14]    |
[00:39:14] 90 | import qualified Data.ByteString.Lazy.Builder as Builder
[00:39:14]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[00:39:35]   HC [stage 0] libraries/text/dist-boot/build/Data/Text/Lazy/IO.o
[00:39:39]   HC [stage 0] libraries/text/dist-boot/build/Data/Text/Internal/Builder.o
[00:39:47]   HC [stage 0] libraries/text/dist-boot/build/Data/Text/Lazy/Read.o
[00:39:56]   HC [stage 0] libraries/parsec/dist-boot/build/Text/Parsec/Combinator.o
[00:39:56]   HC [stage 0] libraries/parsec/dist-boot/build/Text/Parsec/Char.o
[00:40:03]   HC [stage 0] libraries/Cabal/Cabal/dist-boot/build/Distribution/Compat/Semigroup.o
[00:40:13]   HC [stage 0] libraries/parsec/dist-boot/build/Text/Parsec/String.o
[00:40:15]   HC [stage 0] libraries/parsec/dist-boot/build/Text/Parsec/ByteString.o
[00:40:15]   HC [stage 0] libraries/parsec/dist-boot/build/Text/Parsec/ByteString/Lazy.o
[00:40:16]   HC [stage 0] libraries/parsec/dist-boot/build/Text/Parsec/Text.o
[00:40:16]   HC [stage 0] libraries/parsec/dist-boot/build/Text/Parsec/Text/Lazy.o
[00:40:16]   HC [stage 0] libraries/text/dist-boot/build/Data/Text/Lazy/Builder.o
[00:40:17]   HC [stage 0] libraries/ghci/dist-boot/build/GHCi/Message.o
[00:40:17]   HC [stage 0] libraries/parsec/dist-boot/build/Text/Parsec.o
[00:40:18]   HC [stage 0] libraries/Cabal/Cabal/dist-boot/build/Distribution/Compat/Prelude.o
[00:40:19]   HC [stage 0] libraries/parsec/dist-boot/build/Text/Parsec/Token.o
[00:40:21]   HC [stage 0] libraries/parsec/dist-boot/build/Text/Parsec/Expr.o
[00:40:33]   HC [stage 0] libraries/parsec/dist-boot/build/Text/ParserCombinators/Parsec/Char.o
[00:40:34]   HC [stage 0] libraries/parsec/dist-boot/build/Text/ParserCombinators/Parsec/Combinator.o
[00:40:35]   HC [stage 0] libraries/parsec/dist-boot/build/Text/ParserCombinators/Parsec/Prim.o
[00:40:36]   HC [stage 0] libraries/text/dist-boot/build/Data/Text/Internal/Builder/Functions.o
[00:40:37]   HC [stage 0] libraries/Cabal/Cabal/dist-boot/build/Distribution/Compat/Parsing.o
[00:40:56]   HC [stage 0] libraries/Cabal/Cabal/dist-boot/build/Distribution/Parsec/Position.o
[00:41:05]   HC [stage 0] libraries/Cabal/Cabal/dist-boot/build/Distribution/Utils/Generic.o
[00:41:53] gmake[2]: *** [compiler/ghc.mk:307: compiler/stage1/build/DynFlags.o] Killed
[00:41:53] gmake[2]: *** Waiting for unfinished jobs....
[00:43:29] gmake[1]: *** [Makefile:126: all] Error 2
[00:43:29] gmake[1]: Leaving directory '/wrkdirs/usr/ports/lang/ghc/work/ghc-8.10.7'
[00:43:29] ===> Compilation failed unexpectedly.
[00:43:29] Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
[00:43:29] the maintainer.
[00:43:29] *** Error code 1
[00:43:29] 
[00:43:29] Stop.
[...]

full log at URL
Comment 1 Gleb Popov freebsd_committer 2021-11-30 07:54:08 UTC
It looks like out-of-memory problem. How much RAM do you have?
Comment 2 tech-lists 2021-11-30 17:33:40 UTC
(In reply to Gleb Popov from comment #1)

it's an 8GB raspberry pi 4.

USE_TMPFS=yes is set in poudriere.conf so I'll set that to "no" and see what happens

thanks
Comment 3 tech-lists 2021-12-01 01:51:47 UTC
(In reply to Gleb Popov from comment #1)

wuth USE_TMPFS set to no:

https://cloud.zyxst.net/~john/FreeBSD/ports/ghc/arm64.aarch64/ghc-8.10.7-poudriere-no-tmpfs.log

% swapinfo -h
Device              Size     Used    Avail Capacity
/dev/da0p2.eli       16G     107M      16G     1%

zroot/tmp on /tmp (zfs, local, noatime, nosuid, nfsv4acls)

error message is a bit different:

[02:13:41]     |
[02:13:41] 322 |     sched_setaffinity(0, sizeof(cpu_set_t), &cs);
[02:13:41]     |                                 ^
[02:13:41] 1 warning and 2 errors generated.
[02:13:41] `cc' failed in phase `C Compiler'. (Exit code: 1)
[02:13:41] gmake[2]: *** [rts/ghc.mk:325: rts/dist/build/posix/OSThreads.p_o] Error 1
[02:13:41] gmake[2]: *** Waiting for unfinished jobs....
[02:13:42] gmake[1]: *** [Makefile:128: all] Error 2
[02:13:42] gmake[1]: Leaving directory '/wrkdirs/usr/ports/lang/ghc/work/ghc-8.10.7'

next step is poudriere testport -J1
Comment 4 tech-lists 2021-12-01 02:38:25 UTC
(In reply to tech-lists from comment #3)

still fails with poudriere testport -J1

https://cloud.zyxst.net/~john/FreeBSD/ports/ghc/arm64.aarch64/ghc-8.10.7-poudriere-no-tmpfs-testport-J1.log
Comment 5 Gleb Popov freebsd_committer 2021-12-01 06:36:26 UTC
Yep, this is a known problem, I just didn't get to it yet, as I have too old CURRENT to reproduce this.

I'm going to handle this soon (tm).
Comment 6 Gleb Popov freebsd_committer 2021-12-14 12:04:50 UTC
I don't see cpuset_t related failures anymore on a fresh CURRENT system. The problem seems to be resolved?
Comment 7 tech-lists 2021-12-14 12:19:07 UTC
(In reply to Gleb Popov from comment #6)

I'll check
Comment 8 tech-lists 2021-12-14 13:39:20 UTC
(In reply to Gleb Popov from comment #6)

seems to be getting a little bit further but ghc takes a while on this hardware

 ID  TOTAL      ORIGIN   PKGNAME    PHASE PHASE    TMPFS   CPU%  MEM%
[01] 01:12:43 lang/ghc | ghc-8.10.7 build 01:05:11       176.3% 12.6%

will let you know when it completes
Comment 9 tech-lists 2021-12-14 20:32:41 UTC
(In reply to Gleb Popov from comment #6)

Problem is still there.

Full poudriere log:
https://cloud.zyxst.net/~john/FreeBSD/ports/ghc/arm64.aarch64/2021-12-14.ghc-8.10.7.log
Comment 10 Gleb Popov freebsd_committer 2021-12-15 05:41:32 UTC
(In reply to tech-lists from comment #9)
You server doesn't seem to be reachable.
Comment 11 tech-lists 2021-12-15 10:07:39 UTC
(In reply to Gleb Popov from comment #10)

Try here:

https://zyxst.net/FreeBSD/rpi4-8GB/2021-12-14.ghc-8.10.7.log.txt
Comment 12 Gleb Popov freebsd_committer 2021-12-15 17:32:08 UTC
(In reply to tech-lists from comment #11)
I believe you have too old CURRENT. Do you have commit 5e04571cf3cf in your branch?
Comment 13 tech-lists 2021-12-16 01:22:52 UTC
(In reply to Gleb Popov from comment #12)

it's impossible to tell from git, as the poudriere jail was built on the 2nd December but from -m src=/usr/src on that date.

git updates /usr/src daily (but poudriere doesn't build the jail daily)

I'll rebuild the jail and try again
Comment 14 tech-lists 2021-12-17 12:27:40 UTC
Hi,

This is building fine now. Do you want me to close this or shall I?

thanks
Comment 15 Gleb Popov freebsd_committer 2021-12-17 14:09:39 UTC
Thanks for testing!