Forum OpenACS Q&A: aolserver 4 install errors

Collapse
Posted by Dion Sweat on
i'm attempting to install aolserver 4 on a fresh fedora install and am getting errors.  i've installed tcl 8.4.5 and grabbed/configured aolserver from cvs.  make install fails with the following error message:

# make install
make[1]: Entering directory `/usr/local/src/aolserver/aolserver/nsthread'
/bin/rm -f nsthreadtest
gcc -pipe -L../nsthread -L../nsd -o nsthreadtest nsthreadtest.o libnsthread.so -L/usr/local/lib -ltcl8.4 -ldl  -lpthread -lieee -lm -rdynamic -Wl,-rpath,/usr/local/aolserver/lib -Wl,-rpath,/usr/local/lib
nsthreadtest.o(.text+0x79c): In function `DumperThread':
: undefined reference to `Tcl_GetMemoryInfo'
collect2: ld returned 1 exit status
make[1]: *** [nsthreadtest] Error 1
make[1]: Leaving directory `/usr/local/src/aolserver/aolserver/nsthread'
make: *** [all] Error 1

any ideas on what causes this?  any way around it?

Collapse
Posted by Ola Hansson on
Dion,

Did you configure with threads enabled? I think that may be the problem.

debian:/usr/local/src/tcl8.4.5_cvs/unix# make distclean
debian:/usr/local/src/tcl8.4.5_cvs/unix# ./configure --enable-threads
debian:/usr/local/src/tcl8.4.5_cvs/unix# make
debian:/usr/local/src/tcl8.4.5_cvs/unix# make install
/Ola
Collapse
Posted by Malte Sussdorff on
Also make sure TCL is compiled with thread-enabled. This must not be true in the TCL version installed by fedora. See https://openacs.org/doc/openacs-5-0-0/aolserver4.html.

If you already have TCL installed in /usr/local/lib, then you will overwrite your current TCL installation, just a warning, I don't have Fedora.

Collapse
Posted by Ola Hansson on
I was referring to the compilation of Tcl but I didn't express myself clearly. 😟
Collapse
Posted by Paul H on
I had similar problems under Debian-stable.

I tried with the old debian tcl 8.4.0 binary package,
then I (IIRC) tried compiling it manually with threads, and that didn't work,

eventually I followed the openacs docs to the letter and configured,built and installed tcl 8.4.5 (using the link there) under the rather non-standard location described in the docs (under aolserver i believe).

it does work, once you find the magic combination.  dont deviate from the docs and you might have more luck.

Collapse
Posted by Dion Sweat on
aolserver 4 is now running.  when i originally installed tcl, i didn't configure it with threads enabled.  aolserver complained about that fact so i went back and configured it with threads.  but even with threads enabled i got the error message i posted above (but no complaints about threads enabled).  after posting to the bulltein board, i went back to start the process over again, this time starting with make distclean.  i didn't do a make distclean previously and is the only thing i changed this time, and it worked.

now i can't start aolserver on port 80.  i am starting it as root.

[31/Jan/2004:10:27:24][15472.16384][-main-] Error: nssock: failed to listen on 127.0.0.1:80: Permission denied

Collapse
Posted by Ola Hansson on
You'll need to add "-b  <address>:<port>" to the nsd command line in order to run on port 80 I believe.
Collapse
Posted by Dion Sweat on
yes, that worked.  thanks everyone.
Collapse
Posted by Derek Carter on
I'm having a similar problem...
compiling aolserver4
I've compiled tcl correctly but I get this error when I run make in the aolserver directory

make[1]: Entering directory `/home/dcarter/tmp/aolserver-4.0.9/nsthread'
/bin/rm -f libnsthread.so
gcc -pipe -shared -Wl,-soname,libnsthread.so -L../nsthread -L../nsd -o libnsthread.so 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 -lz -lgcc_s
pthread.o(.text+0x0): In function `_init':
/home/dcarter/tmp/aolserver-4.0.9/nsthread/pthread.c:70: multiple definition of `_init'
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../crti.o(.init+0x0): first defined here
collect2: ld returned 1 exit status
make[1]: *** [libnsthread.so] Error 1
make[1]: Leaving directory `/home/dcarter/tmp/aolserver-4.0.9/nsthread'
make: *** [all] Error 1

Collapse
Posted by Steve Woodcock on
I had the same error on FC3 compiling AOLserver 4.0.9 against the stock tcl package rebuilt with --enable-threads.

I got it to work by building tcl locally from source with ./configure --enable-threads, make, make install, and configuring aolserver with ./configure --with-tcl=/usr/local/lib

Collapse
Posted by Cathy Sarisky on
Apologies for bumping the old thread, but it seems to pertain to my issues.

I'm trying to install AOLserver 4.0.9/10 (have tried both) with a thread-enabled tcl (8.4.15).

The error message I get is:
pthread.o(.text+0x0): In function `_init':
: multiple definition of `_init'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crti.o(.init+0x0):/usr/src/build/237294-i386/BUILD/glibc-2.3.2-200304020432/build-i386-linux/csu/crti.S:12: first defined here

while compiling nsthread.

I did ./configure --prefix=/usr/local/aolserver40r9 --with-tcl=/usr/local/lib/. I've confirmed that tclConfig.sh is in /usr/local/lib, and that tclsh shows that threads are enabled.

Any ideas?

Collapse
Posted by Tom Jackson on
If you have trouble compiling AOLserver you should post to the AOLserver list:

http://aolserver.com/lists.php

Unfortunately there is no substitute for asking your question in the right forum. If the problem is AOLserver, ask there.

Generally developers don't have problems compiling AOLserver or other required modules, so either you have discovered a unique issue, or you need specific help. The best advice is available at the AOLserver list and anyone using AOLserver should at least subscribe.

Collapse
Posted by Malte Sussdorff on
Though I would ask myself what the specific reason is of not using 4.5 😊
Collapse
Posted by Cathy Sarisky on
Tom, sorry, I'll take the question there.

Malte, I was following along with the directions. Is AOLserver 4.5 compatible with OpenACS 5.2? The compatibility matrix in the docs doesn't seem to have been updated recently, so I figured I was playing it safe by using the version specified. (Although it hasn't done me any good, thanks!)

Collapse
Posted by Cathy Sarisky on
Just to follow up, in case it helps, the problem was tcl version 8.4.15, as described here (http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg373887.html) I needed to downgrade to 8.4.12.
Collapse
Posted by Orzenil Silva Junior on
Cathy,

there is no need to downgrade tcl to old versions. I am using aolserver40r10 with thread-enable tcl-8.4.15.

Just do:

CPPFLAGS="-nostartfiles" ./configure --prefix=/usr/local/aolserver40r10 --with-tcl=/usr/local/lib

to avoid error message

pthread.o(.text+0x0): In function `_init':: multiple definition of `_init'

You'd consider check your OS to prevent other related pthreads error. Before compiling check for GNU_LIBPTHREAD_VERSION at command prompt

# getconf GNU_LIBPTHREAD_VERSION

If return is "NPTL"+version you also need comment out line

pthread_kill_other_threads_np()

in nsd/unix.c

Collapse
Posted by Koala Yeung on
I have the same problem on Fedora Core 7.
Still have no idea how to fix it.

I compiled and installed tcl. It didn't work.
I used the default tcl in Fedora Core 7 (thread enabled). It didn't work too.

Anybody have any idea?

Collapse
Posted by Gustaf Neumann on
have you added "-nostartfiles" to the link command of the aolserver (nsd)?
Collapse
Posted by Eduardo Palacio on
Solution for this aolServer issue

i´m installing aolserver4.5.0, postgresql-7.4.19.tar.gz & tcl8.4.18-src.tar.gz

The aolserver gives me the same problem (see below) and the solution proposed at the end works fine.

http://www.mail-archive.com/aolserver@listserv.aol.com/msg11285.html

a copy of message text======================================

On Tue, Nov 06, 2007 at 03:47:10PM -0500, Alexander wrote:

I'm trying to install aolserver-4.5.0 on a new machine that runs under
gentoo-amd64, and I am getting this error:


/usr/bin/tclsh ./util/nsmakeall.tcl install nsthread nsd nstclsh
make install: nsthread
gmake[1]: Entering directory `/usr/local/src/aolserver-4.5.0/nsthread'
/usr/bin/tclsh /usr/local/src/aolserver-4.5.0/util/nsremove.tcl
libnsthread.so
x86_64-pc-linux-gnu-gcc -pipe -shared -Wl,-soname,libnsthread.so -o
libnsthread.so error.o master.o memory.o mutex.o cslock.o rwlock.o
reentrant.o sema.o thread.o tls.o compat.o time.o pthread.o fork.o signal.o
nsthread_libinit.o \
-L/usr/lib64 -ltcl8.4 -ldl -lpthread -lieee -lm -lgcc_s
-Wl,-rpath,:/usr/lib64/usr/local/aolserver/lib -Wl,-rpath,:/usr/lib64/lib
nsthread_libinit.o: In function `_init':
nslibinit.c:(.text+0x0): multiple definition of `_init'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../lib64/crti.o:(.init+0x0):
first defined here
collect2: ld returned 1 exit status
gmake[1]: *** [libnsthread.so] Error 1
gmake[1]: Leaving directory `/usr/local/src/aolserver-4.5.0/nsthread'
make: *** [install-bins] Error 1



Does anyone has faced similar problem?
Any ideas what could I do about it?

This is a known issue for aolserver 4.5 with a resonably recent Tcl.
You need to patch a bit. I use something like this on Debian:

diff -urNad aolserver4~/configure aolserver4/configure
--- aolserver4~/configure 2007-04-22 19:19:35.000000000 +0200
+++ aolserver4/configure 2007-07-26 16:31:22.000000000 +0200
@@ -2520,11 +2520,7 @@
;;
*)
LDLIB="$TCL_SHLIB_LD"
- case "$LDLIB" in
- *gcc*)
- LDLIB="$LDLIB -nostartfiles"
- ;;
- esac
+ LDLIB="$LDLIB -nostartfiles"
CCRPATH="\$(CCRFLAG)\$(INSTLIB)"
LDRPATH="\$(LDRFLAG)\$(INSTLIB)"
if test "$TCL_EXEC_PREFIX" != "$prefix"

--
Francesco P. Lovergine
end of message text===============================

bye, bye