CMSSW installation on your laptop

This is a short summary of the procedures described in Installing software using apt, which I applied to install CMSSW on my laptop. Basically the procedure can be divided in three parts:

  • Setting up your installation area
  • Configuring the APT utility
  • Installation of CMSSW - or update

Some definitions:

  • APT: The Advanced Packaging Tool

Some more documentation:

Requirements: SLC 5, Ubuntu X, (Scientific Linux 4 for older versions)

Setting up your installation area

After you have decided where you will host the CMSSW, you need to define a couple of environment variables:

  • VO_CMS_SW_DIR=/my_installation_area/x/y/z/
  • SCRAM_ARCH=slc4_ia32_gcc345 ( for SLC4 )
  • SCRAM_ARCH=slc5_ia32_gcc434 ( for SLC5 32 bits )

I made a script to help me with this:

source /opt/CMSSW/local

Setting up apt-get

After having prepared your installation area, the next step is to configure apt-get so it can see the CMSSW source code. Once again, a little script can help you with the process:

You need to run this script everytime you need to update/install software.

Getting the software

In principle, step 1 is required when performing a first time installation. However, steps 2 and 3 need to be executed when updating a package or a new CMSSW release. Update the source list:

<aosorio@aosorio-t61> apt-get update
Get:1 cms/cpt/Software/download/cms/apt/slc4_ia32_gcc345 release [1695B]
Fetched 1695B in 0s (159kB/s)
Hit cms/cpt/Software/download/cms/apt/slc4_ia32_gcc345/cms pkglist
Hit cms/cpt/Software/download/cms/apt/slc4_ia32_gcc345/cms release
Hit cms/cpt/Software/download/cms/apt/slc4_ia32_gcc345/lcg pkglist
Hit cms/cpt/Software/download/cms/apt/slc4_ia32_gcc345/lcg release
Hit cms/cpt/Software/download/cms/apt/slc4_ia32_gcc345/external pkglist
Hit cms/cpt/Software/download/cms/apt/slc4_ia32_gcc345/external release
Reading Package Lists... Done
Building Dependency Tree... Done

You can see what releases are available with apt-cache search cmssw

<aosorio@aosorio-t61> apt-cache search cmssw
cms+cmssw+CMSSW_1_2_0_SL4 - CMS Software Package cmssw version CMSSW_1_2_0_SL4
cms+cmssw+CMSSW_1_3_0 - CMS Software Package cmssw version CMSSW_1_3_0
cms+cmssw+CMSSW_1_3_0_SLC4_pre1 - CMS Software Package cmssw version CMSSW_1_3_0_SLC4_pre1
cms+fwlite+CMSSW_1_6_7_FWLITE - CMS Software Package fwlite version CMSSW_1_6_7_FWLITE
cms+fwlite+CMSSW_2_0_10_FWLITE - CMS Experiment package SpecChecksum:4e6fb2dca055bad4e44b8406104cb9cc
cms+fwlite+CMSSW_2_1_4_FWLITE - CMS Experiment package SpecChecksum:a1939f31a2ca47a5c6277d5a2db1d669
cms+fwlite+CMSSW_2_1_7_FWLITE - CMS Experiment package SpecChecksum:3a1a4302f79e27fd3f5ad2cc2bf344ba

If you now want to install CMSSW 3_3_6 for example then do:

<aosorio@aosorio-t61>apt-get install external+fakesystem+1.0


<aosorio@aosorio-t61>apt-get install external+fakesystem+1.0-cms

The previous step only needs to be done once. Finally you can proceed to install the wanted software release:

<aosorio@aosorio-t61> apt-get install cms+cmssw+CMSSW_3_3_5
Reading Package Lists... Done
Building Dependency Tree... Done

You can check what installations you have installed (after setting up the CMSSW environment):

<aosorio@aosorio-T61> scramv1 list CMSSW

Listing installed projects....

| Project Name  | Project Version          | Project Location                  |

  CMSSW           CMSSW_3_3_5                
                                         --> /opt/CMSSW/local/slc5_ia32_gcc434/cms/cmssw/CMSSW_3_3_5

Projects available for platform >> slc5_ia32_gcc434 <<


You will need to set the environment by modifying (or adding) to your shell configuration file the following lines:

  • bash ( ~/.bashrc or ~/.bash_profile)

#CMSSW environment
source /opt/CMSSW/local/
export CVSROOT=$
export CVS_RSH=ssh

  • cshell ( ~/.cshrc)

#CMSSW environment
source /opt/CMSSW/local/cmsset_default.csh
setenv CVSROOT ${USER}
setenv CVS_RSH ssh

You are now ready to use CMSSW!

Ubuntu Notes

Ubuntu is not officially supported by the CMSSW team. Anyhow, we tried installing CMSSW in Ubuntu 8.04, 9.04, 9.10. Here are a few notes:

  • The first thing to realise is that Step 1: setting up the installation area is not possible. The recommended way (see the above Twiki page) to proceed is to get it from someone that has install it in SLC5 (if you have it in a secondary partition or a virtual machine should help).
  • In our case we had someone to install in a SLC5 partition and then made a copy -on usb stick- to our Ubuntu users. We all had the same path "/opt/CMSSW/local"
  • This allowed Ubuntu users to proceed as normal with the installation of the CMSSW

Now, once we had running CMSSW (cmsrel, cmsenv) a few problems were found:

  • "[: 71: ==: unexpected operator": Ubuntu comes with sh pointing to dash instead of bash (Ubuntu forums). The solution is to simply change this symbolic link to the one compatible with the CMSSW scripts (known side effect: Sypnactic and dpkg stops working):

[aosorio@aosorio-T61] cd /bin/
[aosorio@aosorio-T61] ls -l sh
lrwxrwxrwx 1 root root 4 2010-07-22 18:38 sh -> dash
[aosorio@aosorio-T61] sudo rm sh
[aosorio@aosorio-T61] sudo ln -s bash sh
[aosorio@aosorio-T61] ls -l sh
lrwxrwxrwx 1 root root 4 2010-07-22 18:38 sh -> bash

  • Compilation problems (only in 9.04?, 9.10):
    • /usr/lib/stdio.h: There is a solution by editing this file (follow the instructions in here CMSSW On Ubuntu ).

Topic attachments
I Attachment HistorySorted descending Action Size Date Who Comment
Unix shell scriptsh r1 manage 0.6 K 2008-09-29 - 15:09 AndresOsorio Prepare installation area
Unix shell scriptsh r1 manage 0.3 K 2008-09-29 - 15:10 AndresOsorio apt-get configuration script

This topic: Main > TWikiGroups > CMSUniandesGroup > CMSUniandesGroupLaptop
Topic revision: r8 - 2010-07-26 - AndresOsorio
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback