Forum OpenACS Q&A: compiling problem with aolserver 4.0 on debian sarge.

Hi, I'm having problems following the install instructions on Debian Testing (aka Sarge). I cannot get Aolserver 4.0 to run on this system. I've followed the installation documentation and keep on getting errors. Tcl 8.4 was installed via apt-get install tcl8.4 so it is located in /usr/lib/tcl8.4. so, download aolserver4_r2 from CVS and i get errors:

root@dev:/usr/local/src/aolserver/aolserver# ./configure --with-tcl=/usr/lib/tcl8.4
creating cache ./config.cache
checking for Tcl configuration... found /usr/lib/tcl8.4/
checking for existence of /usr/lib/tcl8.4/ loading
checking for build with symbols... no
checking for timegm... yes
checking for fork1... no
checking for poll... yes
checking for drand48... yes
checking for random... yes
checking for _NSGetEnviron... no
checking how to run the C preprocessor... cc -E
checking for mach-o/dyld.h... no
checking for dl.h... no
checking need for dup high... no
checking msg_controllen in struct msghdr... yes
checking how to build server image... shared
updating cache ./config.cache
creating ./config.status
creating include/
creating include/Makefile.module
root@dev:/usr/local/src/aolserver/aolserver# make install
make[1]: Entering directory `/usr/local/src/aolserver/aolserver/nsthread'

  . . . . . more output that isn't necessary . . . . 

/bin/rm -f
gcc -pipe -shared -nostartfiles -L../nsthread -L../nsd -o error.o master.o memory.o mutex.o cslock.o rwlock.o reentrant.o sema.o thread.o tls.o signal.o compat.o time.o fork.o pthread.o  -L/usr/lib -ltcl8.4 -ldl  -lpthread -lieee -lm /usr/local/aolserver/lib /usr/lib
gcc: /usr/local/aolserver/lib: No such file or directory
make[1]: *** [] Error 1
make[1]: Leaving directory `/usr/local/src/aolserver/aolserver/nsthread'
make: *** [all] Error 1

So, I did a search on google and came up with this result. In which they tell me to edit include/ (after doing the config), and change:

CCRFLAG         =
LDRFLAG         =
CC              = $(PURIFY) gcc -pipe


CCRFLAG         =
LDRFLAG         =
CC              = $(PURIFY) gcc -pipe

If i do this it compiles fine without error, but when i go to /usr/local/aolserver and run the sample config this is what i get:

root@dev:/usr/local/aolserver# cd /usr/local/aolserver; ls -l
total 44
drwxr-sr-x    2 root     staff        4096 Feb  5 17:02 bin
drwxr-sr-x    2 root     staff        4096 Feb  5 17:02 include
drwxr-sr-x    2 root     staff        4096 Feb  5 17:02 lib
drwxrwsr-x    2 root     web          4096 Feb  5 17:02 log
drwxr-sr-x    5 root     staff        4096 Feb  5 17:02 man
drwxr-sr-x    3 root     staff        4096 Feb  5 17:02 modules
-rw-r--r--    1 root     staff       14805 Feb  5 17:02 sample-config.tcl
drwxrwsr-x    3 root     web          4096 Feb  5 17:02 servers
root@dev:/usr/local/aolserver# ./bin/nsd -t sample-config.tcl -u nobody -g -web
./bin/nsd: error while loading shared libraries: cannot open shared object file: No such file or directory

I'm kind of stuck, does anybody have any suggestions? Or do you need me to provide more info?

Thanks for the help.

that second entry should have been:
CCRFLAG         =
LDRFLAG         =
CCRPATH         +=
LDRPATH         +=
CC              = $(PURIFY) gcc -pipe
Posted by Jade Rubick on
I think you might be able to fix this with symlinks.

ln -s ...

Posted by Vinod Kurup on
nsd can't find (a new shared library in aolserver 4). You need to add /usr/local/aolserver/lib to your LD_LIBRARY_PATH.
root@dev:/usr/local/aolserver# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/aolserver/lib
root@dev:/usr/local/aolserver# ./bin/nsd -t sample-config.tcl -u nobody -g -web
Is the current Debian Testing Tcl 8.4.x compiled with --enable-threads (aka, thread-safe)? You must use a Tcl compiled with --enable-threads, which for reasons unknown to me, is not usually the default.

Also, you should probably make sure you are using the most recent Tcl 8.4.x release. As of early January, Tcl 8.4.4+ had some memory leaks, mostly with the file-related commands (file, glob, etc.), but Zoran Vasiljevic just reported today on the AOLserver list that the Tcl core-8-4-branch CVS branch now has those fixed. Based on its release date, my guess is those were not yet fixed in Tcl 8.4.5, but then since AFAIK they're "just" memory leaks they shouldn't cause nearly as much trouble as using a non-thread-safe Tcl.

Posted by Kevin Esteb on
According to the changelog on the debian site, yes it was compiled to be thread safe specifically for AOLserver.