[Hugs-users] compiling hugs

Anthony Clayden anthony_clayden at clear.net.nz
Wed Apr 22 10:56:43 UTC 2020


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/hugs-users/attachments/20200422/0f5501ae/attachment.html>


More information about the Hugs-Users mailing list