Home
The Toolkit for Online Communities
16705 Community Members, 0 members online, 2456 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : AOLserver 4.5

Forum OpenACS Q&A: AOLserver 4.5

Icon of envelope Request notifications

Collapse
Posted by Lachlan Myers on
Tried to get the *new* AS 4.5 running (Mandriva 2006/P4/1gig RAM), but getting this (apparently) Tcl error.

I know this should go to the AS bug list (and I will post it there), but there's a lot of experience here (and interest in AS).

make install
./util/nsmakeall.tcl install nsthread nsd nstclsh
./util/nsmakeall.tcl: line 48: syntax error near unexpected token `}'
./util/nsmakeall.tcl: line 48: `} '
make: *** [install-bins] Error 2
Looking at the code I can't see anything obviously wrong (but I claim no expertise). Any thoughts?

---SNIP----

if {$argc < 2} {
        puts "Usage: $argv0 target dir ?dir dir ...?"
        exit 1
}  -------------------LINE 48--------<
if ![string equal $tcl_platform(platform) unix] {
        set make nmake
}
---SNIP----

Collapse
2: Re: AOLserver 4.5 (response to 1)
Posted by Lachlan Myers on
Forgot the critical piece of info ... Tcl v8.4.13
Collapse
3: Re: AOLserver 4.5 (response to 1)
Posted by Malte Sussdorff on
edit include/ns.mak and set the path to the tclsh binary (usually /usr/local/bin/tclsh8.4).

Somehow AOLserver is too dumb to find this.

Good luck in trying with the rest, I failed with tdom (package require not working), same for xotcl. Maybe this is related, though I don't know.

Collapse
4: Re: Re: AOLserver 4.5 (response to 3)
Posted by Gustaf Neumann on
i just made an installation of aolserver 4.5 with dotlrn on Mac OS X. there was no need to edit include/ns.mak. Note, that the README of aolserver 4.5 recommends to configure with

/usr/local/aolserver/bin/tclsh84 ./nsconfig.tcl

where the tclsh is already from a "private" tclsh in the aolserver directory (i called the installation /usr/local/aolserver4.5/). After nsconfig.tcl, it picked the right directory without problems. aolserver seems clever enough.

i did not have any problems with tdom or xotcl, both worked without any problems out of the box. I did have some problems with the other modules like postgres, nscache etc. in two respects: firstly, the meaning of the variable INST seems to have changed. in earlier times, INST denoted the installation directory, now INST means the installation program. This is only noted, when the modules are built outside of the aolserver tree (i have three installations of aolserver on my notbook, 4.0.10, naviserver and 4.5.0). Secondly, there were a couple of problems builing the static libaries (.a) on mac os x (they are not needed anyhow) and with linking nspostgres (added -lnsdb -L/usr/local/pg807/lib/ -lpq) by hand.

otherwise, everything seems to be fine in my configuration based on tcl8.4.13, Mac OS X 10.4.7.

Collapse
5: Re: Res: Re: AOLserver 4.5 (response to 3)
Posted by Jose Agustin Lopez Bueno on
I am too having problems with xotcl.

Any pointer for aolserver 4.5 and xotcl?

Collapse
Posted by Gustaf Neumann on
what problem do you have?
Collapse
7: Re: Re: AOLserver 4.5 (response to 3)
Posted by Gustaf Neumann on
a general remark on package require failing (e.g. tdom. xotcl): take care that you are compiling with the same tcl version and you install into a place, where aolserver can pick it up. Here is what i use in my build script:

NS=/usr/local/aolserver-4.5
TCL=/usr/local/src/tcl8.4.13/unix

cd tDOM-0.8.0/unix
../configure --enable-threads --enable-symbols \
--prefix=$NS --exec-prefix=$NS --with-tcl=$TCL
make
make install
cd ../..

cd xotcl-1.4.0
./configure --enable-threads --enable-symbols \
--prefix=$NS --exec-prefix=$NS --with-tcl=$TCL
make
make install-aol
cd ..

Collapse
8: Re: AOLserver 4.5 (response to 1)
Posted by Gustaf Neumann on
i have made a brand new installation of the latest dotlrn 2.2.0* and aolserver 4.5 and notices a small incompatibility.

ns_startcontent in 4.5 requires to get the output encoding passed. in case, the type is set to "text/html", it complains that there is no output encoding specified. i made a fix to oacs 5-2 and head to add the default output encoding in case it is not provided to "ad_return_top_of_page" and "ReturnHeaders" (used on the apm pages).

With that fix it works with 4.0.10 and 4.5. continue testing.... might be worth to consider this for the forthcoming dotlrn release

Collapse
9: Re: Res: Re: AOLserver 4.5 (response to 8)
Posted by Jose Agustin Lopez Bueno on
Hi!

Thanks for the fix. I had detected that problem too.

The main problem I am having in my tests with AOLserver 4.5
is in the initialization of tcl modules (modules/*.tcl)
These files are not sourced. Moreover, I must set in the
config.tcl

ns_Section ns/server/myserver/tcl
ns_param initfile "$OPENACSDIR/tcl/0-acs-init.tcl"

for start OpenACS server. This behaviour is different
to 4.x.10.

Perhaps is a bad compilation / configuration of
my server?

Thanks,
Agustin

Collapse
Posted by Gustaf Neumann on
Hmm, i did not have a problem with that. I have used essentially the same config file as with aolserver 4.0.10. Here are the relevant parts:
set siteroot		    /usr/local/dotlrn-2.2.0/
set logroot ${siteroot}/log/
set pageroot ${siteroot}/www

...

ns_section ns/server/${server}/tcl
ns_param Library ${siteroot}/tcl
ns_param autoclose on
ns_param debug false

Collapse
11: Re: AOLserver 4.5 (response to 1)
Posted by Malte Sussdorff on
I wrote a automated install script for AOLserver and OpenACS 5.3 which you can use from http://cognovis.de/entwickler/tips/aolserver/aolserver45/

This works on Debian / Ubuntu.

Collapse
12: Re: Res: AOLserver 4.5 (response to 1)
Posted by Jose Agustin Lopez Bueno on
Hi again!

Yes, the error was by a mistake in the conf file.
Now we have one server with aolserver 4.5 running Ok
and serving OACS 5.1 pages.

Only got a small :-) problem !
If the page has the news portlet we got a server crash.
"Top" show something like this:

S openacs 26747 1 3 69 0 - 170162 107757 12:05 ?
00:01:36 /usr/local/aolserver-4.5.0/bin/nsd -b
147.156.1.132:8000,147.156.1.132:8443 -u openacs -t
/var/lib/aolserver/pizarra/etc/base.4.5.tcl
Z openacs 26748 26747 0 67 0 - 0 1195e8 12:05 ?
00:00:00 [nsd] defunct

Any pointer?

Regards,
Agustin

Collapse
Posted by Jose Agustin Lopez Bueno on
Well, I think of it is a compiler / stack problem for adp pages.

If the adp page has 6 nested "if", the nsd process crash when
I get / read the variable in the "if" sentence.

Are there any parameter to control this?

Agustin

Collapse
Posted by Gustaf Neumann on
We use

ns_param StackSize 2048000

and don't see this problem
-gustaf

Collapse
Posted by Jose Agustin Lopez Bueno on
Ok.

In my tests I was using some default parameters.
I put StackSize in ns/threads to your value and
the problem has gone.

Thanks,
Agustin

Collapse
16: Re: AOLserver 4.5 (response to 1)
Posted by Jim Lynch on
doesn't line 49 need to read:

if { ![string equal $tcl_platform(platform) unix] } {
   ^                                              ^
(the arrows point at my additions)
Collapse
17: Re: Re: AOLserver 4.5 (response to 16)
Posted by Steve Manning on
No, the extra braces are superfluous. The

    if ![tcl command] {
        do something
    }

format will work just fine.

  - Steve

Collapse
18: Tcl curly braces (response to 17)
Posted by Andrew Piskorski on
No, the extra braces are not quite superfluous. Yes, Steve is correct that the above example will give exactly the same result regardless of whether you put braces are the argument to the "if" command or not.

But that does not mean that the braces are superfluous. Using the curly braces avoids an extra trip throught the Tcl evaluator.

Collapse
19: Re: Tcl curly braces (response to 18)
Posted by Gustaf Neumann on
andrew, let me add to your argument:
... and with the braces, "if" and "expr" can be byte-compiled and be much faster executed (sometimes an order of magnitude). In earlier versions of Tcl (before 8.0), the braces were indeed not needed, but now they are recommended. Unfortunately, there is still much code in 7.* fashion. If you are interested, here is a script that fixes many of such occurrences in current openacs: http://media.wu-wien.ac.at/download/normalize_expressions.tcl

see as well
http://www.openacs.org/forums/message-view?message_id=335900