Jon Mountjoy writes:
> 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.
Hi,
thanks for the useful feedback, I've cleaned up bits and pieces for
2.03, fixing the various installation glitches you
encountered. Specific comments follow..
--Sigbjorn
>
> [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.
>
Sigh, yes something needs to be done, a bit puzzling that the execl()
call does not run into the problem of ARG_MAX, but execvp() does.
> [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?
>
Hmm..does compiling required/Directory.o with the make cmd-line
setting of EXTRA_HC_OPTS='-DNON_POSIX_SOURCE' improve matters?
If that doesn't work, could you if possible compile Directory with -v
and send me the output?