User Tools

Site Tools


hpc:lcgcmake

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hpc:lcgcmake [2015/08/21 13:12]
jchilders [Installing on Cooley@ALCF]
hpc:lcgcmake [2015/08/24 19:29] (current)
jchilders
Line 6: Line 6:
 The basic installation instructions are here for a standard Scientific Linix CERN 6 installation: <html><b><a href="http://ph-dep-sft.web.cern.ch/document/using-lcgcmake" target="_blank">LCGCMake SLC6 Installation </a></b></html> The basic installation instructions are here for a standard Scientific Linix CERN 6 installation: <html><b><a href="http://ph-dep-sft.web.cern.ch/document/using-lcgcmake" target="_blank">LCGCMake SLC6 Installation </a></b></html>
  
-==== Installing on Cooley@ALCF ==== +===== Installing on Cooley@ALCF ===== 
-  Clean Cooley Login (nothing from ''.softrc.cooley''+ 
-  Create working directory+==== Setup ==== 
 +  Clean Cooley Login (nothing from ''.softrc.cooley''
 +  Create working directory
     * ''mkdir /path/to/lcg''     * ''mkdir /path/to/lcg''
     * ''export $LCG_PROJECT_PATH=/path/to/lcg''     * ''export $LCG_PROJECT_PATH=/path/to/lcg''
Line 14: Line 16:
     * ''soft add +cmake''     * ''soft add +cmake''
     * ''soft add +gcc-4.8.1''     * ''soft add +gcc-4.8.1''
-  - Install Dependencies first: +==== Install Dependencies ==== 
-    * ''mkdir dependencies'' +  * ''mkdir dependencies'' 
-    * ''cd dependencies'' +  * ''cd dependencies'' 
-    * ''mkdir install'' +  * ''mkdir install'' 
-    procmail +=== procmail === 
-      * ''wget ftp://ftp.ucsb.edu/pub/mirrors/procmail/procmail-3.22.tar.gz'' +  * ''wget %%ftp://ftp.ucsb.edu/pub/mirrors/procmail/procmail-3.22.tar.gz%%'' 
-      * ''tar zxf procmail-3.22.tar.gz'' +  * ''tar zxf procmail-3.22.tar.gz'' 
-      * ''cd procmail-3.22'' +  * ''cd procmail-3.22'' 
-      * edit ''BASENAME'' in ''Makefile'' to be ''/path/to/lcg/dependencies/install'' +  * ''make lockfile CC=$(which gcc) CXX=$(which g++)'' 
-      * ''make lockfile CC=$(which gcc) CXX=$(which g++)'' +    * press enter when prompted 
-        * press enter when prompted +    * this only compiles ''lockfile'' because other parts of this package fail, but we don't need them. 
-        * this only compiles ''lockfile'' because other parts of this package fail, but we don't need them. +  * ''cd ..'' 
-      * ''cd ..'' +  * ''mkdir install/bin'' 
-      * ''mkdir install/bin'' +  * ''ln -s $PWD/procmail-3.22/src/lockfile $PWD/install/bin/lockfile'' 
-      * ''ln -s $PWD/procmail-3.22/src/lockfile $PWD/install/bin/lockfile'' +=== libxml2 === 
-    [[http://xmlsoft.org/downloads.html|libxml2 (link in first paragraph 'FTP')]] +  * [[http://xmlsoft.org/downloads.html|libxml2 (link in first paragraph 'FTP')]] 
-      * ''wget ftp://xmlsoft.org/libxml2/libxml2-2.9.2.tar.gz'' +  * ''wget %%ftp://xmlsoft.org/libxml2/libxml2-2.9.2.tar.gz%%'' 
-      * ''tar zxf libxml2-2.9.2.tar.gz'' +  * ''tar zxf libxml2-2.9.2.tar.gz'' 
-      * ''cd libxml2-2.9.2'' +  * ''cd libxml2-2.9.2'' 
-      * ''./configure --with-python --with-threads --prefix=/path/to/lcg/dependencies/install'' +  *''%%./configure --with-python --with-threads --prefix=/path/to/lcg/dependencies/install%%'' 
-      * ''make -j 10'' +  * ''make -j 10'' 
-      * ''make install'' +  * ''make install'' 
-      * ''cd ..'' +  * ''cd ..'' 
-    [[http://xmlsoft.org/XSLT/downloads.html|xslt (bottom of page)]] (depends on libxml2) +=== libxslt === 
-      * ''git clone git:%%//%%git.gnome.org/libxslt'' +  * [[http://xmlsoft.org/XSLT/downloads.html|xslt (bottom of page)]] (depends on libxml2) 
-      * ''cd libxslt'' +  * ''git clone git:%%//%%git.gnome.org/libxslt'' 
-      * ''./configure --with-python --with-libxml-prefix=/path/to/lcg/dependencies/install --prefix=/path/to/lcg/dependencies/install'' +  * ''cd libxslt'' 
-      * ''make -j 10'' +  * ''%%./autogen.sh --with-python --with-libxml-prefix=/path/to/lcg/dependencies/install --prefix=/path/to/lcg/dependencies/install%%'' 
-      * ''make install'' +  * ''make -j 10'' 
-      * ''cd ..'' +  * ''make install'' 
-    export environment +  * you may need to manually copy ./xslt-config to the install directory and change it's permissions. 
-      * ''export PATH=/path/to/lcg/dependencies/install/bin:$PATH'' +  * ''cd ..'' 
-      * ''export LD_LIBRARY_PATH=/path/to/lcg/dependencies/install/lib:$LD_LIBRARY_PATH'' +=== export environment === 
-  Get LCGCMake repository +  * ''export PATH=/path/to/lcg/dependencies/install/bin:$PATH'' 
-    * ''cd $LCG_PROJECT_PATH''  +  * ''export LD_LIBRARY_PATH=/path/to/lcg/dependencies/install/lib:$LD_LIBRARY_PATH'' 
-    * ''svn co http://svn.cern.ch/guest/lcgsoft/trunk/lcgcmake'' +==== LCGCMake ==== 
-    * ''mkdir lcgcmake-build'' +=== Get LCGCMake repository === 
-    * ''mkdir lcgcmake-install'' +  * ''cd $LCG_PROJECT_PATH''  
-    * Edit ''lcgcmake/toolchain.cmake'' line 2 <code cmake> set(LCG_VERSION dev2 CACHE STRING "HepTools version (aka LCG configuration)") </code> to <code cmake> set(LCG_VERSION 78root6 CACHE STRING "HepTools version (aka LCG configuration)") </code> +  * ''svn co %%http://svn.cern.ch/guest/lcgsoft/trunk/lcgcmake%%'' 
-    * You have to force cmake to identify your machine as slc6 because some of the tarballs live on a webserver with ''slc6'' in the name, in the case of Cooley, ''slc6'' gets replaced with ''linux'' and the downloads fail since there is no tarball with ''linux'' in the name. Edit ''lcgcmake/cmake/toolchain/heptools-common.cmake'' around line 75 from <code cmake>else()+  * ''mkdir lcgcmake-build'' 
 +  * ''mkdir lcgcmake-install'' 
 + 
 +=== Before you build === 
 +  * The bits below are summarized in this patch file [[hpc:lcgcmake:cooleyPatchFile|Cooley Patch File]] 
 +  * Edit ''lcgcmake/toolchain.cmake'' line 2 <code cmake> set(LCG_VERSION dev2 CACHE STRING "HepTools version (aka LCG configuration)") </code> to <code cmake> set(LCG_VERSION 78root6 CACHE STRING "HepTools version (aka LCG configuration)") </code> 
 +  * You have to force cmake to identify your machine as slc6 because some of the tarballs live on a webserver with ''slc6'' in the name, in the case of Cooley, ''slc6'' gets replaced with ''linux'' and the downloads fail since there is no tarball with ''linux'' in the name. Edit ''lcgcmake/cmake/toolchain/heptools-common.cmake'' around line 75 from <code cmake>else()
         execute_process(COMMAND cat /etc/os-release OUTPUT_VARIABLE os_release OUTPUT_STRIP_TRAILING_WHITESPACE)         execute_process(COMMAND cat /etc/os-release OUTPUT_VARIABLE os_release OUTPUT_STRIP_TRAILING_WHITESPACE)
         if(os_release MATCHES "centos")         if(os_release MATCHES "centos")
Line 74: Line 82:
         endif()         endif()
       endif()</code>       endif()</code>
-    * Edit ''lcgcmake/projects/CMakeLists.txt'' line 296 from <code cmake> SVN_REPOSITORY=http://svn.cern.ch/guest/lcgcoral/coral/tags/${CORAL_native_version} --quiet </code> to <code cmake> SVN_REPOSITORY=http://svn.cern.ch/guest/lcgcoral/coral/tags/CORAL_${CORAL_native_version} --quiet </code> +  * Edit ''lcgcmake/projects/CMakeLists.txt'' line 244 in CORAL package from <code cmake> SVN_REPOSITORY=http://svn.cern.ch/guest/lcgcoral/coral/tags/${CORAL_native_version} --quiet </code> to <code cmake> SVN_REPOSITORY=http://svn.cern.ch/guest/lcgcoral/coral/tags/CORAL_${CORAL_native_version} --quiet </code> 
-    * Edit ''lcgcmake/externals/CMakeLists.txt'' lines 297 - 302 (or so) from <code cmake> +  * Edit ''lcgcmake/externals/CMakeLists.txt'' lines 297 - 302 (or so) from <code cmake> 
 #---Davix-------------------------------------------------------------------------------------------- #---Davix--------------------------------------------------------------------------------------------
 LCGPackage_Add( LCGPackage_Add(
Line 105: Line 113:
   DEPENDS Boost   DEPENDS Boost
 )</code> )</code>
-    * Edit ''lcgcmake/projects/CMakeLists.txt'' and insert around line 99 to the ROOT package config <code cmake>-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}+  * Edit ''lcgcmake/projects/CMakeLists.txt'' and insert around line 99 to the ROOT package config <code cmake>-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}</code> -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}</code>
-    * Edit ''lcgcmake/projects/CMakeLists.txt'' around line 186 in the RELAX package and add the lines <code cmake>-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}+  * Edit ''lcgcmake/projects/CMakeLists.txt'' around line 186 in the RELAX package and add the lines <code cmake>-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}</code>. -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}</code>.
-    * Edit ''lcgcmake/generators/CMakeLists.txt'' around line 1679 in the crmc package and add the lines <code cmake>-DCMAKE_MODULE_PATH=${CMAKE_SOURCE_DIR}/cmake/modules+  * Edit ''lcgcmake/generators/CMakeLists.txt'' around line 1679 in the crmc package and add the lines <code cmake>-DCMAKE_MODULE_PATH=${CMAKE_SOURCE_DIR}/cmake/modules
 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}</code> -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}</code>
-  - Now build LCG +  * Edit ''lcgcmake/externals/CMakeLists.txt'' around line ? in the hepmc3 package and add the lines <code cmake>-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} 
-    * ''cd lcgcmake-build'' +-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}</code>
-    * ''cmake -DCMAKE_INSTALL_PREFIX=../lcgcmake-install -DCMAKE_C_COMPILER=$(which gcc) -DCMAKE_CXX_COMPILER=$(which g++) ../lcgcmake'' +  * Edit ''lcgcmake/externals/CMakeLists.txt'' around line 842 in the igprof package and comment out the ''-Wno-error=unused-result''
-  - Dealing with the aftermath +  * Edit ''lcgcmake/externals/CMakeLists.txt'' line 339 in the hepmc3 package from <code cmake>  
-    * After the ''pythia8'' packages download and fail to build, the Makefile's must be edited, the files ''lcgcmake-build/generators/pythia8-201/src/pythia8/201/Makefile'' have ''$(CXX_SONAME),$(notdir $@)'' which must be changed to ''-shared''+set(hepmc3_source_command GIT_REPOSITORY http://git.cern.ch/cernpub/hepmc3) </code> to <code cmake> 
-    * After ''evtgen'' package downloads and fails to build, the Makefile must be edited, the file ''lcgcmake-build/generators/evtgen-1.2.0/src/evtgen/1.2.0/Makefile'' have ''$(shell find ... )'' commands inside, Add ''-not -path '*/\.*''' to the end of these finds. This is to exclude the many stupid hidden files ''._<fildname>'' that someone must have commit to the repo from their MAC. +set(hepmc3_source_command GIT_REPOSITORY http://git.cern.ch/pub/hepmc3) </code> 
-    * After ROOT 6 downloads and fails the build, you can make the following edits to fix the ODBC files. Add to the files ''lcgcmake-build/projects/ROOT-6.02.12/src/ROOT/6.02.12/sql/odbc/inc/TODBC*.h'' a ''#include<sqlcli.h>'' just under the ''#include<sql.h>'' at the top of the file. Add to the files ''lcgcmake-build/projects/ROOT-6.02.12/src/ROOT/6.02.12/sql/odbc/src/TODBCServer.cxx'' and ''lcgcmake-build/projects/ROOT-6.02.12/src/ROOT/6.02.12/sql/odbc/src/TODBCStatement.cxx'' a ''#include<sqlcli1.h>'' at the top of the files. + 
-  Create setup environment <file bash setup.sh>+=== Building LCG === 
 +  * ''cd lcgcmake-build'' 
 +  * ''%%cmake -DCMAKE_INSTALL_PREFIX=../lcgcmake-install -DCMAKE_C_COMPILER=$(which gcc) -DCMAKE_CXX_COMPILER=$(which g++) ../lcgcmake%%'' 
 + 
 +=== When Build Fails === 
 +When a build fails, look at this list for fixes, fix, then continue with ''make -j 10''. 
 +  * After the ''pythia8'' packages download and fail to build, the Makefile's must be edited, the files ''lcgcmake-build/generators/pythia8-201/src/pythia8/201/Makefile'' have ''$(CXX_SONAME),$(notdir $@)'' which must be changed to ''-shared''
 +    * ''%%sed 's/$(CXX_SONAME),$(notdir\ $@)/-shared/g' generators/pythia8-201/src/pythia8/201/Makefile > generators/pythia8-201/src/pythia8/201/Makefile.tmp%%'' 
 +  * After ''evtgen'' package downloads and fails to build, the Makefile must be edited, the file ''lcgcmake-build/generators/evtgen-1.2.0/src/evtgen/1.2.0/src/Makefile'' have ''$(shell find ... )'' commands inside, Add ''-not -path '*/\.*''' to the end of these finds. This is to exclude the many stupid hidden files ''._<fildname>'' that someone must have commit to the repo from their MAC. 
 +  * After ROOT 6 downloads and fails the build, you can make the following edits to fix the ODBC files. Add to the files ''lcgcmake-build/projects/ROOT-6.02.12/src/ROOT/6.02.12/sql/odbc/inc/TODBC*.h'' a ''#include<sqlcli.h>'' just under the ''#include<sql.h>'' at the top of the file. Add to the files ''lcgcmake-build/projects/ROOT-6.02.12/src/ROOT/6.02.12/sql/odbc/src/TODBCServer.cxx'' and ''lcgcmake-build/projects/ROOT-6.02.12/src/ROOT/6.02.12/sql/odbc/src/TODBCStatement.cxx'' a ''#include<sqlcli1.h>'' at the top of the files. 
 + 
 + 
 +  Create setup environment <file bash setup.sh>
 #!/usr/bin/env bash #!/usr/bin/env bash
 soft add +cmake soft add +cmake
 soft add +gcc-4.8.1 soft add +gcc-4.8.1
hpc/lcgcmake.1440162725.txt.gz · Last modified: 2015/08/21 13:12 by jchilders