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:

  • Step 1: Setting up your installation area
  • Step 2: Configuring the APT utility
  • Step 3: 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)

Step 1: 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 prepare_installarea.sh /opt/CMSSW/local

Step 2: 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.

Step 3: 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 http://cmsrep.cern.ch cms/cpt/Software/download/cms/apt/slc4_ia32_gcc345 release [1695B]
Fetched 1695B in 0s (159kB/s)
Hit http://cmsrep.cern.ch cms/cpt/Software/download/cms/apt/slc4_ia32_gcc345/cms pkglist
Hit http://cmsrep.cern.ch cms/cpt/Software/download/cms/apt/slc4_ia32_gcc345/cms release
Hit http://cmsrep.cern.ch cms/cpt/Software/download/cms/apt/slc4_ia32_gcc345/lcg pkglist
Hit http://cmsrep.cern.ch cms/cpt/Software/download/cms/apt/slc4_ia32_gcc345/lcg release
Hit http://cmsrep.cern.ch cms/cpt/Software/download/cms/apt/slc4_ia32_gcc345/external pkglist
Hit http://cmsrep.cern.ch cms/cpt/Software/download/cms/apt/slc4_ia32_gcc345/external release
Reading Package Lists... Done
Building Dependency Tree... Done
<aosorio@aosorio-t61>

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

and:

<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 <<

Additional Configuration

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/cmsset_default.sh
export CVSROOT=$USER@cmscvs.cern.ch:/cvs_server/repositories/CMSSW
export CVS_RSH=ssh

  • cshell ( ~/.cshrc)

#CMSSW environment
source /opt/CMSSW/local/cmsset_default.csh
setenv CVSROOT ${USER}@cmscvs.cern.ch:/cvs_server/repositories/CMSSW
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 installed it in SLC5 (if you have it in a secondary partition or a virtual machine should help).

  • In our case we made a copy -on usb stick- to our Ubuntu users. We all had the same installation area "/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

  • A recommended way to be able to swtich between dash and bash is to define in your shell configuration two alias. The following is an example to put in your .bashrc file:

# dash / bash switches
alias fixCMSSW='sudo rm /bin/sh ; sudo ln -s /bin/bash /bin/sh'
alias unfixCMSSW='sudo rm /bin/sh ; sudo ln -s /bin/dash /bin/sh'

  • UPDATED Compilation problems (only in Ubuntu 9.10 and 10.04+):

    • /usr/include/stdio.h: There is a solution by editing this file (follow the instructions in here CMSSW On Ubuntu ).
    • DONE An different approach is to simply get this file from someone that has Ubuntu 8.04, making a backup copy of the stdio.h file in 9.10 to stdio.h.old

    • DONE In Ubuntu 10.04 there is also a compilation problem with /usr/include/locale.h. Once again, a quick and possible solution is to make a copy from an old version and replace the one that comes with the Ubuntu 10.04 (of course, after you make a backup of such file i.e. locale.h.old).

    • DONE You can these two files from here:

    • DONE This alowed us to make working version of CMSSW under Ubuntu 10.10! Enjoy !!!

After all this fixes we were able to run CMSSW smoothly under Ubuntu

Topic attachments
I Attachment History Action Size Date Who Comment
Header fileh locale.h r1 manage 7.9 K 2011-02-22 - 16:43 AndresOsorio locale.h from Ubuntu 8.10
Unix shell scriptsh prepare_installarea.sh r2 r1 manage 0.6 K 2010-10-13 - 03:55 AndresOsorio Prepare installation area
Unix shell scriptsh set-aptget-env.sh r2 r1 manage 0.3 K 2010-10-13 - 03:55 AndresOsorio apt-get configuration script
Header fileh stdio.h r1 manage 30.3 K 2011-02-22 - 16:43 AndresOsorio stdio.h from Ubuntu 8.10
Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r11 - 2011-02-22 - AndresOsorio
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback