hermit-os / hermit-playground

A playground to build C/C++/Go/Fortran applications on top of RustyHermit
https://hermitcore.org
Apache License 2.0
30 stars 13 forks source link

Fortran and Go compiler not found #8

Open Harry-R opened 2 years ago

Harry-R commented 2 years ago

When following the instructions and building inside the docker container, it fails because no Fortran and go compilers are found. This should not happen when compiling a plain C application.

CMake Error at /home/hermit-playground/cmake/HermitCore.cmake:65 (enable_language):
  No CMAKE_Fortran_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "FC" or the CMake cache entry CMAKE_Fortran_COMPILER to the full
  path to the compiler, or to the compiler name if it is in the PATH.
Call Stack (most recent call first):
  /home/hermit-playground/cmake/HermitCore-Application.cmake:1 (include)
  CMakeLists.txt:8 (include)

CMake Error at /home/hermit-playground/cmake/HermitCore.cmake:65 (enable_language):
  No CMAKE_Go_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "GO_COMPILER" or the CMake cache entry CMAKE_Go_COMPILER to the
  full path to the compiler, or to the compiler name if it is in the PATH.
Call Stack (most recent call first):
  /home/hermit-playground/cmake/HermitCore-Application.cmake:1 (include)
  CMakeLists.txt:8 (include)

-- Configuring incomplete, errors occurred!
stlankes commented 2 years ago

At least Fortran should work. I found a compiler in my default path and tested with a simple application.

$ docker run -v $PWD:/volume -w /volume --rm -t ghcr.io/hermitcore/hermit-toolchain:latest which x86_64-hermit-gfortran
/opt/hermit/bin/x86_64-hermit-gfortran
$

The Go compiler is also installed:

docker run -v $PWD:/volume -w /volume --rm -t ghcr.io/hermitcore/hermit-toolchain:latest which x86_64-hermit-gccgo  
/opt/hermit/bin/x86_64-hermit-gccgo