[Radiance-general] Re: Compilation on Solaris 8 SPARC
Georg Mischler
[email protected]
Fri, 7 Jun 2002 12:19:58 -0400 (EDT)
Greg Ward wrote:
> Hi Len,
>
> I'm sorry to hear you're still having compile problems. For some
> reason, your version of the GNU-C headers doesn't include a definition
> of sys_errlist or sys_nerr, which causes the compile of error.c to fail
> in src/common, and subsequently the main Radiance library doesn't get
> built. The build all falls apart after that, as you noticed....
>
> You will have to manually edit the src/common/error.c file with a plain
> text editor and change the following lines near the top from:
>
> > #ifndef __GNUC__
> > extern char *sys_errlist[]; /* system error list */
> > extern int sys_nerr; /* number of system errors */
> > #endif
>
> to:
>
> > extern char *sys_errlist[]; /* system error list */
> > extern int sys_nerr; /* number of system errors */
>
> (I.e., take off the surrounding precompiler # statements.) After saving
> the file, rerun "makeall install". I'm hoping the build will work after
> that, assuming this was the only problem.
Is there any particular reason why you're avoiding the standard
function strerror() from string.h here? As far as I understand
the documentation, sys_errlist and sys_nerr aren't really meant
for direct access by user code. Or do we really still have to
take pre-ANSI implementations into account? If so, which ones?
Speaking more generally, I'd like to put in a strong vote for
ansifying Radiance completely. Even though this might look like a
highly tedious task (and probably is), I'd expect it to uncover
and eliminate at least a one or two dozen subtle bugs throughout
the code. In the long run, it would make all future development a
lot easier. Of course, if Radiance were to be put on public CVS
later this year, there's no reason why you would have to make
this conversion yourself...
-schorsch
--
Georg Mischler -- simulations developer -- schorsch at schorsch.com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/