Hi,
On Thu, Apr 21, 2022 at 10:56:39PM -0700, Greg Steuck wrote:
> 1) We can no longer produce a viable bootstrap package for i386. This
> problem predates ghc-9.2.2. It has become a problem now because we need
> to rebuild the bootstrap to get 9.2.2 building. That's because the new
> version requires an extra library that previous ghc versions didn't
> need. Our inclination is to drop i386 support from lang/ghc. We have
> already been limited by i386 RAM and a couple of packages including
> haddock for ghc already can't be built.
>
> If you feel strongly enough to debug on i386, the bootstrap is
> available in the port. The error is:
> + exec utils/ghc-cabal/dist-install/build/tmp/ghc-cabal copy libraries/ghc-prim dist-install strip /usr/ports/pobj/ghc-9.2.2/bootstrap /usr/ports/pobj/ghc-9.2.2/bootstrap/lib/ghc /usr/ports/pobj/ghc-9.2.2/bootstrap/share/doc/ghc/html/libraries v
> Segmentation fault (core dumped)
>
> To reproduce, just don't apply the removal patch from my chain and try
> to build lang/ghc. The recipe to build your own bootstrap is in the port
> Makefile.
Just in case someone's going to do this, you'll also need (at least part
of) the diff below. It adds the libHSrts_l.a to the bootstrap and also
saves a little bit time by stopping after the stage-1 compiler is built.
Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/ghc/Makefile,v
retrieving revision 1.191
diff -u -p -r1.191 Makefile
--- Makefile 11 Mar 2022 19:29:00 -0000 1.191
+++ Makefile 19 Apr 2022 19:15:45 -0000
@@ -222,7 +220,7 @@ _bootstrap_prepare:
echo GhcStage2HcOpts=-O -fasm >> ${WRKSRC}/mk/build.mk
echo SplitObjs=NO >> ${WRKSRC}/mk/build.mk
echo GhcLibWays=v >> ${WRKSRC}/mk/build.mk
- echo GhcRTSWays=thr >> ${WRKSRC}/mk/build.mk
+ echo GhcRTSWays=thr l >> ${WRKSRC}/mk/build.mk
echo GhcWithInterpreter=NO >> ${WRKSRC}/mk/build.mk
echo GhcThreaded=YES >> ${WRKSRC}/mk/build.mk
echo INTEGER_LIBRARY=integer-simple >> ${WRKSRC}/mk/build.mk
@@ -233,12 +231,14 @@ _bootstrap_prepare:
echo GhcWithSMP=NO >> ${WRKSRC}/mk/build.mk
echo LD_OPTS=-optl-static -optl-s >> ${WRKSRC}/mk/build.mk
echo DYNAMIC_GHC_PROGRAMS=No >> ${WRKSRC}/mk/build.mk
+ echo Stage1Only=YES >> ${WRKSRC}/mk/build.mk
+ echo stage=1 >> ${WRKSRC}/mk/build.mk
echo ${BOOTSTRAP_DATE} > ${WRKSRC}/VERSION_DATE
_bootstrap_finish:
mkdir -p ${WRKBUILD}/ghc-${GHC_VERSION}.${BOOTSTRAP_DATE}-shlibs-$$(arch -s)
- ldd ${WRKBUILD}/ghc/stage2/build/tmp/ghc-stage2 | \
+ ldd ${WRKBUILD}/ghc/stage1/build/tmp/ghc-stage1 | \
awk '$$NF ~ /^\/usr\/(local\/)?lib\// { print $$NF }' | \
xargs -J % cp -p % ${WRKBUILD}/ghc-${GHC_VERSION}.${BOOTSTRAP_DATE}-shlibs-$$(arch -s)
cd ${WRKBUILD} && \
Ciao,
Kili
No comments:
Post a Comment