

gcc: error: unrecognized command line option ‘--showme:link’
I installed OpenFOAM newly and the following error is occurring every time I open my terminal.
gcc: error: unrecognized command line option ‘--showme:link’
As per the guide on the OpenFOAM website, I did the following:
Doing sudo update-alternatives --list mpi
I get
/usr/bin/mpicc.openmpi
Doing
sudo update-alternatives --set mpi /usr/lib/openmpi/include
I get
update-alternatives: error: alternative /usr/lib/openmpi/include for mpi not registered; not setting
Doing
which mpicc
I get
/opt/intel/compilers_and_libraries_2020.2.254/linux/mpi/intel64/bin/mpicc
Maybe this is the reason. Since I am using mpicc from intel, it is having problem with openmpi
Note:
I have installed openmpi using sudo install openmpi-bin
OpenFOAM


Hi,
Have you checked the solution mentioned in the below link?
https://www.cfd-online.com/Forums/openfoam-installation/148321-gcc-error-unrecognized-command-line-option-showme-link.html
Regards,
Ashley
Have you checked the solution mentioned in the below link?
https://www.cfd-online.com/Forums/openfoam-installation/148321-gcc-error-unrecognized-command-line-option-showme-link.html
Regards,
Ashley
Hi,
Problem solved!
Thank you Ashley for your suggestion. I had already seen it but I thought that was a problem specific to conda. However, I solved the problem using that thread.
For future reference to other people, I mention below, what I did.
I opened /opt/openfoam8/etc/bashrc
went to line number 89
it looked like
export WM_MPLIB=SYSTEMOPENMPI
I changed it to
export WM_MPLIB=OPENMPI
Other options for this variable are mentioned above this. they are SYSTEMOPENMPI, OPENMPI, SYSTEMMPI, MPICH, MPICH-GM, HPMPI, MPI, FJMPI, QSMPI, SGIMPI and INTELMPI
In the thread mentioned in Ashley's comment, they created a file named pref.sh and included the line that I have edited. I believe this way the value of the variable will be overwritten.
I hope, this explanation will be helpful for future OpenFOAM users.
Regards,
Arnab
27-04-21, 5:14 p.m. Thanozzz
Login to add comment