Forum OpenACS Q&A: Re: Problem compiling Aolserver 4.5 with tcl 8.5.5

Posted by Gustaf Neumann on
If the goal is to get configure work correctly, is the right place to fix, or at least to figure out, why the configurations goes wrong.

But you are misreading the code. The first case branch is for "Darwin", all other systems ("*") use the 2nd branch. That's why i asked you in, what the value of LDLIB on your system is.

Posted by Richard Hamilton on
Ah! Thank you Gustaf. So that is what the mysterious *) was all about! :-)

I do want to achieve a successful compilation, but I would like to solve the problem properly so that the fix will be documented here.

To find out the value of LDLIB I will add an echo statement to and run it (unless there's a better way). I now understand what you meant about 'after configure' because ns.mak is created by the configure script. I had not realised initially.

(By the way, I have just realised that I have been mis-spelling your name - I am very sorry, how rude of me.

Regards and thanks

Posted by Richard Hamilton on
Here is the relevant section from ns.mak following the execution of nsconfig.tcl as follows:

# pwd

# /usr/local/aolserver45r0/bin/tclsh8.4 nsconfig.tcl

# Install directories.

AOLSERVER	= /usr/local/aolserver45r0
TCLSH		= /usr/local/aolserver45r0/bin/tclsh8.4
INSTTCL         = $(AOLSERVER)/modules/tcl
INSTSRV         = $(AOLSERVER)/servers/server1
INSTSRVMOD      = $(INSTSRV)/modules
INSTSRVPAG      = $(INSTSRV)/pages
SH		= /bin/sh

# Compiler and linker options.

LIBEXT		= .so
LDLIB		= ${CC} -shared ${CFLAGS} ${LDFLAGS} -nostartfiles
CCRFLAG         = -Wl,-rpath,${LIB_RUNTIME_DIR}
LDRFLAG         = -Wl,-rpath,${LIB_RUNTIME_DIR}
CC		= $(PURIFY) gcc

I note the following:

  1. The LDLIB assignment DOES in fact have "-nostartfiles" at the end after all.
  2. that CC is defined after LDLIB and that its value is $(PURIFY) gcc
  3. There is no other reference to PURIFY anywhere else in ns.mak
Could the problem be because PURIFY returns no value? What is it supposed to do? R.
Posted by Richard Hamilton on
Aha! Fantastic. Aolserver appears to have compiled this time. The only thing I did differently this time was to install vtmalloc which previously I had decided not to do. I had problems with the Google Perftools malloc a few months ago and had not realised that vtmalloc is a tcl specific memory allocator.

Could this be the reason or has it just been one of those strange things where I must have done something in a different order or something?

Posted by Richard Hamilton on
Thank you so very much for your help. Aolserver 4.5.0 is now up and running and serving the default page with tcl 8.4.19, vtmalloc and all the other bells and whistles. Fantastic!

Now all I have to do is figure out the differences in the config.tcl file between 4.0.x and 4.5.x