juanmanzanero/fastest-lap

Failing to run cmake during installation

saianp opened this issue · 6 comments

Hi, I tried running cmake with the cmake .. command in the command line and it returned this. Any help with getting everything running correctly would be much appreciated!

-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done

Configure third party libraries 
=============================== 

-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Compilation of the required third party libraries
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/saian/Desktop/fastest-lap-main/build/thirdparty
[ 12%] Creating directories for 'lion'
[ 25%] Performing download step (git clone) for 'lion'
Cloning into 'source'...
warning: unable to access '/Users/saian/.config/git/ignore': Permission denied
warning: unable to access '/Users/saian/.config/git/attributes': Permission denied
Already on 'main'
Your branch is up to date with 'origin/main'.
[ 37%] Performing update step for 'lion'
warning: unable to access '/Users/saian/.config/git/attributes': Permission denied
warning: unable to access '/Users/saian/.config/git/ignore': Permission denied
[ 50%] No patch step for 'lion'
[ 62%] Performing configure step for 'lion'
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- The Fortran compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:4 (project):
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.

-- Configuring incomplete, errors occurred!
See also "/Users/saian/Desktop/fastest-lap-main/build/lion/build/CMakeFiles/CMakeOutput.log".
See also "/Users/saian/Desktop/fastest-lap-main/build/lion/build/CMakeFiles/CMakeError.log".
make[2]: *** [/Users/saian/Desktop/fastest-lap-main/build/lion/src/lion-stamp/lion-configure] Error 1
make[1]: *** [CMakeFiles/lion.dir/all] Error 2
make: *** [all] Error 2

-- Configuration of fastest-lap
CMake Error at cmake/get-third-party.cmake:34 (find_package):
Could not find a package configuration file provided by "lion" with any of
the following names:

lionConfig.cmake
lion-config.cmake

Add the installation prefix of "lion" to CMAKE_PREFIX_PATH or set
"lion_DIR" to a directory containing one of the above files. If "lion"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:18 (include)

-- Configuring incomplete, errors occurred!
See also "/Users/saian/Desktop/fastest-lap-main/build/CMakeFiles/CMakeOutput.log".

Hi! You need a fortran compiler, take a look at:

https://formulae.brew.sh/formula/gcc

Hi @juanmanzanero! I have gcc already installed with xcode, also gfortran and I face the same problem than @saianp.

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$ gfortran --version
GNU Fortran (GCC) 12.1.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

What else do we need to acomplish the compilation?

Thanks.

Hello Albert,

Is this the problem you have?

"No CMAKE_Fortran_COMPILER could be found."

Puedes probar a usar CLang en lugar de gcc y g++? Usando:

cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ..