• Embed Doc
  • Readcast
  • Collections
  • 1
    CommentGo Back
Download
 
Aolserver installation with Google Perftools
System:
Red Hat Enterprise Linux ES release 4 (Nahant Update 4)Dual-Core AMD Opteron(tm) Processor 2210 HE3 GB memory
Software :
aolserver-4.0.10-src.tar.gz or aolserver-4.5.0-src.tar.gzGoogle perftools 0.8tcl8.4.14-src.tar.gz
Installation :Google perftools installation :
# mkdir ~/software# cd ~/software# wget http://google-perftools.googlecode.com/files/google-perftools-0.8.tar.gz# tar xzf .tar.gz# cd google-perftools-0.8# ./configure --prefix/home/atif/googlelib# makeit gave an error 
src/base/linux_syscall_support.h:339: error: invalid conversion from `long int' to `void*' make: *** [libtcmalloc_minimal_la-malloc_hook.lo] Error 1
open src/base/linux_syscall_support.h and edit line 338Change thisTo thisstatic inline _syscall6(void*, sys_mmap,void*, s,size_t, l, int,p,int, f, int,d,static inline _syscall6(long int,sys_mmap, void*, s,size_t, l, int,p,int, f, int,d,after that# make clean# make# mkdir /home/atif/googlelib# make installI also added in LD_LIBRARY_PATH the location /home/atif/googlelib/lib , in fact i evenadded it in /etc/ld.so.conf and ran . make sure you have LD_LBRARY_PATH in your ~/.bash_profileexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/atif/googlelib/lib
 
# ldconfig
TCL installation:
# mkdir ~/tcl# cd ~/software# wget http://surfnet.dl.sourceforge.net/sourceforge/tcl/# tar xzf tcl8.4.14-src.tar.gz# cd tcl8.4.14/unix# ./configure --prefix=/home/atif/tcl --enable-threadsexport the tcl library location in your LD_LIBRARY_PATH put this line in bash_profile if using bash.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/atif/tcl/lib
We want tcl to use google tcmalloc() for thread allocation so we will enable thread supportbut disable thread allocation from tcl. create a simple bash script named disablealloc.shcd ./unix && \cat Makefile | sed -e 's/-DUSE_THREAD_ALLOC=1//' > Makefile.new && \cat tclConfig.sh | sed -e 's/-DUSE_THREAD_ALLOC=1//' > tclConfig.sh.new&& \cp Makefile.new Makefile && \cp tclConfig.sh.new tclConfig.shAll this does is to change two files and removes -DUSE_THREAD_ALLOC=1 from eachfile . Save this script in ~/tcl#cd /home/atif/tcl# sh disablealloc.shafter that# make# make install
Aolserver installation :Aolserver 4.0.10:
# mkdir ~/aol40# cd ~/software/# wget http://ovh.dl.sourceforge.net/sourceforge/aolserver/aolserver-4.0.10-src.tar.gz# tar xzf aolserver-4.0.10-src.tar.gz# cd aolserver-4.0.10-- if you are compiling on redhat enterprise 3 on a 64 bit platform like amd opteron changethe nsd/tclobj.c and comment out following lines , line 88
 
(On redhat enterprise 4 this is not needed)Change thisTo thisif (sizeof(int) < sizeof(long)) {Tcl_Panic("NsTclInitObjs: sizeof(int) <sizeof(long)");}/* if (sizeof(int) < sizeof(long)) {Tcl_Panic("NsTclInitObjs: sizeof(int) <sizeof(long)");}*/after that :# ./configure --prefix=/home/atif/aol40 --with-tcl=/home/atif/tcl/lib --enable-threads --enable-64bit# make# make install
Aolserver 4.5.0 :
# mkdir ~/aol45# cd ~/software/# wget http://ovh.dl.sourceforge.net/sourceforge/aolserver/aolserver-4.5.0-src.tar.gz# tar xzf aolserver-4.5.0-src.tar.gz# cd aolserver-4.5.0# ./configure --prefix=/home/atif/aol45 --with-tcl=/home/atif/tcl/lib --enable-threads --enable-64bit# /home/atif/tcl/bin/tclsh8.4 ./nsconfig.tcl -install /home/atif/aol45# makeIt should work fine on almost all platforms except redhat enterprise 3 update 4 with 64 bitlinxu x86_64If you get this error on make
info.c: In function `NsTclInfoObjCmd':info.c:515: syntax error before "opt" info.c:522: `opt' undeclared (first use in this function)info.c:522: (Each undeclared identifier is reported only onceinfo.c:522: for each function it appears in.)info.c:571: warning: implicit declaration of function `Tcl_GetMemoryInfo' info.c: At top level:info.c:36: warning: `RCSID' defined but not used gmake[1]: *** [info.o] Error 1gmake[1]: Leaving directory `/software/nsadmin/aolserver-4.5.0/nsd' make: *** [build] Error 1
Apply this patch to fix the problem .Index: include/nsattributes.h===================================================================RCS file: /cvsroot/aolserver/aolserver/include/nsattributes.h,v
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
12 / 08 / 2010This doucment made it onto the Rising List!
You must be to leave a comment.
Submit
Characters: ...