Forum OpenACS Development: Error installing tcl 8.4x (how to solve)

Hi!

I had an error installing tcl 8.4.x. Error was something like this:

checking system version (for dynamic loading)... ./unix/configure: line
7654: syntax error near unexpected token `)'
./unix/configure: line 7654: ` OSF*)'

Problem is with bash 3.1. You have to change two lines at configure.in ( Normally at /usr/local//usr/local/src/tcl8.4.XX/unix ) removing the ' character in two lines:

- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
+ system=MP-RAS-`awk '{print $3}' /etc/.relid`

This is documented at:
http://sourceforge.net/mailarchive/forum.php?thread_id=9384126&forum_id=3854

I put this here because I didn't see any post about it.

Same thing occurs installing tDOM 0.8.0

Diff changes:

--system=MP-RAS-`awk '{print }' /etc/.relid'`
++system=MP-RAS-`awk '{print }' /etc/.relid`

at configure file at (tipically) /usr/local/src/aolserver4.X.C/tDOM-0.X.X/

Collapse
Posted by Malte Sussdorff on
Same needs to be done for libthread (thread2.6.2)
Collapse
Posted by Michael Schlenker on
For many extensions an upgrade to the newer TEA 3.5 tcl.m4 macros fixes this bug.

Look for the tclconfig subdir of the package and try to import the one from:
http://tcl.cvs.sourceforge.net/tcl/tclconfig/

then rerun autoconf to regenerate the configure.

I've received a post from Aolserver list, and perhaps it works. I cited here from John:
"
I use tDOM on the 64 bit machine, and instead of installign tDOM from a tea file, I installed from the tarfile, with the command:

../configure --enable-threads --with-tcl=/usr/local/lib/ --enable-64bit

and didn't have any problems with tDOM under 64 bit aolserver.
"

Collapse
Posted by Rolf Ade on
As others already wrote, that was a bug in older versions of the TEA build system (which is used by tDOM). bash versions < 3.0 didn't notice, but bash >= 3.9 does.

That's fixed in tDOM CVS since, hum, some time.

The current release version 0.8.2 includes a close to newest TEA version and does not have this problem. If you're compiling for 64bit, 0.8.2 is double recommended, because it included important fixed for 64bit platforms.

If you compile for 64bit, you have to add --disable-tdomalloc to the configure options. Don't forget this. That's the default in the meantime in tDOM CVS head and will be in future versions.

Collapse
Posted by Tom Jackson on

I always write a file called my-configure so I can remember what I did. For tDOM, I use this:

#!/bin/bash

../configure --enable-threads \
        --enable-shared \
        --enable-dtd \
        --enable-ns \
        --disable-unknown \
        --disable-tdomalloc \
        --with-tcl=/web/nsd45/lib \
        --with-aolserver=/web/nsd45

From the unix subdirectory.

For some reason configure is in the parent directory but you have to run it from the unix directory. But the build appears to be 64 bit:

/web/nsd45/lib/tdom0.8.1 $ file libtdom0.8.1.so
libtdom0.8.1.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped

So maybe it picks up the 64bit from Tcl? Here is my tcl my-configure:

#!/bin/bash

./configure --prefix=/web/nsd45 \
  --enable-64bit \
  --enable-threads \
  --enable-shared

This is also run from the unix directory, but configure is in the unix directory in this case.

AOLserver has this my-configure:

#!/bin/bash

./configure --prefix=/web/nsd45 \
  --with-tcl=/web/nsd45/lib \
  --enable-threads \
  --enable-shared \
  --enable-debug \
  --enable-symbols

And my nsd is 64bit:

/web/nsd45/bin $ file nsd
nsd: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
Collapse
Posted by Gustaf Neumann on
To remember how a tcl component was configured: Check out e.g. tdom/unix/config.log it contains at the top the last configure command.

To address the "maybe": check out /web/nsd45/lib/tclConfig.sh which contains most likely the 64bit flags.

Collapse
Posted by Tom Jackson on
Yes tdom/unix/config.log does contain the last command line, but it isn't general. Tcl puts it in config.status, not in config.log I also copy the file around when I update to a new version, so a separate file helps me find what I did last.

I compiled Tcl with --enable-64bit as shown above. In AOLserver I don't see any 64bit flags (tcl cc is gcc -pipe) and config.log doesn't seem to do any checking, but the arch is x86_64. Whatever the reason, I didn't need to put the --enable-64bit option when doing configure for tDOM or AOLserver.