dealii / candi

candi - (Compile & Install) - Downloads, configures, builds and installs deal.II
GNU Lesser General Public License v3.0
61 stars 61 forks source link

Problem with installation deal.ii on mac M1 #282

Open SaeedZarzor opened 2 years ago

SaeedZarzor commented 2 years ago

Hi,

I am trying to install deal.ii version 9.3.3 on my mac book with apple silicon M1 processor. I get the following error during build opencascade. Does anyone have an idea about that and can help me to avoid that error ??

Screenshot 2022-03-16 at 18 29 32
tjhei commented 2 years ago

Please use the master branch of candi (git checkout master) for now. It contains a fix for this. Also see https://github.com/dealii/dealii/wiki/Apple-ARM-M1-OSX

On Wed, Mar 16, 2022 at 1:44 PM Saeed Zarzor @.***> wrote:

Hi,

I am trying to install deal.ii version 9.3.3 on my mac book with apple silicon M1 processor. I had the following error during build opencascade. Does anyone have an idea about that and can help me to avoid that error ??

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

SaeedZarzor commented 2 years ago

Thank you for your reply. I have tried candi master branch and the problem is solved. I have another issue, when I use gcc-11 compiler I get the error message in the first picture (as it is expected due to ARM64). On the other hand, when I try gcc compiler a get the error in the second picture.

What can I do ??

Screenshot 2022-03-17 at 14 06 43 Screenshot 2022-03-17 at 14 10 20
tjhei commented 2 years ago

Current GCC does not work on M1 hardware for large c++ codebases. Please use clang as described in https://github.com/dealii/dealii/wiki/Apple-ARM-M1-OSX

SaeedZarzor commented 2 years ago

I have used clang and also it did not work. I have received the following message "The current version of deal.II requires a compiler with enabled C++14 support. Make sure to use a modern enough compiler (GCC version 5 onwards, Clang version 4 onwards, or Microsoft MS VS 2015 onwards) and check that the compiler flag "-std=" is either unset, or set to at least c++14."

the apple clang installed on my machine has version 13.1.6.

tjhei commented 2 years ago

the apple clang installed on my machine has version 13.1.6.

Clang 13 supports c++ 14. I probably did something incorrectly during configuration.

Can you post the whole text output that deal.II generates during configuration? Did you set any environment variable like CXX? What is the exact command line you used to run candi?

SaeedZarzor commented 2 years ago

I use the following command line without any further configuration export CC=mpicc; export CXX=mpicxx; export FC=mpifort; export FF=mpifort; \ OMPI_CC=calng; export OMPI_CXX=clang++; export OMPI_FC=gfortran-11

The output message is

-- Include /Users/saeed/dealii-candi/tmp/unpack/deal.II-master/cmake/setup_cached_variables.cmake -- Prepending ${CUDA_NVCC_FLAGS} to ${DEAL_II_CUDA_FLAGS} -- The CXX compiler identification is AppleClang 13.1.6.13160021 -- The C compiler identification is AppleClang 13.1.6.13160021 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /opt/homebrew/bin/mpicxx - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /opt/homebrew/bin/mpicc - skipped -- Detecting C compile features -- Detecting C compile features - done -- The Fortran compiler identification is GNU 11.2.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: /opt/homebrew/bin/mpifort - skipped -- -- Include /Users/saeed/dealii-candi/tmp/unpack/deal.II-master/cmake/setup_deal_ii.cmake -- -- Include /Users/saeed/dealii-candi/tmp/unpack/deal.II-master/cmake/setup_compiler_flags.cmake -- -- Include /Users/saeed/dealii-candi/tmp/unpack/deal.II-master/cmake/setup_compiler_flags_gnu.cmake -- -- Include /Users/saeed/dealii-candi/tmp/unpack/deal.II-master/bundled/setup_bundled.cmake -- -- Include /Users/saeed/dealii-candi/tmp/unpack/deal.II-master/cmake/checks/check_01_cpu_features.cmake -- -- Include /Users/saeed/dealii-candi/tmp/unpack/deal.II-master/cmake/checks/check_01_cxx_features.cmake -- C++14 support is disabled. -- C++14 support not available. Try to set -std=c++14 explicitly -- Performing Test DEAL_II_HAVE_FLAG_std=c14 -- Performing Test DEAL_II_HAVE_FLAG_std=c14 - Failed -- C++14 support is disabled. CMake Error at cmake/checks/check_01_cxx_features.cmake:322 (MESSAGE):

The current version of deal.II requires a compiler with enabled C++14 support. Make sure to use a modern enough compiler (GCC version 5 onwards, Clang version 4 onwards, or Microsoft MS VS 2015 onwards) and check that the compiler flag "-std=" is either unset, or set to at least c++14.

Call Stack (most recent call first): cmake/macros/macro_verbose_include.cmake:19 (INCLUDE) CMakeLists.txt:112 (VERBOSE_INCLUDE)

-- Configuring incomplete, errors occurred! See also "/Users/saeed/dealii-candi/tmp/build/deal.II-master/CMakeFiles/CMakeOutput.log". See also "/Users/saeed/dealii-candi/tmp/build/deal.II-master/CMakeFiles/CMakeError.log". Failure with exit status: 1 Exit message: There was a problem configuring dealii master.

tjhei commented 2 years ago

Try to not set any of the ENV variables and try again.