New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake not able to find gfortran installed via apt-get #1628

Closed
chaosphere2112 opened this Issue Oct 22, 2015 · 6 comments

Comments

Projects
None yet
3 participants
@chaosphere2112
Contributor

chaosphere2112 commented Oct 22, 2015

I just did a build on a clean Ubuntu VM and installed gfortran using the gfortran-4.9 package via apt-get. This creates a binary in /usr/bin/ called gfortran-4.9; we should be able to identify that as a valid fortran compiler, but instead I'm given a message about not being able to locate one. Since apt-get really is the easiest way to install things on ubuntu, I'm thinking we should handle this case.

@chaosphere2112 chaosphere2112 added this to the 2.4 milestone Oct 22, 2015

@chaosphere2112

This comment has been minimized.

Contributor

chaosphere2112 commented Oct 22, 2015

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Oct 22, 2015

who complains about not finding gfortran? Is it coming from ESMF? I am using apt-get gfortran and it works for me.

@chaosphere2112

This comment has been minimized.

Contributor

chaosphere2112 commented Oct 22, 2015

I did sudo apt-get install gfortran-4.9 (to make sure it didn't grab a 5.0 version), and got this:

[INFO] We reset your path to: /home/fries2/tmpbuild/install/Externals/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
[INFO]BUILDMODE:DEFAULT
[INFO] version 2.7.10 of PYTHON is required by UVCDAT
[INFO] Building python at /home/fries2/tmpbuild/install/bin/python
-- CMAKE_Fortran_COMPILER_ID = ''.
CMake Warning at contrib/sciMake/sciFuncsMacros.cmake:23 (message):
  Variable CONFIG_SUMMARY is not defined, sciPrintString is unable to write
  to the summary file.
Call Stack (most recent call first):
  contrib/sciMake/sciFortranFindVersion.cmake:12 (sciPrintString)
  contrib/sciMake/sciFortranChecks.cmake:14 (include)
  CMake/cdat_modules/esmf_pkg.cmake:26 (include)
  CMakeLists.txt:495 (include)


CMake Error at contrib/sciMake/sciFortranFindVersion.cmake:160 (message):
  Unknown compiler ID, .
Call Stack (most recent call first):
  contrib/sciMake/sciFortranChecks.cmake:14 (include)
  CMake/cdat_modules/esmf_pkg.cmake:26 (include)
  CMakeLists.txt:495 (include)


-- Configuring incomplete, errors occurred!
See also "/home/fries2/tmpbuild/CMakeFiles/CMakeOutput.log".
See also "/home/fries2/tmpbuild/CMakeFiles/CMakeError.log".

@chaosphere2112

This comment has been minimized.

Contributor

chaosphere2112 commented Oct 22, 2015

(when attempting to cmake)

@jbeezley

This comment has been minimized.

Contributor

jbeezley commented Oct 22, 2015

I'm sure CMake relies on finding a known compiler name like gfortran, f95, etc. That is what you get when you install the versionless gfortran package. If you want to manage alternate compiler versions, I would recommend either setting an alias or using Ubuntu's update-alternatives.

@chaosphere2112

This comment has been minimized.

Contributor

chaosphere2112 commented Oct 22, 2015

Ah, that makes sense... kind of annoying if they decide to update the gfortran package to 5+, since that will break ESMF. Oh well, we can burn that bridge when we get there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment