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

Request notifications

I haven't worked much on Solaris lately and the sys admin is on vacation, so I'm on my own....

I need to compile tDOM, but that is asking for tclsh.  I was able to download tcl 8.3.5, which is close to the expected 8.3.2, but the binaries were no longer available.  So I'm trying to build it, but it's failing with

bash-2.05$ make
/usr/ucb/cc:  language optional software package not installed
make: *** [regcomp.o] Error 1

This is an error I've never seen before!

Can I use the latest version of tclsh, 8.4.5, which would allow me to install the binaries, or do I need to figure out how to fix this?

Thanks in advance!

Posted by Andrew Piskorski on
You're using "cc", but what compiler is that on your machine? Sun cc or gcc? You might be using the wrong one, or using the options intended for the other compiler, or something like that.

I never tried building tdom on Solaris but I think your compile error above is for Tcl anyway, not tdom. Whenever I've built Tcl from source on Solaris it Just Worked. I last did it like this:

$ cd checkouts/tcl/tcl-842/unix/
$ ./configure --enable-gcc --enable-shared --enable-threads
# env CC=gcc gmake
$ gmake
$ #gmake test
  # Files with failing tests: http.test httpold.test safe.test
$ sudo gmake install 
$ sudo chmod 755 /usr/local/bin/tclsh8.4
I'm not sure why I had that "env CC=gcc gmake" commented out in my notes above, but you might need or want to use that rather than the just plain "gmake" that I suspect worked ok for me.

If you're using AOLserver 3.3+ad13 and it's Tcl 8.3.x, I've no idea whether a tdom compiled with Tcl 8.4.x would work there or not. But wait a minute, for use in AOLserver 3.3, you have to compile tdom specially as an AOLserver module anyway, and AOLserver 3.3 ships with its own customized copy of Tcl 8.3.x, so isn't that what you should be using for building your tdom?

Posted by Dave Hwang on
It's looking for /usr/ucb/cc, but apparently you don't have the developer packages installed on that box. You could try forcing the make to use gcc instead (assuming you have gcc installed) and see if that lets it build.

On the other hand , you can find binaries (solaris packages, actually) for useful free software at That site can be slow, so I usually use a mirror like

If you look in the ftp archive, you can find older versions. Just go to the appropriate directory (Sparc|Intel/solaris-version) and grab the package you want.

Once you get a package, the steps for installation (assuming you have root access) are:

  • gunzip package_name.gz
  • pkgadd -d package_name
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! :)

Posted by Janine Ohmer on
Still no response on the tDOM group.  I tried an experiment of moving the files to a Solaris 8 system and they build just fine there.  So what does this indicate, a problem with gcc 3.3.2?
Posted by Janine Ohmer on
Got a reply from Zoran - he says he's had this sort of trouble compiling most things on Solaris 9, but that it seems to work fine to compile on an earlier version and move the finished result over.  I did this with tDOM and so far it seems to be working fine.