FLUKA installation - Error: Failed dependencies libstdc++.so.6

Hello,

I have a server with CentOS 7. Most of the users on the server need gcc version 4.8.
I installed from source (with --disable-multilib prefix for 64-bit OS) gcc-13.1.0 in /tmp directoy.
I edited the .bashrc file for the user who need a newer gcc version to point to the gcc-13 location.

I also installed

centos-release-scl-rh
devtoolset-9-toolchain
devtoolset-9-gcc-gfortran devtoolset-9-gcc-c++

When I checked the ggc and the gfortran version, I can see

gcc (GCC) 13.1.0
GNU Fortran (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)

I downloaded the recommended binaray package - fluka-4-3.3.x86-Linux-gfor9.x86_64.rpm

When i run rpm -ivh fluka-4-3.3.x86-Linux-gfor9.x86_64.rpm

I have the following errors:

error: Failed dependencies:
libstdc++.so.6(CXXABI_1.3.8)(64bit) is needed by fluka-4-3.3.x86_64
libstdc++.so.6(CXXABI_1.3.9)(64bit) is needed by fluka-4-3.3.x86_64
libstdc++.so.6(GLIBCXX_3.4.21)(64bit) is needed by fluka-4-3.3.x86_64

I checked the CXXABI version and noticed I did not have the right version

CXXABI_1.3
CXXABI_1.3.1
CXXABI_1.3.2
CXXABI_1.3.3
CXXABI_1.3.4
CXXABI_1.3.5
CXXABI_1.3.6
CXXABI_1.3.7
CXXABI_TM_1

I copied the /libstdc++.so.6 file from the gcc-13 installation location /tmp/gcc/usr/local/lib64/libstdc++.so.6 to /usr/lib64. Now I can see the newest version.

CXXABI_1.3
CXXABI_1.3.1
CXXABI_1.3.2
CXXABI_1.3.3
CXXABI_1.3.4
CXXABI_1.3.5
CXXABI_1.3.6
CXXABI_1.3.7
CXXABI_1.3.8
CXXABI_1.3.9
CXXABI_1.3.10
CXXABI_1.3.11
CXXABI_1.3.12
CXXABI_1.3.13
CXXABI_1.3.14
CXXABI_TM_1
CXXABI_FLOAT128
CXXABI_1.3
CXXABI_1.3.11
CXXABI_1.3.2
CXXABI_1.3.6
CXXABI_FLOAT128
CXXABI_1.3.12
CXXABI_1.3.9
CXXABI_1.3.1
CXXABI_1.3.5
CXXABI_1.3.8
CXXABI_1.3.13
CXXABI_1.3.4
CXXABI_TM_1
CXXABI_1.3.7
CXXABI_1.3.14
CXXABI_1.3.10
CXXABI_1.3.3

But when I tried to run the installation again i have the same error message.

error: Failed dependencies:
libstdc++.so.6(CXXABI_1.3.8)(64bit) is needed by fluka-4-3.3.x86_64
libstdc++.so.6(CXXABI_1.3.9)(64bit) is needed by fluka-4-3.3.x86_64
libstdc++.so.6(GLIBCXX_3.4.21)(64bit) is needed by fluka-4-3.3.x86_64

I am not a FLUKA user just a Sys Admin. I would greatly appreciate any tips and advice you can give me.

Thank you in advance for your help.

Dear Eric,

please make sure that the version number of g++ and gfortran are the same. The FLUKA package compiled with gfortran 9 works with any gcc version from 8 to 13.

The fix probably would be to compile gcc with g++ and gfortran together.

Cheers,
David

Hi,
Having the devtoolset-9 installed, you can do everything inside a shell by invoking the command:
“scl enable devtoolset-9 bash”
The Bash shell should now have the right environment to install fluka using rpm.
The user must execute fluka (providing the relevant path) after devtoolset-9 is launched with the same command.
I hope it helps.
NTB

Dear David,

Thank you for your advice. I checked to make sure the version number of g++ and gfortran are the same. This is the command I ran.

[root@mt-manager ~]# scl enable devtoolset-9 bash
[root@mt-manager ~]# g++ --version
g++ (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[root@mt-manager ~]# gfortran --version
GNU Fortran (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Unfortunately, I still have the libstdc++.so.6 error.

I understand the role of gcc, g++ and gfortran but I do not have experience in those programming language. I am very new at this.

Thank you for your help.

Best wishes,
Eric

Hi Nunzio,

Thank you for your message. Indeed, I invoke scl enable devtoolset-9 bash and can confirm that the Bash shell is in the right environment to install Fluka using rpm. To make sure that I am doing it right this is what I do:

[root@mt-manager ~]# scl enable devtoolset-9 bash
[root@mt-manager ~]# gfortran --version
GNU Fortran (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[root@mt-manager ~]# g++ --version
g++ (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[root@mt-manager ~]# gcc --version
gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


[root@mt-manager ~]# rpm -ivh fluka-4-3.3.x86-Linux-gfor9.x86_64.rpm
error: Failed dependencies:
	libstdc++.so.6(CXXABI_1.3.8)(64bit) is needed by fluka-4-3.3.x86_64
	libstdc++.so.6(CXXABI_1.3.9)(64bit) is needed by fluka-4-3.3.x86_64
	libstdc++.so.6(GLIBCXX_3.4.21)(64bit) is needed by fluka-4-3.3.x86_64
[root@mt-manager ~]#

As I mentioned to David Horvath, I understand the role of gcc, g++ and gfortran but I do not have experience in those programming language. I am very new at this.

Thank you for your help.

Best wishes.
Eric

Hi Eric,
You do not need particular skills to compile FLUKA.
Just as a last guess, you can try this:

  1. download the fluka-4-3.3.x86-Linux-gfor9.tgz package from the fluka website.
  2. decompress it in a convenient directory.
  3. check if the Zlib (compression-decompression library used by FLUKA to access low-energy neutron nuclear data) is already installed. Otherwise, install it using yum (sorry, I forget the name of the specific CENTOS package).
  4. launch devtoolset-9 and goto to the directory fluka4-43.3/src, and type “make” to compile and link FLUKA.

This procedure works on our servers at CRESCO-ENEA. In the tgz package, the main FLUKA routines are present as a pre-compiled object, and the users’ routines are in the form of Fortran and C/C++ source code. Consequently, after compilation of the source code, it links all compiled and pre-compiled objects in a FLUKA executable using the libstdc++.so already installed in the system.
If the compilation fails, you must check carefully the installation of devtoolset-9 to see if there is any missing piece.
I hope again it helps
NTB

1 Like

Hi Nunzio,

I followed your instructions and as far as I can tell it worked. The only “warning” message I saw during the compilation (make) was:

`usbrea.f:378:132:

  378 |      &                ERR = 6750 )
      |                                                                                                                                    1
Warning: The STATUS specified in OPEN statement at (1) is ‘NEW’ and no FILE specifier is present`

Other than that there was no error messages.

Is there anything I need to tell the users before they start using FLUKA. I am just a Sys Admin and they are the smart ones to use the software.

Thank you for your help.

Best wishes,
Eric

Hi Eric,
Mission accomplished!
Now it’s the user’s turn to test FLUKA with their simulations.
Remember that each FLUKA job must be launched within the devtoolset-9 shell, and it is also mandatory each time they want to compile and link their user routine to the fluka main.
Have a nice day
NTB

Hi Nunzio,

Perfect then!. Thank you so much for your help. And yes, I will make sure to remind users to launch the devtoolset-9 shell.

Have a great week.

Best wishes,
Eric