Re: compiling hugs

Anthony Clayden <[email protected]> Wed, 22 Apr 2020 22:56:43 +1200
Newsgroups gmane.comp.lang.haskell.hugs.user
Message-ID <CAM7nRYRdg8B3gv9BTfm=5eKVG9XWtKMSvVBFw6Fjf27DiqCVEQ@mail.gmail.com>
--===============5092375944047253398==
Content-Type: multipart/alternative; boundary="0000000000007fca5505a3defd59"

--0000000000007fca5505a3defd59
Content-Type: text/plain; charset="UTF-8"

Hi Sam, I have some good news, but mostly bad news.

>
> Please do let me know if anybody can figure out how to compile the
> missing library!

To answer your last point first, Franklin Chen figured out how to compile
the library
-- it's a two-line fix, that gets three .dlls to compile.
See around line 220 in here:
https://github.com/FranklinChen/hugs98-plus-Sep2006/blob/master/packages/base/include/HsBase.h
;
also see the git change history for that header file.

One piece of bad news is you can't simply apply that patch and continue the
make:
the make had already got three compile fails: Ptr.dll, Alloc.dll, Error.dll.
So the error you report is somewhat later when something tries to grab
Ptr.dll and it isn't there.
You'd need to compile those three by hand, then restart the make.
Given your goals, I think you'd do better to blow away what you have,
unzip from the distro and start again. But wait!

There are heaps more patches that Franklin applied, including some to other
header files
that are very similar to the fix to HsBase.h. So I'm nowhere near getting
the make to finish.

Furthermore I'm getting tripped up by bits of earlier installs hanging
around.
On Windows, Hugs holds stuff in Registry HKEY_CURRENT_USER.
My attempted make keeps picking up directory names from there, then getting
banjaxed.

I haven't looked at the Mac install process to see if you'd run into that.

> I had considered doing that [grabbibg binaries from elsewhere],
> but I didn't want to start downloading
> binaries because my entire interest in hugs is driven by a compulsion to
> be able to bootstrap a Haskell compiler with nothing but a C compiler to
> hand and relying on pre-built binaries is as sinful as just using a
> pre-built ghc in that frame of mind.

Well the make uses a great variety of tools, not just gcc,
 and including sed, grep and perl (I think).

If you're worried about provenance,take a look in the top-level Makefile.
It accesses two repos over the interwebs and seems to download stuff from them
using 'darcs get'.
Clearly a vector to introduce malware.
(Not that I'm suggesting anybody's malicious, probably those repos are dead;
 Joachim was particularly anxious to avoid any chance of Trojans
getting into the build.)

Please do have another crack. It'll be handy if you can turn up more fails.

AntC

--0000000000007fca5505a3defd59
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">Hi Sam, I have some good news, but mostly bad news.</div>=
<pre style=3D"white-space:pre-wrap;background-color:rgb(255,255,255)"><div =
dir=3D"auto">&gt;
&gt; Please do let me know if anybody can figure out how to compile the</di=
v><div dir=3D"auto">&gt; missing library!
</div></pre><div dir=3D"auto">To answer your last point first, Franklin Che=
n figured out how to compile the library</div><div dir=3D"auto">-- it&#39;s=
 a two-line fix, that gets three .dlls to compile.</div><div dir=3D"auto">S=
ee around line 220 in here:=C2=A0<div><a href=3D"https://github.com/Frankli=
nChen/hugs98-plus-Sep2006/blob/master/packages/base/include/HsBase.h">https=
://github.com/FranklinChen/hugs98-plus-Sep2006/blob/master/packages/base/in=
clude/HsBase.h</a>;</div><div dir=3D"auto">also see the git change history =
for that header file.</div><div dir=3D"auto"><br></div><div dir=3D"auto">On=
e piece of bad news is you can&#39;t simply apply that patch and continue t=
he make:</div><div dir=3D"auto">the make had already got three compile fail=
s: Ptr.dll, Alloc.dll, Error.dll.</div><div dir=3D"auto">So the error you r=
eport is somewhat later when something tries to grab</div><div dir=3D"auto"=
>Ptr.dll and it isn&#39;t there.</div><div dir=3D"auto">You&#39;d need to c=
ompile those three by hand, then restart the make.</div><div dir=3D"auto">G=
iven your goals, I think you&#39;d do better to blow away what you have,</d=
iv><div dir=3D"auto">unzip from the distro and start again. But wait!</div>=
<div dir=3D"auto"><br></div><div dir=3D"auto">There are heaps more patches =
that Franklin applied, including some to other header files</div><div dir=
=3D"auto">that are very similar to the fix to HsBase.h. So I&#39;m nowhere =
near getting the make to finish.</div><div dir=3D"auto"><br></div><div dir=
=3D"auto">Furthermore I&#39;m getting tripped up by bits of earlier install=
s hanging around.</div><div dir=3D"auto">On Windows, Hugs holds stuff in Re=
gistry HKEY_CURRENT_USER.</div><div dir=3D"auto">My attempted make keeps pi=
cking up directory names from there, then getting banjaxed.</div><div dir=
=3D"auto"><br></div><div dir=3D"auto">I haven&#39;t looked at the Mac insta=
ll process to see if you&#39;d run into that.</div></div><div dir=3D"auto">=
<br></div><div dir=3D"auto">&gt;=C2=A0<span style=3D"white-space:pre-wrap;b=
ackground-color:rgb(255,255,255)">I had considered doing that [grabbibg bin=
aries from elsewhere],</span></div><div dir=3D"auto"><span style=3D"white-s=
pace:pre-wrap;background-color:rgb(255,255,255)">&gt; but I didn&#39;t want=
 to start downloading</span></div><div dir=3D"auto"><span style=3D"white-sp=
ace:pre-wrap;background-color:rgb(255,255,255)">&gt; binaries because my en=
tire interest in hugs is driven by a compulsion to</span></div><div dir=3D"=
auto"><span style=3D"background-color:rgb(253,253,253)">&gt;=C2=A0</span><s=
pan style=3D"white-space:pre-wrap;background-color:rgb(255,255,255)">be abl=
e to bootstrap a Haskell compiler with nothing but a C compiler to</span></=
div><div dir=3D"auto"><span style=3D"white-space:pre-wrap;background-color:=
rgb(255,255,255)">&gt; hand and relying on pre-built binaries is as sinful =
as just using a</span></div><div dir=3D"auto"><span style=3D"background-col=
or:rgb(253,253,253)">&gt;=C2=A0</span><span style=3D"white-space:pre-wrap;b=
ackground-color:rgb(255,255,255)">pre-built ghc in that frame of mind.</spa=
n></div><pre style=3D"white-space:pre-wrap;background-color:rgb(255,255,255=
)"><div dir=3D"auto">Well the make uses a great variety of tools, not just =
gcc,</div><div dir=3D"auto"> and including sed, grep and perl (I think).</d=
iv><div dir=3D"auto"><br></div><div dir=3D"auto">If you&#39;re worried abou=
t provenance,take a look in the top-level Makefile.</div><div dir=3D"auto">=
It accesses two repos over the interwebs and seems to download stuff from t=
hem=C2=A0</div><div dir=3D"auto">using &#39;darcs get&#39;.</div><div dir=
=3D"auto">Clearly a vector to introduce malware.</div><div dir=3D"auto">(No=
t that I&#39;m suggesting anybody&#39;s malicious, probably those repos are=
 dead;</div><div dir=3D"auto"> Joachim was particularly anxious to avoid an=
y chance of Trojans getting into the build.)</div><div dir=3D"auto"><br></d=
iv><div dir=3D"auto">Please do have another crack. It&#39;ll be handy if yo=
u can turn up more fails.</div><div dir=3D"auto"><br></div><div dir=3D"auto=
">AntC</div></pre>

--0000000000007fca5505a3defd59--

--===============5092375944047253398==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSHVncy1Vc2Vy
cyBtYWlsaW5nIGxpc3QKSHVncy1Vc2Vyc0BoYXNrZWxsLm9yZwpodHRwOi8vbWFpbC5oYXNrZWxs
Lm9yZy9jZ2ktYmluL21haWxtYW4vbGlzdGluZm8vaHVncy11c2Vycwo=

--===============5092375944047253398==--