Compile ASPECT on M1 Mac

Hey! I am Mingqi and I am trying to install ASPECT on M1 Mac. I already successfully installed the deall.ii following the instructions at Apple ARM M1 OSX · dealii/dealii Wiki · GitHub. However, when I compiled ASPECT, I met some problems.
detailed.log from the deal.ii showed as below:

deal.II configuration:

CMAKE_BUILD_TYPE: DebugRelease

BUILD_SHARED_LIBS: ON

CMAKE_INSTALL_PREFIX: /Users/liumq/dealii-candi/deal.II-v9.3.3

CMAKE_SOURCE_DIR: /Users/liumq/dealii-candi/tmp/unpack/deal.II-v9.3.3

(version 9.3.3, shortrev 1e662e9dc9)

CMAKE_BINARY_DIR: /Users/liumq/dealii-candi/tmp/build/deal.II-v9.3.3

CMAKE_CXX_COMPILER: GNU 11.2.0 on platform Darwin arm64

/opt/homebrew/bin/mpicxx

C++ language standard: C++17

CMAKE_C_COMPILER: /opt/homebrew/bin/mpicc

CMAKE_Fortran_COMPILER: /opt/homebrew/bin/mpifort

CMAKE_GENERATOR: Unix Makefiles

Base configuration (prior to feature configuration):

DEAL_II_CXX_FLAGS: -pedantic -fPIC -Wall -Wextra -Wmissing-braces -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wsuggest-override -Wswitch -Wsynth -Wwrite-strings -Wno-placement-new -Wno-deprecated-declarations -Wno-literal-suffix -Wno-psabi -Wno-class-memaccess -fopenmp-simd -ftemplate-depth=1024

DEAL_II_CXX_FLAGS_RELEASE: -O2 -funroll-loops -funroll-all-loops -fstrict-aliasing -Wno-unused-local-typedefs

DEAL_II_CXX_FLAGS_DEBUG: -O0 -ggdb

DEAL_II_LINKER_FLAGS: -fuse-ld=lld

DEAL_II_LINKER_FLAGS_RELEASE:

DEAL_II_LINKER_FLAGS_DEBUG: -ggdb

DEAL_II_DEFINITIONS:

DEAL_II_DEFINITIONS_RELEASE:

DEAL_II_DEFINITIONS_DEBUG: DEBUG

DEAL_II_USER_DEFINITIONS:

DEAL_II_USER_DEFINITIONS_REL:

DEAL_II_USER_DEFINITIONS_DEB: DEBUG

DEAL_II_INCLUDE_DIRS

DEAL_II_USER_INCLUDE_DIRS:

DEAL_II_BUNDLED_INCLUDE_DIRS:

DEAL_II_LIBRARIES:

DEAL_II_LIBRARIES_RELEASE:

DEAL_II_LIBRARIES_DEBUG:

DEAL_II_VECTORIZATION_WIDTH_IN_BITS: 0

DEAL_II_HAVE_CXX17

Configured Features (DEAL_II_ALLOW_BUNDLED = ON, DEAL_II_ALLOW_AUTODETECTION = ON):

( DEAL_II_WITH_64BIT_INDICES = OFF )

( DEAL_II_WITH_ADOLC = OFF )

( DEAL_II_WITH_ARBORX = OFF )

( DEAL_II_WITH_ARPACK = OFF )

( DEAL_II_WITH_ASSIMP = OFF )

DEAL_II_WITH_BOOST set up with bundled packages

BOOST_CXX_FLAGS = -Wno-unused-local-typedefs

BOOST_DEFINITIONS = BOOST_NO_AUTO_PTR

BOOST_USER_DEFINITIONS = BOOST_NO_AUTO_PTR

BOOST_BUNDLED_INCLUDE_DIRS = /Users/liumq/dealii-candi/tmp/unpack/deal.II-v9.3.3/bundled/boost-1.70.0/include

DEAL_II_WITH_COMPLEX_VALUES = ON

( DEAL_II_WITH_CUDA = OFF )

( DEAL_II_WITH_GINKGO = OFF )

( DEAL_II_WITH_GMSH = OFF )

( DEAL_II_WITH_GSL = OFF )

DEAL_II_WITH_HDF5 set up with external dependencies

HDF5_DIR = /Users/liumq/dealii-candi/hdf5-1.10.7

HDF5_INCLUDE_DIRS = /Users/liumq/dealii-candi/hdf5-1.10.7/include

HDF5_USER_INCLUDE_DIRS = /Users/liumq/dealii-candi/hdf5-1.10.7/include

HDF5_LIBRARIES = /Users/liumq/dealii-candi/hdf5-1.10.7/lib/libhdf5_hl.dylib;/Users/liumq/dealii-candi/hdf5-1.10.7/lib/libhdf5.dylib

DEAL_II_WITH_KOKKOS set up with external dependencies

DEAL_II_WITH_LAPACK set up with external dependencies

LAPACK_WITH_64BIT_BLAS_INDICES = OFF

LAPACK_LINKER_FLAGS =

LAPACK_INCLUDE_DIRS =

LAPACK_USER_INCLUDE_DIRS =

LAPACK_LIBRARIES = -lm;-ldl;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/Accelerate.framework

( DEAL_II_WITH_METIS = OFF )

DEAL_II_WITH_MPI set up with external dependencies

MPI_VERSION = 3.1

MPI_C_COMPILER = /opt/homebrew/bin/mpicc

MPI_CXX_COMPILER = /opt/homebrew/bin/mpicxx

MPI_Fortran_COMPILER = /opt/homebrew/bin/mpifort

MPI_CXX_FLAGS =

MPI_LINKER_FLAGS =

MPI_INCLUDE_DIRS =

MPI_USER_INCLUDE_DIRS =

DEAL_II_WITH_MUPARSER set up with bundled packages

MUPARSER_BUNDLED_INCLUDE_DIRS = /Users/liumq/dealii-candi/tmp/unpack/deal.II-v9.3.3/bundled/muparser_v2_2_4//include

( DEAL_II_WITH_OPENCASCADE = OFF )

DEAL_II_WITH_P4EST set up with external dependencies

P4EST_VERSION = 2.3.2

P4EST_DIR = /Users/liumq/dealii-candi/p4est-2.3.2

P4EST_INCLUDE_DIRS = /Users/liumq/dealii-candi/p4est-2.3.2/FAST/include

P4EST_USER_INCLUDE_DIRS = /Users/liumq/dealii-candi/p4est-2.3.2/FAST/include

P4EST_LIBRARIES = optimized;/Users/liumq/dealii-candi/p4est-2.3.2/FAST/lib/libp4est.dylib;/Users/liumq/dealii-candi/p4est-2.3.2/FAST/lib/libsc.dylib;debug;/Users/liumq/dealii-candi/p4est-2.3.2/DEBUG/lib/libp4est.dylib;/Users/liumq/dealii-candi/p4est-2.3.2/DEBUG/lib/libsc.dylib;general;-lm;-ldl;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/Accelerate.framework

( DEAL_II_WITH_PETSC = OFF )

( DEAL_II_WITH_SCALAPACK = OFF )

( DEAL_II_WITH_SLEPC = OFF )

( DEAL_II_WITH_SUNDIALS = OFF )

( DEAL_II_WITH_SYMENGINE = OFF )

DEAL_II_WITH_TBB set up with bundled packages

TBB_CXX_FLAGS = -Wno-parentheses

TBB_BUNDLED_INCLUDE_DIRS = /Users/liumq/dealii-candi/tmp/unpack/deal.II-v9.3.3/bundled/tbb-2018_U2/include

DEAL_II_WITH_TRILINOS set up with external dependencies

TRILINOS_VERSION = 12.18.1

TRILINOS_DIR = /Users/liumq/dealii-candi/trilinos-release-12-18-1

TRILINOS_LINKER_FLAGS =

TRILINOS_INCLUDE_DIRS = /Users/liumq/dealii-candi/trilinos-release-12-18-1/include

TRILINOS_USER_INCLUDE_DIRS = /Users/liumq/dealii-candi/trilinos-release-12-18-1/include

TRILINOS_LIBRARIES = /Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/librol.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libtempus.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libmuelu-adapters.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libmuelu-interface.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libmuelu.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/liblocathyra.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/liblocaepetra.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/liblocalapack.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libloca.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libnoxepetra.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libnoxlapack.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libnox.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libintrepid2.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libintrepid.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libteko.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libstratimikos.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libstratimikosbelos.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libstratimikosamesos2.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libstratimikosaztecoo.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libstratimikosamesos.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libstratimikosml.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libstratimikosifpack.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libanasazitpetra.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libModeLaplace.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libanasaziepetra.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libanasazi.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libamesos2.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libshylu_nodetacho.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libbelosxpetra.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libbelostpetra.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libbelosepetra.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libbelos.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libml.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libifpack.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libzoltan2.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libpamgen_extras.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libpamgen.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libamesos.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libgaleri-xpetra.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libgaleri-epetra.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libaztecoo.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libisorropia.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libxpetra-sup.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libxpetra.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libthyratpetra.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libthyraepetraext.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libthyraepetra.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libthyracore.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libtrilinosss.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libtpetraext.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libtpetrainout.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libtpetra.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libkokkostsqr.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libtpetraclassiclinalg.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libtpetraclassicnodeapi.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libtpetraclassic.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libepetraext.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libtriutils.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libshards.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libzoltan.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libepetra.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libsacado.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/librtop.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libkokkoskernels.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libteuchoskokkoscomm.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libteuchoskokkoscompat.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libteuchosremainder.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libteuchosnumerics.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libteuchoscomm.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libteuchosparameterlist.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libteuchosparser.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libteuchoscore.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libkokkosalgorithms.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libkokkoscontainers.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libkokkoscore.dylib;/Users/liumq/dealii-candi/trilinos-release-12-18-1/lib/libgtest.dylib;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib/liblapack.tbd;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib/libblas.tbd;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib/libdl.tbd

DEAL_II_WITH_UMFPACK set up with bundled packages

UMFPACK_BUNDLED_INCLUDE_DIRS = /Users/liumq/dealii-candi/tmp/unpack/deal.II-v9.3.3/bundled/umfpack/UMFPACK/Include;/Users/liumq/dealii-candi/tmp/unpack/deal.II-v9.3.3/bundled/umfpack/AMD/Include

DEAL_II_WITH_ZLIB set up with external dependencies

ZLIB_VERSION = 1.2.11

ZLIB_INCLUDE_DIRS = /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include

ZLIB_LIBRARIES = /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib/libz.tbd

Component configuration:

( DEAL_II_COMPONENT_DOCUMENTATION = OFF )

DEAL_II_COMPONENT_EXAMPLES

( DEAL_II_COMPONENT_PACKAGE = OFF )

( DEAL_II_COMPONENT_PYTHON_BINDINGS = OFF )

detailed.log from the ASPECT build directory showed as below:

ASPECT configuration:

ASPECT_VERSION: 2.4.0-pre

GIT REVISION: 8dcb250aa (main)

CMAKE_BUILD_TYPE: Debug

DEAL_II_DIR: /Users/liumq/dealii-candi/deal.II-v9.3.3/lib/cmake/deal.II

DEAL_II VERSION: 9.3.3

ASPECT_USE_FP_EXCEPTIONS: OFF

ASPECT_RUN_ALL_TESTS: OFF

ASPECT_USE_SHARED_LIBS: ON

ASPECT_HAVE_LINK_H: OFF

ASPECT_WITH_LIBDAP: OFF

ASPECT_WITH_WORLD_BUILDER: ON /Users/liumq/aspect/contrib/world_builder

ASPECT_PRECOMPILE_HEADERS: ON

ASPECT_UNITY_BUILD: ON

CMAKE_INSTALL_PREFIX: /usr/local

CMAKE_SOURCE_DIR: /Users/liumq/aspect

CMAKE_BINARY_DIR: /Users/liumq/aspect/build

CMAKE_CXX_COMPILER: GNU 11.2.0 on platform Darwin arm64

/opt/homebrew/bin/mpicxx

PARAMETER_GUI_EXECUTABLE: PARAMETER_GUI_EXECUTABLE-NOTFOUND

LINKAGE: DYNAMIC

COMPILE_FLAGS:

_WITH_CXX14: ON

_WITH_CXX17: TRUE

_MPI_VERSION: 3.1

_WITH_64BIT_INDICES: OFF

Perhaps it is a configuration problem. If anyone can give me some suggestions, I will very much appreciate it.
Mingqi

Mingqi,
what is the actual problem? :slight_smile: I don’t see any error above! :-))
Best
W.

Sorry for the confusion. The error is showed below:
g+±11: error: unrecognized command-line option ’ -Xarch_arm64

g+±11: error: unrecognized command-line option ’ -Xarch_arm64

g+±11: error: unrecognized command-line option ’ -Xarch_arm64

g+±11: error: unrecognized command-line option ’ -Xarch_arm64

g+±11: error: unrecognized command-line option ’ -Xarch_arm64

g+±11: error: unrecognized command-line option ’ -Xarch_arm64

g+±11: error: unrecognized command-line option ’ -Xarch_arm64

g+±11: error: unrecognized command-line option ’ -Xarch_arm64

make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_38_cxx.cxx.o] Error 1

make[2]: *** Waiting for unfinished jobs…

make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_33_cxx.cxx.o] Error 1

make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_35_cxx.cxx.o] Error 1

make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_39_cxx.cxx.o] Error 1

make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_37_cxx.cxx.o] Error 1

make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_34_cxx.cxx.o] Error 1

make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_36_cxx.cxx.o] Error 1

make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_40_cxx.cxx.o] Error 1

make[1]: *** [CMakeFiles/aspect.dir/all] Error 2

make: *** [all] Error 2

I exported environment variables for all installed libraries thorough this command:
**source /Users/liumq/dealii-candi/configuration/enable.sh

Although I finished compiling the deal.ii, but I got many warnings like this:
/Users/liumq/dealii-candi/tmp/unpack/Trilinos-trilinos-release-12-18-1/packages/tpetra/core/src/Tpetra_DistObject_def.hpp:625:7: warning: ‘void Tpetra::DistObject<Packet, LocalOrdinal, GlobalOrdinal, Node>::doTransferOld(const Tpetra::SrcDistObject&, Tpetra::CombineMode, size_t, const Teuchos::ArrayView&, const Teuchos::ArrayView&, const Teuchos::ArrayView&, const Teuchos::ArrayView&, Tpetra::Distributor&, Tpetra::DistObject<Packet, LocalOrdinal, GlobalOrdinal, Node>::ReverseOption, bool) [with Packet = double; LocalOrdinal = int; GlobalOrdinal = int; Node = Kokkos::Compat::KokkosDeviceWrapperNodeKokkos::Serial; size_t = long unsigned int]’ is deprecated [-Wdeprecated-declarations]
625 | doTransferOld (src, CM, numSameIDs, permToLIDs, permFromLIDs,
| ^~~~~~~~~~~~~
/Users/liumq/dealii-candi/tmp/unpack/Trilinos-trilinos-release-12-18-1/packages/tpetra/core/src/Tpetra_DistObject_def.hpp:1293:3: note: declared here
1293 | DistObject<Packet, LocalOrdinal, GlobalOrdinal, Node>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Outputs of “mpicxx -v” and “env | grep MPI” are showed below:
% mpicxx -v

Using built-in specs.

COLLECT_GCC=/opt/homebrew/bin/g+±11

COLLECT_LTO_WRAPPER=/opt/homebrew/Cellar/gcc/11.2.0_3/bin/…/libexec/gcc/aarch64-apple-darwin21/11/lto-wrapper

Target: aarch64-apple-darwin21

Configured with: …/configure --prefix=/opt/homebrew/opt/gcc --libdir=/opt/homebrew/opt/gcc/lib/gcc/11 --disable-nls --enable-checking=release --with-gcc-major-version-only --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-11 --with-gmp=/opt/homebrew/opt/gmp --with-mpfr=/opt/homebrew/opt/mpfr --with-mpc=/opt/homebrew/opt/libmpc --with-isl=/opt/homebrew/opt/isl --with-zstd=/opt/homebrew/opt/zstd --with-pkgversion=‘Homebrew GCC 11.2.0_3’ --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --build=aarch64-apple-darwin21 --with-system-zlib --with-native-system-header-dir=/usr/include --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk

Thread model: posix

Supported LTO compression algorithms: zlib zstd

gcc version 11.2.0 (Homebrew GCC 11.2.0_3)

% env | grep MPI

OMPI_CXX=g+±11

OMPI_FC=gfortran-11

Sorry! I forgot to post the error information. Here it is.
[ 70%] Building CXX object CMakeFiles/aspect.dir/Unity/unity_34_cxx.cxx.o

g+±11: error: unrecognized command-line option ’ -Xarch_arm64

g+±11: error: unrecognized command-line option ’ -Xarch_arm64

g+±11: error: unrecognized command-line option ’ -Xarch_arm64

g+±11: error: unrecognized command-line option ’ -Xarch_arm64

g+±11: error: unrecognized command-line option ’ -Xarch_arm64

g+±11: error: unrecognized command-line option ’ -Xarch_arm64

g+±11: error: unrecognized command-line option ’ -Xarch_arm64

g+±11: error: unrecognized command-line option ’ -Xarch_arm64

make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_38_cxx.cxx.o] Error 1

make[2]: *** Waiting for unfinished jobs…

make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_33_cxx.cxx.o] Error 1

make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_35_cxx.cxx.o] Error 1

make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_39_cxx.cxx.o] Error 1

make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_37_cxx.cxx.o] Error 1

make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_34_cxx.cxx.o] Error 1

make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_36_cxx.cxx.o] Error 1

make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_40_cxx.cxx.o] Error 1

make[1]: *** [CMakeFiles/aspect.dir/all] Error 2

make: *** [all] Error 2

In addition, although I finished the installation of dealii, I got many warnings like this:
/Users/username/dealii-candi/tmp/unpack/Trilinos-trilinos-release-12-18-1/packages/tpetra/core/src/Tpetra_DistObject_def.hpp:625:7: warning: ‘void Tpetra::DistObject<Packet, LocalOrdinal, GlobalOrdinal, Node>::doTransferOld(const Tpetra::SrcDistObject&, Tpetra::CombineMode, size_t, const Teuchos::ArrayView&, const Teuchos::ArrayView&, const Teuchos::ArrayView&, const Teuchos::ArrayView&, Tpetra::Distributor&, Tpetra::DistObject<Packet, LocalOrdinal, GlobalOrdinal, Node>::ReverseOption, bool) [with Packet = double; LocalOrdinal = int; GlobalOrdinal = int; Node = Kokkos::Compat::KokkosDeviceWrapperNodeKokkos::Serial; size_t = long unsigned int]’ is deprecated [-Wdeprecated-declarations]
625 | doTransferOld (src, CM, numSameIDs, permToLIDs, permFromLIDs,
| ^~~~~~~~~~~~~

It looks like you are using GCC, which I would strongly advise against. Can you please try using clang instead? The wiki discusses how to do it.

Many thanks for your reply. I tried using clang and got this error:
make[2]: *** [CMakeFiles/aspect.dir/contrib/world_builder/source/coordinate_systems/interface.cc.o] Error 1

140 warnings and 15 errors generated.

make[2]: *** [CMakeFiles/aspect.dir/contrib/world_builder/source/features/continental_plate.cc.o] Error 1

3 warnings and 20 errors generated.

make[2]: *** [CMakeFiles/aspect.dir/cmake_pch_arm64.hxx.pch] Error 1

make[1]: *** [CMakeFiles/aspect.dir/all] Error 2

make: *** [all] Error 2

Can you scroll up and see what the actual errors produced for these two files (interface.cc and continental_plate.cc) are? The errors should have been listed further up in the output.
Best
W.

Yes, the errors are very long. Moreover, not only these two files are listed, but other files (e.g. string.h, word.h, parameters.h et al.) are also listed when I use clang instead of gcc-11. Below you can find more details:
125 warnings and 14 errors generated.
make[2]: *** [CMakeFiles/aspect.dir/contrib/world_builder/source/coordinate_systems/spherical.cc.o] Error 1
107 warnings and 9 errors generated.
In file included from /Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:20:
In file included from /Users/liumq/aspect/contrib/world_builder/include/world_builder/features/continental_plate.h:23:
In file included from /Users/liumq/aspect/contrib/world_builder/include/world_builder/features/interface.h:29:
/Users/liumq/aspect/contrib/world_builder/include/world_builder/utilities.h:43:5: error: unknown type name ‘constexpr’
constexpr double const_pi = 3.141592653589793238462643383279502884;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/utilities.h:207:10: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
enum class InterpolationType
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/utilities.h:213:14: warning: commas at the end of enumerator lists are a C++11 extension [-Wc++11-extensions]
Invalid,
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/utilities.h:303:104: error: expected expression
std::vector global_x_list = {});
^
126 warnings and 13 errors generated.
make[2]: *** [CMakeFiles/aspect.dir/contrib/world_builder/source/features/continental_plate_models/grains/interface.cc.o] Error 1
make[2]: *** [CMakeFiles/aspect.dir/contrib/world_builder/source/features/continental_plate_models/composition/uniform.cc.o] Error 1
135 warnings and 11 errors generated.
107 warnings and 9 errors generated.
make[2]: *** [CMakeFiles/aspect.dir/contrib/world_builder/source/coordinate_systems/interface.cc.o] Error 1
make[2]: *** [CMakeFiles/aspect.dir/contrib/world_builder/source/features/continental_plate_models/composition/interface.cc.o] Error 1
In file included from /Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:20:
/Users/liumq/aspect/contrib/world_builder/include/world_builder/features/continental_plate.h:65:45: warning: ‘override’ keyword is a C++11 extension [-Wc++11-extensions]
void parse_entries(Parameters &prm) override final;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/features/continental_plate.h:65:54: warning: ‘final’ keyword is a C++11 extension [-Wc++11-extensions]
void parse_entries(Parameters &prm) override final;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/features/continental_plate.h:75:54: warning: ‘override’ keyword is a C++11 extension [-Wc++11-extensions]
double temperature) const override final;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/features/continental_plate.h:75:63: warning: ‘final’ keyword is a C++11 extension [-Wc++11-extensions]
double temperature) const override final;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/features/continental_plate.h:86:54: warning: ‘override’ keyword is a C++11 extension [-Wc++11-extensions]
double composition) const override final;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/features/continental_plate.h:86:63: warning: ‘final’ keyword is a C++11 extension [-Wc++11-extensions]
double composition) const override final;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/features/continental_plate.h:99:51: warning: ‘override’ keyword is a C++11 extension [-Wc++11-extensions]
WorldBuilder::grains grains) const override final;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/features/continental_plate.h:99:60: warning: ‘final’ keyword is a C++11 extension [-Wc++11-extensions]
WorldBuilder::grains grains) const override final;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/features/continental_plate.h:60:81: error: expected expression
const std::vectorstd::string &required_entries = {});
^
In file included from /Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:29:
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/array.h:67:67: warning: ‘override’ keyword is a C++11 extension [-Wc++11-extensions]
const std::string &documentation) const override final;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/array.h:67:76: warning: ‘final’ keyword is a C++11 extension [-Wc++11-extensions]
const std::string &documentation) const override final;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/array.h:108:35: warning: ‘override’ keyword is a C++11 extension [-Wc++11-extensions]
Array *clone_impl() const override final
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/array.h:108:44: warning: ‘final’ keyword is a C++11 extension [-Wc++11-extensions]
Array *clone_impl() const override final
^
In file included from /Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:30:
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/double.h:57:67: warning: ‘override’ keyword is a C++11 extension [-Wc++11-extensions]
const std::string &documentation) const override final;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/double.h:57:76: warning: ‘final’ keyword is a C++11 extension [-Wc++11-extensions]
const std::string &documentation) const override final;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/double.h:62:36: warning: ‘override’ keyword is a C++11 extension [-Wc++11-extensions]
Double *clone_impl() const override final
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/double.h:62:45: warning: ‘final’ keyword is a C++11 extension [-Wc++11-extensions]
Double *clone_impl() const override final
^
In file included from /Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:32:
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/object.h:64:67: warning: ‘override’ keyword is a C++11 extension [-Wc++11-extensions]
const std::string &documentation) const override final;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/object.h:64:76: warning: ‘final’ keyword is a C++11 extension [-Wc++11-extensions]
const std::string &documentation) const override final;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/object.h:74:36: warning: ‘override’ keyword is a C++11 extension [-Wc++11-extensions]
Object *clone_impl() const override final
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/object.h:74:45: warning: ‘final’ keyword is a C++11 extension [-Wc++11-extensions]
Object *clone_impl() const override final
^
In file included from /Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:33:
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/unsigned_int.h:58:67: warning: ‘override’ keyword is a C++11 extension [-Wc++11-extensions]
const std::string &documentation) const override final;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/unsigned_int.h:58:76: warning: ‘final’ keyword is a C++11 extension [-Wc++11-extensions]
const std::string &documentation) const override final;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/unsigned_int.h:67:41: warning: ‘override’ keyword is a C++11 extension [-Wc++11-extensions]
UnsignedInt *clone_impl() const override final
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/unsigned_int.h:67:50: warning: ‘final’ keyword is a C++11 extension [-Wc++11-extensions]
UnsignedInt *clone_impl() const override final
^
In file included from /Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:34:
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/plugin_system.h:63:67: warning: ‘override’ keyword is a C++11 extension [-Wc++11-extensions]
const std::string &documentation) const override final;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/plugin_system.h:63:76: warning: ‘final’ keyword is a C++11 extension [-Wc++11-extensions]
const std::string &documentation) const override final;
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/plugin_system.h:72:42: warning: ‘override’ keyword is a C++11 extension [-Wc++11-extensions]
PluginSystem *clone_impl() const override final
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/types/plugin_system.h:72:51: warning: ‘final’ keyword is a C++11 extension [-Wc++11-extensions]
PluginSystem *clone_impl() const override final
^
/Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:53:9: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
= default;
^
/Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:68:124: error: expected expression
Types::PluginSystem("", Features::ContinentalPlateModels::Temperature::Interface::declare_entries, {“model”}),
^
/Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:71:124: error: expected expression
Types::PluginSystem("", Features::ContinentalPlateModels::Composition::Interface::declare_entries, {“model”}),
^
/Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:74:119: error: expected expression
Types::PluginSystem("", Features::ContinentalPlateModels::Grains::Interface::declare_entries, {“model”}),
^
/Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:152:16: warning: ‘auto’ type specifier is a C++11 extension [-Wc++11-extensions]
for (auto &temperature_model: temperature_models)
^
/Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:152:39: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (auto &temperature_model: temperature_models)
^
/Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:185:16: warning: ‘auto’ type specifier is a C++11 extension [-Wc++11-extensions]
for (auto &composition_model: composition_models)
^
/Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:185:39: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (auto &composition_model: composition_models)
^
/Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:218:16: warning: ‘auto’ type specifier is a C++11 extension [-Wc++11-extensions]
for (auto &grains_model: grains_models)
^
/Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:218:34: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (auto &grains_model: grains_models)
^
/Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:238:5: warning: ‘override’ keyword is a C++11 extension [-Wc++11-extensions]
WB_REGISTER_FEATURE(ContinentalPlate, continental plate)
^
/Users/liumq/aspect/contrib/world_builder/include/world_builder/features/interface.h:232:55: note: expanded from macro ‘WB_REGISTER_FEATURE’
std::unique_ptr create(World *world) override final {
^
/Users/liumq/aspect/contrib/world_builder/source/features/continental_plate.cc:238:5: warning: ‘final’ keyword is a C++11 extension [-Wc++11-extensions]
/Users/liumq/aspect/contrib/world_builder/include/world_builder/features/interface.h:232:64: note: expanded from macro ‘WB_REGISTER_FEATURE’
std::unique_ptr create(World *world) override final {
^
140 warnings and 15 errors generated.
make[2]: *** [CMakeFiles/aspect.dir/contrib/world_builder/source/features/continental_plate.cc.o] Error 1
3 warnings and 20 errors generated.
make[2]: *** [CMakeFiles/aspect.dir/cmake_pch_arm64.hxx.pch] Error 1
make[1]: *** [CMakeFiles/aspect.dir/all] Error 2
make: *** [all] Error 2

That means that you are compiling the WorldBuilder with a compiler that assumes you want to use C++03 or C++98, rather than C++14 as necessary.

I will have to let others comment on how that can happen.

Best
W.

The world builder source files are compiled before the aspect source files (don’t really know why, but that is what I noticed), so I suspect that if you turn off the world builder, you get the same issue for aspect.

So you need a compiler which supports C++14. Looking at the cmake file, it checks whether deal.ii is compiled with c++11, but it doesn’t seem to check if the aspect compiler is c++14. Maybe we should fix that.

Many thanks for your answer. I am not a programmer and have no clue about it. Hope it can be fixed soon. Thanks again.
Best regards,
Mingqi

Hey Mingqi,

The thing I proposed was to warn you if you are not using a new enough compiler, but it would not solve your problem.

What version of clang are you using?

Also, to test whether it is actually is a world builder issue, could you turn off the world builder? Use cmake -DASPECT_WITH_WORLD_BUILDER=OFF .. in your build folder, and try compiling again.

The version of clang I am using is Apple clang version 13.1.6 (clang-1316.0.21.2), Target: arm64-apple-darwin21.4.0.
Thanks for your suggestion. After I turn off the world builder using cmake -DASPECT_WITH_WORLD_BUILDER=OFF …, it is probably worse than before:
/Users/liumq/dealii-candi/trilinos-release-12-18-1/include/impl/Kokkos_Utilities.hpp:112:16: error: too many template arguments for alias template 'make_integer_sequence’

{ using type = integer_sequence<T,0,1,2> ; };

*^ ~~~~*

/Users/liumq/dealii-candi/trilinos-release-12-18-1/include/impl/Kokkos_Utilities.hpp:95:1: note: template is declared here

using make_integer_sequence =

^

/Users/liumq/dealii-candi/trilinos-release-12-18-1/include/impl/Kokkos_Utilities.hpp:116:16: error: no template named ‘integer_sequence’; did you mean ‘make_integer_sequence’?

{ using type = integer_sequence<T,0,1,2,3> ; };

^

/Users/liumq/dealii-candi/trilinos-release-12-18-1/include/impl/Kokkos_Utilities.hpp:95:1: note: ‘make_integer_sequence’ declared here

using make_integer_sequence =

^

fatal error: too many errors emitted, stopping now [-ferror-limit=]

3 warnings and 20 errors generated.

make[2]: *** [CMakeFiles/aspect.dir/cmake_pch_arm64.hxx.pch] Error 1

make[1]: *** [CMakeFiles/aspect.dir/all] Error 2

make: *** [all] Error 2

Did you use clang when installing dependencies using candi? Is this candi master or the dealii-9.3 branch?

Yes. I used clang when installing dependencies using candi (the dealii-9.3 branch).

I think I find a solution that can finish the compiling using gcc-11, although I am not sure if it is correct or not.

  1. run: cmake …
  2. delete all “-Xarch_arm64” in these two files - build.make and flags.make - from the foler: /Users/liumq/aspect/build/CMakeFiles/aspect.dir
  3. run: make

Although I still got some warnings as below, the compiling can be finished.
cc1plus: warning: /Users/liumq/aspect/build/CMakeFiles/aspect.dir/cmake_pch_arm64.hxx.gch: had text segment at different address [ -Winvalid-pch ]

I test some models and all of them work fine.

Hope this is helpful to fix the bug.

Best regards,
Mingqi

Dear Mingqi,

You shouldn’t need to modify build.make and flags.make (I didn’t need to do this when I installed on a new Macbook Pro with Apple Silicon). However, if ASPECT now works for you, that’s great.

Installation is certainly not straightforward for Mac M1 users, and this is useful information, so thank you. I think we may need to write more detailed installation notes covering initial installation, and also reinstallation after Mac dependencies are updated.

Do let us know if you have more issues.

Thanks,
Bob