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

Collapse
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:

gcc -pipe -c -O -Wall -Wconversion -Wno-implicit-int -fPIC -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DUSEGETWD=1 -DNO_STRERROR=1 -DNO_GETWD=1 -DNO_WAIT3=1 -DNO_UNAME=1 -DNO_REALPATH=1 -DNO_STDLIB_H=1 -DNO_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_TERMIOS=1 -DTM_IN_SYS_TIME=1 -DHAVE_SYS_TIME_H=1 -DHAVE_TIMEZONE_VAR=1 -DNO_FSTATFS=1 -DNO_MEMMOVE=1 -DNO_STRING_H=1 -Dmode_t=int -Dpid_t=int -Dsize_t=unsigned -Duid_t=int -Dgid_t=int -DUSE_DIRENT2_H=1 -DNO_UNION_WAIT=1 -DNEED_MATHERR=1 -DNO_GETTOD=1 -DGETTOD_NOT_DECLARED=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_NET_ERRNO_H=1 -D_REENTRANT=1 -D_POSIX_PTHREAD_SEMANTICS=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1        -DTCL_SHLIB_EXT=\".so\" -DUSE_TCLALLOC=0 ./../generic/tclAlloc.c
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
gcc -pipe -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DTCL_THREADS=1
-DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1
-DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DHAVE_UNISTD_H=1
-DHAVE_SYS_PARAM_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNO_UNION_WAIT=1
-DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1
-DHAVE_SYS_FILIO_H=1 -DSTATIC_BUILD=1 -DHAVE_MEMMOVE=1
-DHAVE_BCOPY=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_DIRENT64=1
-DHAVE_STRUCT_STAT64=1 -DHAVE_TYPE_OFF64_T=1 -DHAVE_UNISTD_H=1
-DHAVE_SYS_PARAM_H=1 -DVERSION=\"0.7.8\" -DUSE_THREAD_ALLOC=1
-D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1
-DHAVE_READDIR_R=1 -DTCL_THREADS=1 -D_REENTRANT=1
-D_POSIX_PTHREAD_SEMANTICS=1 -DUSE_TCL_STUBS=1 -DNS_AOLSERVER=1
-DUSE_NORMAL_ALLOCATOR=1 -DXML_DTD=1 -DXML_NS=1
-DTDOM_NO_UNKNOWN_CMD=1 -DUSE_NORMAL_ALLOCATOR=1
-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
-fPIC
-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! :)