Building Trilinos - What is the correct location of C, C++ and fortran in Ubuntu 16.04?
Created by: bjdarrer
I am trying to build Trilinos, and I think it failed because it couldn't locate the C compiler directory correctly. Can anyone tell what the correct location of gcc is on the Ubuntu 16.04 operating system? I actually need the C, C++ and fortran directory locations.
I am using the build script:
cmake \
-DCMAKE_C_COMPILER=<path to C compiler> \
-DCMAKE_CXX_COMPILER=<path to C++ compiler> \
-DCMAKE_Fortran_COMPILER=<path to Fortran compiler> \
-DTrilinos_ENABLE_ALL_PACKAGES=ON \
-DCMAKE_INSTALL_PATH=<path to install Trilinos into> \
<path to Trilinos source>
make -j<n> install
I used directories:
<path to C compiler> = /usr/bin
<path to C++ compiler> = /usr/bin
<path to Fortran compiler> = /usr/bin
I assume C is gcc-5
, C++ is g++-5
and fortran is gfortran-5
?
Should the directory be /usr/lib/gcc/x86_64-linux-gnu
from https://superuser.com/questions/871490/linux-c-compiler ?
The cmake build gave error message (end part of build output):
-- The C compiler identification is unknown
-- Check for working C compiler: /usr/bin
-- Check for working C compiler: /usr/bin -- broken
CMake Error at /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "/usr/bin" is not able to compile a simple test program.