Hello Everybody,
Ah, all compiled and installed! Except for the errors noted in my previous
email, I thought I'd also share the following problems experienced while
compiling ghc-2.02 on my Sparc running Solaris 2.5.1.
[1] It took a long time :-)
[2] There was a serious problem when, during the build, it tried to
link everything to form hsc.
That is, it had a: ghc-0.29 blahx1000files -o hsc
It appears that on my Solaris 2.5.1 machine, this is just
too much and I got a: gmake:ghc-0.29:execvp error: Argument list
too long. This was a difficult one to solve. I eventually hacked the
makefile and changed the line: ghc $(HSOBJS) or something to
exec ghc $(HSOBJS) as it appears that if you pass the arguments via
exec then it can get them through. This of course is not a general
solution, but the problem is probably quite specific too. Perhaps
something to be noted for other Solaris users.
[3] Two other fatal errors occured while compiling required/Directory.lhs,
first normally and then with profiling. The error occurs when the
C compiler gets hold of the /tmp/ghc....hc file and crashes with:
/tmp/ghc10200.hc:21874: structure has no member named `_tv_sec'
It appears that this line reads:
((unsigned long *)(_ccall_arg2))[0] = ((struct stat *)(_ccall_arg1))->st_mtime;
Now st_mtime is either #defined to st_mtim.tv_sec or st_mtim._tv_sec
in the sys/stat.h file. I searched and searched, but I could not find
the ghc file/cc file which defined the necessary variables to make
stat.h select the st_mtim._tv_sec and not the st_mtim.tv_sec.
The relevant portion of stat.h is appended below.
So, I hacked the intermediate .hc file before it got passed to the compiler
and changed st_mtime to st_mtim.tv_sec and all went well. I don't know
enough about the include structure of ghc to figure out the good
fix for this one, but it is certainly necessary. The same problem bit
me when compiling ghc-0.29 some time ago... Perhaps a config problem?
[4] During installation, (gmake install), strip gets called on perl scripts.
Doesn't cause an error of course, but may do on some systems.
eg:strip: /home/jon/FunctionalLanguages/MyGHC-2.02/bin/gr2gran: invalid file type
[5] After installation the resulting ghc script does not work. It has about
4 bugs which stops perl with a syntax error. The first:
"syntax error in file /home/jon/FunctionalLanguages/MyGHC-2.02/bin/ghc at line 4,
next token "$libdir""
is caused by the line
$bindir='/home/jon/FunctionalLanguages/MyGHC-2.02/bin;'
It should of course be:
$bindir='/home/jon/FunctionalLanguages/MyGHC-2.02/bin';
The other three occur around lines 1220, 1240, 1244 and are the result
of spurious semicolons. eg: the semicolong after OK below:
if $StkChkByPageFaultOK;
&& $TargetPlatform !~ /nextstep/;
[6] After executing ghc script successfully, it fails with
/home/jon/FunctionalLanguages/MyGHC-2.02/lib/hsc: No such file or directory
It appears that hsc is installed in /MyGHC-2.02/libexec and
the compiler expects it in /MyGHC-2.02/lib/
Anyway, after these bridges have been crossed, the hello world
and nfib programs compile and run like the wind :-)
Cheerio,
Jon