CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 Installation (https://www.cfd-online.com/Forums/su2-installation/)
-   -   SU2 installation error on Linux:about c++ compiler (https://www.cfd-online.com/Forums/su2-installation/219229-su2-installation-error-linux-about-c-compiler.html)

yuezehua July 20, 2019 07:43

SU2 installation error on Linux:about c++ compiler
 
Hi there,
whihe installing su2 on my Centos work station, I met this error when doing ./configure and enabling mpi settings. I typed:

./configure --prefix=/opt/software/SU2 CXXFLAGS="-O3" --enable-mpi --with-c=/opt/software/mpi/openmpi/1.6.5/gnu/4.8.2/bin/mpicc --with-cxx=/opt/spftware/mpi/openmpi/1.6.5/gnu/4.8.2/bin/mpicxx

however, there's an error:

checking whether we are cross compiling... configure: error: in `/home/customer/desktop/Yue/SU2/SU2-6.2.0':
configure: error: cannot run C++ compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details


so I checked the 'config.log':

configure:3550: ./conftest
./conftest: error while loading shared libraries: libmpi_cxx.so.1: cannot open shared object file: No such file or directory
configure:3554: $? = 127
configure:3561: error: in `/home/customer/desktop/Yue/SU2/SU2-6.2.0':
configure:3563: error: cannot run C++ compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.


but when i do "./configure', it shows c++ compiler is working(as checking whether c++ compiler works ... yes), so I'm really confused why there's a error about the c++ compiler as mentioned above, and i'm a new learner in CFD, waiting for your help! thanks a lot!!

pbrady2013 July 21, 2019 22:38

Library Search Paths
 
Hi Yuezehua,


When I come across an error like this:



Quote:

Originally Posted by yuezehua (Post 739492)
./conftest: error while loading shared libraries: libmpi_cxx.so.1: cannot open shared object file: No such file or directory


It usually indicates I've messed up my environment. So PATH and LD_LIBRARY_PATH. Can you double check that they are pointing to a location that includes the file: libmpi_cxx.so.1


Beyond that I also use a similar command line to you but also force particular compiler versions - I use custom GCC and MPI that are newer than the default CentOS, here it is:


Code:

./configure --prefix=/Users/pbrady/esi/jobs/2018-0004-02    \
  CXXFLAGS=-O3 \
  --enable-mpi \
  --with-cc=/Users/pbrady/devTools/bin/mpicc \
  --with-cxx=/Users/pbrady/devTools/bin/mpic++ \
  CXX=/Users/pbrady/devTools/bin/g++ \
  CC=/Users/pbrady/devTools/bin/gcc \
  CPP=/Users/pbrady/devTools/bin/cpp


Hope that helps,
-pete

yuezehua July 22, 2019 05:40

Quote:

Originally Posted by pbrady2013 (Post 739579)
Hi Yuezehua,


When I come across an error like this:






It usually indicates I've messed up my environment. So PATH and LD_LIBRARY_PATH. Can you double check that they are pointing to a location that includes the file: libmpi_cxx.so.1


Beyond that I also use a similar command line to you but also force particular compiler versions - I use custom GCC and MPI that are newer than the default CentOS, here it is:


Code:

./configure --prefix=/Users/pbrady/esi/jobs/2018-0004-02    \
  CXXFLAGS=-O3 \
  --enable-mpi \
  --with-cc=/Users/pbrady/devTools/bin/mpicc \
  --with-cxx=/Users/pbrady/devTools/bin/mpic++ \
  CXX=/Users/pbrady/devTools/bin/g++ \
  CC=/Users/pbrady/devTools/bin/gcc \
  CPP=/Users/pbrady/devTools/bin/cpp


Hope that helps,
-pete

i found i chooesed an old gcc file, and after linked it to a new gcc path, it works:)
thanks for your help!


All times are GMT -4. The time now is 12:25.