Skip to content

Compilation possible on macOS with ARM64 architecture? #56

@yonghoonlee

Description

@yonghoonlee

I tried to compile using the conda-forge compilers toolchain, but it didn't work.
What I tried was:

conda create -y --name cactus
conda activate cactus
conda install -c conda-forge compilers cmake
mkdir -p build
cd build
cmake ..
make

When I run cmake, I got the following output:

cmake ..
-- The Fortran compiler identification is GNU 11.3.0
-- Checking whether Fortran compiler has -isysroot
-- Checking whether Fortran compiler has -isysroot - yes
-- Checking whether Fortran compiler supports OSX deployment target flag
-- Checking whether Fortran compiler supports OSX deployment target flag - yes
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /Users/yhlee/conda/envs/cactus/bin/arm64-apple-darwin20.0.0-gfortran - skipped
-- The C compiler identification is Clang 14.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/yhlee/conda/envs/cactus/bin/arm64-apple-darwin20.0.0-clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - not found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Looking for Fortran dgemm
-- Looking for Fortran dgemm - found
-- Found BLAS: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework  
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- Found LAPACK: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework;-lm;-ldl  
-- Found OpenMP_C: -fopenmp=libomp (found version "5.0") 
-- Found OpenMP_Fortran: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "5.0")  
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/yhlee/Documents/CACTUS/build

However, when I try to make, I get following error message:

make          
[  1%] Building Fortran object CMakeFiles/cactus.dir/src/mod/airfoil.f90.o
arm64-apple-darwin20.0.0-gfortran: fatal error: no input files
compilation terminated.
/bin/sh: -O2: command not found
make[2]: *** [CMakeFiles/cactus.dir/src/mod/airfoil.f90.o] Error 127
make[1]: *** [CMakeFiles/cactus.dir/all] Error 2
make: *** [all] Error 2

When I checked the folder CMakeFiles/cactus.dir/src/mod/, there was no "airfoil.f90.o" file created there.
However, I was able to still find the input file (../src/mod/airfoil.f90), and I also checked the content of the source code.

How can I resolve this problem? Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions