POET in CMSSW cannot be built

Hello! I am trying to build my environment in lxplus home directory by executing a series of commands that can be found in this link. I have also setup github in here, where I can easily login and get authenticated. On the current cluster, it says that the scram architecture is el9_amd64_gcc11. I do understand that if I want to create a working environment with CMSSW_7_6_7 I need to change the SCRAM architecture by doing export SCRAM_ARCH=slc6_amd64_gcc493 because I am working on bash. I confirmed that the scram architecture is now set to slc6_amd64_gcc493 by doing echo $SCRAM_ARCH.

However, when the project version was created by doing cmsrel CMSSW_7_6_7 inside a folder test, I still get the warning WARNING: Developer's area is created for architecture slc6_amd64_gcc493 while your current OS is EL9. I thought, this can be safely ignored, so I proceeded to execute the following commands.

cd CMSSW_7_6_7/src
cmsenv
git clone -b 2015MiniAOD git@github.com:cms-opendata-analyses/PhysObjectExtractorTool.git
#It successfully cloned the repository. But the error arise when I did the following
cd PhysObjectExtractorTool
cd PhysObjectExtractor
scram b

and I get the following output

SCRAM warning: You are trying to compile/build for architecture slc6_amd64_gcc493 on EL9 OS which might not work.
If you know this SCRAM_ARCH/OS combination works then please first run 'scram build --ignore-arch'.
>> Local Products Rules ..... started
>> Local Products Rules ..... done
>> Entering Package PhysObjectExtractorTool/PhysObjectExtractor
>> Creating project symlinks
  src/PhysObjectExtractorTool/PhysObjectExtractor/python -> python/PhysObjectExtractorTool/PhysObjectExtractor
Entering library rule at PhysObjectExtractorTool/PhysObjectExtractor
>> Compiling edm plugin /afs/cern.ch/user/r/resohal/CMSSW_7_6_7/src/PhysObjectExtractorTool/PhysObjectExtractor/src/ElectronAnalyzer.cc
>> Compiling edm plugin /afs/cern.ch/user/r/resohal/CMSSW_7_6_7/src/PhysObjectExtractorTool/PhysObjectExtractor/src/FatjetAnalyzer.cc
>> Compiling edm plugin /afs/cern.ch/user/r/resohal/CMSSW_7_6_7/src/PhysObjectExtractorTool/PhysObjectExtractor/src/GenParticleAnalyzer.cc
>> Compiling edm plugin /afs/cern.ch/user/r/resohal/CMSSW_7_6_7/src/PhysObjectExtractorTool/PhysObjectExtractor/src/JetAnalyzer.cc
>> Compiling edm plugin /afs/cern.ch/user/r/resohal/CMSSW_7_6_7/src/PhysObjectExtractorTool/PhysObjectExtractor/src/MetAnalyzer.cc
>> Compiling edm plugin /afs/cern.ch/user/r/resohal/CMSSW_7_6_7/src/PhysObjectExtractorTool/PhysObjectExtractor/src/MuonAnalyzer.cc
>> Compiling edm plugin /afs/cern.ch/user/r/resohal/CMSSW_7_6_7/src/PhysObjectExtractorTool/PhysObjectExtractor/src/PackedCandidateAnalyzer.cc
>> Compiling edm plugin /afs/cern.ch/user/r/resohal/CMSSW_7_6_7/src/PhysObjectExtractorTool/PhysObjectExtractor/src/PhotonAnalyzer.cc
>> Compiling edm plugin /afs/cern.ch/user/r/resohal/CMSSW_7_6_7/src/PhysObjectExtractorTool/PhysObjectExtractor/src/SimpleEleMuFilter.cc
        >> Compiling edm plugin /afs/cern.ch/user/r/resohal/CMSSW_7_6_7/src/PhysObjectExtractorTool/PhysObjectExtractor/src/TauAnalyzer.cc
>> Compiling edm plugin /afs/cern.ch/user/r/resohal/CMSSW_7_6_7/src/PhysObjectExtractorTool/PhysObjectExtractor/src/TriggObjectAnalyzer.cc
>> Compiling edm plugin /afs/cern.ch/user/r/resohal/CMSSW_7_6_7/src/PhysObjectExtractorTool/PhysObjectExtractor/src/TriggerAnalyzer.cc
>> Compiling edm plugin /afs/cern.ch/user/r/resohal/CMSSW_7_6_7/src/PhysObjectExtractorTool/PhysObjectExtractor/src/VertexAnalyzer.cc
>> Building edm plugin tmp/slc6_amd64_gcc493/src/PhysObjectExtractorTool/PhysObjectExtractor/src/PhysObjectExtractorToolPhysObjectExtractor/libPhysObjectExtractorToolPhysObjectExtractor.so
/cvmfs/cms.cern.ch/slc6_amd64_gcc493/external/gcc/4.9.3/bin/../lib/gcc/x86_64-redhat-linux-gnu/4.9.3/../../../../x86_64-redhat-linux-gnu/bin/ld: /lib/../lib64/crti.o: unrecognized relocation (0x2a) in section `.init'
/cvmfs/cms.cern.ch/slc6_amd64_gcc493/external/gcc/4.9.3/bin/../lib/gcc/x86_64-redhat-linux-gnu/4.9.3/../../../../x86_64-redhat-linux-gnu/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
gmake: *** [tmp/slc6_amd64_gcc493/src/PhysObjectExtractorTool/PhysObjectExtractor/src/PhysObjectExtractorToolPhysObjectExtractor/libPhysObjectExtractorToolPhysObjectExtractor.so] Error 1
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 2

At the moment, I have no idea which step I have done wrong, even though I have carefully followed the steps. Here is the link that leads to the POET repository.

Hi,

The scram output is pointing out the operating system mismatch. We do not expect that CMSSW_7 should compile in EL9, it really needs SL6.

Singularity would be needed, at least to access an SL6 operating system. The cmscloud dockerhub account has some more basic operating system containers if you prefer that to the actual CMSSW container.

Regards,
Julie Hogan

I was able to find some documentations about using containers here. Thanks for the help!

Now, I have a new question. For this particular CMSSW version, the python default version is only 2.7.6. However, I want it to be on some python3 version (preferable 3.9), and I tried upgrading it with pip and apt but nothing seems to work as it eventually returns some error. There is something related to this situation in this link, but this is the case for root compatible version.

Furthermore, I cant seem to find any documentations on launching jupyter lab once I am inside CMSSW_7_6_7. Are there any sophisticated steps that I should be following?

Hello,

Based on the way these containers are set up, we would recommend doing the CMSSW operations you need in the CMSSW container (like POET), and then moving to the Python container for analysis tools with newer versions.

This page documents the different containers and shows how to launch Jupyter from the Python container. (Note: I have not tried using any of these features via singularity/appraiser, only on a local machine.)

https://cms-opendata-workshop.github.io/workshopwhepp-lesson-docker/

Regards,
Julie