Forum OpenACS Q&A: Re: Missing tclsh on Solaris - how to fix?

Posted by Janine Ohmer on
The error I get when building tDOM is

checking for tclsh... configure: error: No tclsh found in PATH:  /usr/local/src/aolserver-3.3+ad13/aolserver/tcl8.3.2/unix /usr/local/src/aolserver-3.3+ad13/aolserver/tcl8.3.2/unix/../bin /usr/local/bin /usr/local/bin /oracle/u00/app/oracle/product/8.1.7/bin /oracle/u00/app/oracle/product/8.1.7/ctx/lib /bin /usr/bin /usr/ucb /usr/bin/X11 /usr/local/bin /usr/local/bin /usr/ccs/bin

Which is absolutely true.  The AOLserver build doesn't create tclsh.  I tried going into /usr/local/src/aolserver-3.3+ad13/aolserver/tcl8.3.2/unix and typing make there, but I got lots of errors like this:

Undefined                      first referenced
symbol                            in file
ns_calloc                          /usr/local/src/aolserver-3.3+ad13/aolserver/tcl8.3.2/unix/libtcl8.3g.a(nsthreads.o)
Ns_TlsSet                          /usr/local/src/aolserver-3.3+ad13/aolserver/tcl8.3.2/unix/libtcl8.3g.a(nsthreads.o)
ns_free                            /usr/local/src/aolserver-3.3+ad13/aolserver/tcl8.3.2/unix/libtcl8.3g.a(nsthreads.o)

Setting CC to gcc did fix the problem compiling the 8.3.5 version of tclsh, once I reran configure, but I still wasn't able to build:

In file included from ../generic/tclPort.h:27,
                from ../generic/tclAlloc.c:22:
../unix/tclUnixPort.h:42:26: net/errno.h: No such file or directory
In file included from ../generic/tclPort.h:27,
                from ../generic/tclAlloc.c:22:
../unix/tclUnixPort.h:255: error: conflicting types for `gettimeofday'
/usr/include/sys/time.h:397: error: previous declaration of `gettimeofday'
make: *** [tclAlloc.o] Error 1

So I decided to punt and I installed the 8.4.1 binaries from sunfreeware.
This enabled me to run CONFIG for tDOM without incident.

Unfortunately, now tDOM won't build:

bash-2.05$ make
-DWORDS_BIGENDIAN=1 -DBYTEORDER=4321 -I../generic -I../expat -I"/usr/local/
include" -I/usr/local/src/aolserver-3.3+ad13/aolserver/include -O -fPIC -O
-c `echo ../generic/xmlsimple.c` -o xmlsimple.o
In file included from ../generic/xmlsimple.c:69:
../generic/dom.h:487: error: parse error before "Tcl_Obj"
../generic/dom.h:487: warning: no semicolon at end of struct or union
../generic/dom.h:495: error: parse error before '}' token

etc, etc

I looked at dom.h and it looked ok to me. Which makes sense, since if there was a real error it wouldn't build for anyone and would have been reported long before now.  I've seen similar errors posted for previous versions, always on Solaris, so apparently there is something extra-picky about this build environment.  In the past Rolf has fixed these errors, so this must be a new one.

I've posted this to the tDOM yahoo group, but no response yet.  Slackers, taking weekends off! :)