# Error for compiling when running garfield on lxplus

**URL:** <https://root-forum.cern.ch/t/error-for-compiling-when-running-garfield-on-lxplus/62865>\
**Category:** Garfield++\
**Tags:** root\
**Created:** [February 10, 2025, 4:58pm UTC](https://root-forum.cern.ch/t/error-for-compiling-when-running-garfield-on-lxplus/62865 "2025-02-10T16:58:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Linnuo](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/439d5e/32.png) [@Linnuo](https://root-forum.cern.ch/u/Linnuo)\
**Post date:** [February 10, 2025, 4:58pm UTC](https://root-forum.cern.ch/t/error-for-compiling-when-running-garfield-on-lxplus/62865/1 "2025-02-10T16:58:49Z")

</div>

Dear experts,

I faced an error when compiling the files on lxplus. I did not faced this error last time I use it and I changed nothing.

For the environment,

```auto
source /cvmfs/sft-nightlies.cern.ch/lcg/views/dev3/latest/x86_64-el9-gcc13-opt/setup.sh
source $GARFIELD_HOME/install/share/Garfield/setupGarfield.sh

```

The error ,

```auto
/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/bin/rootcling: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.31' not found (required by /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/bin/../lib/libRIO.so)

/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/bin/rootcling: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/bin/../lib/libRIO.so)

/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/bin/rootcling: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/bin/../lib/libCling.so)

/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/bin/rootcling: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.31' not found (required by /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/bin/../lib/libCling.so)

/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/bin/rootcling: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/bin/../lib/libThread.so)

/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/bin/rootcling: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.31' not found (required by /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/bin/../lib/libCore.so)

make[2]: *** [CMakeFiles/Garfield.dir/build.make:247: GarfieldDict.cxx] Error 1

make[1]: *** [CMakeFiles/Makefile2:541: CMakeFiles/Garfield.dir/all] Error 2

```

I would appreciate it very much if you could help me to solve it.

---

<div class="post-metadata">

**Author:** ![lbreitwi](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/lbreitwi/32/21330_2.png) [@lbreitwi](https://root-forum.cern.ch/u/lbreitwi)\
**Post date:** [February 10, 2025, 7:19pm UTC](https://root-forum.cern.ch/t/error-for-compiling-when-running-garfield-on-lxplus/62865/2 "2025-02-10T19:19:29Z")

</div>

Hi Linnuo,

It looks like an old ROOT version (6.28.10) is picked up and not the one you aimed for by sourcing the first line in your message. The ROOT version of the dev3 nightlies is 6.35.01 (as of today).

I also tried to compile garfield++ and source `setupGarfield.sh` on lxplus and it did not show any errors.

Here the commands I used:

```bash
git clone https://gitlab.cern.ch/garfield/garfieldpp.git
cd garfieldpp/
mkdir build 
cd build
mkdir ../../garfield-install
cmake -DCMAKE_INSTALL_PREFIX=../../garfield-install -DWITH_EXAMPLES=ON ..
make -j8
make install
cd ../../
source garfield-install/share/Garfield/setupGarfield.sh

```

Best,  
Lukas

---

<div class="post-metadata">

**Author:** ![Linnuo](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/439d5e/32.png) [@Linnuo](https://root-forum.cern.ch/u/Linnuo)\
**Post date:** [February 17, 2025, 11:51am UTC](https://root-forum.cern.ch/t/error-for-compiling-when-running-garfield-on-lxplus/62865/3 "2025-02-17T11:51:51Z")

</div>

Dear Lukas,  
Thank you so much!  
Best,  
Linnuo

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [March 3, 2025, 11:52am UTC](https://root-forum.cern.ch/t/error-for-compiling-when-running-garfield-on-lxplus/62865/4 "2025-03-03T11:52:43Z")

</div>

Closed on March 3, 2025, 11:52am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
