1. Cmake
need C++ compiler to install CMAKE, so need to load C++ compiler before installCompile from source and install
https://github.com/Kitware/CMake/releases
Download CMake from: https://cmake.org/download/
wget https://cmake.org/files/v3.20/cmake-3.20.3.tar.gz
##
# for Tcl script use only
prepend-path PATH $topdir/bin
Validate installation
module load cmake-3.17.2
cmake --version
tar zxvf cmake-3.21.2.tar.gz
cd cmake-3.21.2
module load compiler/gcc-10.3
# USC 2:
module load compiler/gcc-10.3
# USC 2:
./configure --prefix=/home1/p001cao/local/app/tool_dev/cmake-3.20.3
# USC 1:
./configure --prefix=/uhome/p001cao/local/app/tool_dev/cmake-3.21
make -j8
make install
create module file
cd /uhome/p001cao/local/Imodfiles
create module file
cd /uhome/p001cao/local/Imodfiles
create file "cmake-3.17.2"
# for Tcl script use only
set topdir /uhome/p001cao/local/app/tool_dev/cmake-3.18.0
set version cmake-3.18.0
setenv cmake $topdir
prepend-path PATH $topdir/bin
Validate installation
module load cmake-3.17.2
cmake --version
https://github.com/Kitware/CMake
http://ask.xmodulo.com/upgrade-autoconf-centos.html
wget ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69b.tar.gz
tar zxf autoconf-2.69b.tar.gz
2. Autoconf (+lib)
ftp://alpha.gnu.org/pub/gnu/autoconf/http://ask.xmodulo.com/upgrade-autoconf-centos.html
wget ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69b.tar.gz
tar zxf autoconf-2.69b.tar.gz
cd autoconf-2.69b
### use
export ACLOCAL_PATH=/home1/p001cao/local/app/tool_dev/libtool-2.4.6/share/aclocal
./configure --prefix=/home1/p001cao/local/app/tool_dev/autoconf-2.69b
2a. automake:
module load tool_dev/autoconf-2.69b
wget http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz
tar xvzf automake-1.14.tar.gz
cd automake-1.14
./configure --prefix=/home1/p001cao/local/app/tool_dev/automake-1.14
2b. update pkg-config (optional)
https://pkg-config.freedesktop.org/releases/?C=M;O=D
tar xvzf pkg-config-0.29.2.tar.gz
cd pkg-config-0.29.2
./configure --prefix=/home1/p001cao/local/app/tool_dev/pkg-config-0.29
2c. libtool:
git clone git://git.savannah.gnu.org/libtool.git
##--
wget http://ftp.jaist.ac.jp/pub/GNU/libtool/libtool-2.4.6.tar.gz
tar xvfz libtool-2.4.6.tar.gz
cd libtool-2.4.6
./configure --prefix=/home1/p001cao/local/app/tool_dev/libtool-2.4.6
### use wget http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz
tar xvzf automake-1.14.tar.gz
cd automake-1.14
./configure --prefix=/home1/p001cao/local/app/tool_dev/automake-1.14
https://pkg-config.freedesktop.org/releases/?C=M;O=D
tar xvzf pkg-config-0.29.2.tar.gz
cd pkg-config-0.29.2
./configure --prefix=/home1/p001cao/local/app/tool_dev/pkg-config-0.29
export ACLOCAL_PATH=/home1/p001cao/local/app/tool_dev/libtool-2.4.6/share/aclocal
2d. autogen: (may not need)2d1. Guile:https://www.gnu.org/software/guile/manual/html_node/Obtaining-and-Installing-Guile.htmlwget ftp://ftp.gnu.org/gnu/guile/guile-3.0.4.tar.gztar xvf guile-3.0.4.tar.gz
cd guile-3.0.4module load compiler/gcc-10.2module load tool_dev/libtool-2.4.6
./configure --with-libltdl-prefix=/home1/p001cao/local/app/tool_dev/libtool-2.4.6 \
--prefix=/home1/p001cao/local/app/tool_dev/guile-3.0.4
2d2. autogen:
wget https://ftp.gnu.org/gnu/autogen/rel5.18.16/autogen-5.18.16.tar.gz
tar xvfz autogen-5.18.16.tar.gz
cd autogen-5.18.16
./configure --prefix=/home1/p001cao/local/app/tool_dev/autogen-5.18.16
cd guile-3.0.4
./configure --with-libltdl-prefix=/home1/p001cao/local/app/tool_dev/libtool-2.4.6 \
--prefix=/home1/p001cao/local/app/tool_dev/guile-3.0.4
II. lld
cd Tooldev
git clone https://github.com/llvm/llvm-project.git llvm-master
module load tool_dev/cmake-3.17.2
module load conda/py37clangSupp
module load compiler/gcc-10.2
export myGCC=/home1/p001cao/local/app/compiler/gcc-10.2/bin
export myGCC=/home1/p001cao/local/app/compiler/gcc-10.2/bin
2. lld may available with intel compiler
III. libxml2: (can use conda instead)
wget ftp://xmlsoft.org/libxml2/libxml2-2.9.9.tar.gz
tar zxf libxml2-2.9.9.tar.gz
cd libxml2-2.9.9
./configure --prefix=/home1/p001cao/local/app/tool_dev/libxml2-2.9.9 --without-python
make
make install
#--
prepend-path PKG_CONFIG_PATH $topdir/lib/pkgconfig
4. Update glibc
strings /lib64/libc.so.6|grep GLIBC
wget http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz # may error with other version, need root
tar xvf glibc-2.18.tar.gz
cd glibc-2.18
tar xvf glibc-2.18.tar.gz
cd glibc-2.18
mkdir build && cd build
../configure --disable-profile --enable-add-ons \ --with-binutils=/home1/p001cao/local/app/tool_dev/binutils-2.32 \ --prefix=/home1/p001cao/local/app/tool_dev/glibc-2.18
ln -s /home1/p001cao/local/app/tool_dev/glibc-2.17/libc.so.6 /lib64/libc.so.6
check: ldd --version
##NOTE:
export LD_LIBRARY_PATH=/home1/p001cao/local/app/tool_dev/glibc-2.15/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/lib
## Module file (not work)
if { [module-info mode load] || [module-info mode switch2] } {
puts stdout "export LD_LIBRARY_PATH=/home1/p001cao/local/app/tool_dev/glibc-2.19/lib:$LD_LIBRARY_PATH;"
puts stdout "export LD_LIBRARY_PATH=/usr/local/lib;"
} elseif { [module-info mode remove] && ![module-info mode switch3] } {
puts stdout "export LD_LIBRARY_PATH=/usr/local/lib;"
}
###
export myBinutils=/home1/p001cao/local/app/tool_dev/binutils-2.32
--with-binutils=${myBinutils}
## use
--with-binutils=${myBinutils}
## use
export myGLIBC=/home1/p001cao/local/app/tool_dev/glibc-2.15/lib
LDFLAGS="-L${myGLIBC} -Wl,-rpath,${myGLIBC} -Wl,--dynamic-linker,${myGLIBC}/ld-linux-x86-64.so.2" \
LDFLAGS="-L${myGLIBC} -Wl,-rpath,${myGLIBC} -Wl,--dynamic-linker,${myGLIBC}/ld-linux-x86-64.so.2" \
Ref
https://stackoverflow.com/questions/35616650/how-to-upgrade-glibc-from-version-2-12-to-2-14-on-centos
https://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html
https://stackoverflow.com/questions/847179/multiple-glibc-libraries-on-a-single-host
4.1. musl libc (glibc alternative)
tar xvf musl-1.2.0.tar.gz
cd musl-1.2.0
cd musl-1.2.0
mkdir build && cd build
../configure --prefix=/home1/p001cao/local/app/tool_dev/musl-1.2.0
6. GSL
* need to link LAPACK, BLAS library when install Plumed in Lammps (but no need now)
wget ftp://ftp.gnu.org/gnu/gsl/gsl-2.6.tar.gz
./configure --prefix=/home1/p001cao/local/app/tool_dev/gsl-2.6
B. linker
Use conda to manager linker
module load conda/conda3
conda create -n py37linker python=3.7
source activate py37linker
#--
prepend-path PKG_CONFIG_PATH $topdir/lib/pkgconfig
#--source activate py37linker
conda install autoconf automake cmake ninja libtool # make tool
conda install -c conda-forge lld=9.0.1 binutils # llmv & gold linker
conda install -c conda-forge numactl-devel-cos6-x86_64 # numa openmp
conda install -c conda-forge numactl-devel-cos6-x86_64 # numa openmp
conda install -c asmeurer glibc
##--
##--
LDFLAGS="-fuse-ld=lld -lrt"
No comments:
Post a Comment