Installing FEniCSx using conda on Mac M1 and M2 chips

Hi,

I installed FEniCSx using conda, exactly as instructed on my M1 macbook and M2 MacStudio. The python interface is working fine. However, when I run cmake in cpp/demo/poisson, I get the following error:

’ ’ ’
(fenicsx) poisson % cmake .
– The CXX compiler identification is Clang 18.1.8
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - failed
– Check for working CXX compiler: /opt/miniconda3/envs/fenicsx/bin/clang++
– Check for working CXX compiler: /opt/miniconda3/envs/fenicsx/bin/clang++ - broken
CMake Error at /opt/homebrew/share/cmake/Modules/CMakeTestCXXCompiler.cmake:73 (message):
The C++ compiler

"/opt/miniconda3/envs/fenicsx/bin/clang++"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: 'demo/poisson/CMakeFiles/CMakeScratch/TryCompile-hkgWzx'

Run Build Command(s): /opt/homebrew/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_d1b78/fast
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/cmTC_d1b78.dir/build.make CMakeFiles/cmTC_d1b78.dir/build
Building CXX object CMakeFiles/cmTC_d1b78.dir/testCXXCompiler.cxx.o
/opt/miniconda3/envs/fenicsx/bin/clang++   -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -MD -MT CMakeFiles/cmTC_d1b78.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_d1b78.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_d1b78.dir/testCXXCompiler.cxx.o -c /demo/poisson/CMakeFiles/CMakeScratch/TryCompile-hkgWzx/testCXXCompiler.cxx
Linking CXX executable cmTC_d1b78
/opt/homebrew/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d1b78.dir/link.txt --verbose=1
dyld[17459]: Symbol not found: __ZNK4tapi2v119LinkerInterfaceFile28getPlatformsAndMinDeploymentEv
  Referenced from: <565CE761-C1EB-37F5-9738-E1BCF6F2EC75> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
  Expected in:     <15C501C6-0EF4-3E32-9C14-04EC4CD23D35> /opt/miniconda3/envs/fenicsx/lib/libtapi.dylib
clang++: error: unable to execute command: Abort trap: 6
clang++: error: linker command failed due to signal (use -v to see invocation)
/opt/miniconda3/envs/fenicsx/bin/clang++  -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/opt/miniconda3/envs/fenicsx/lib -L/opt/miniconda3/envs/fenicsx/lib  CMakeFiles/cmTC_d1b78.dir/testCXXCompiler.cxx.o -o cmTC_d1b78
make[1]: *** [cmTC_d1b78] Error 1
make: *** [cmTC_d1b78/fast] Error 2

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:8 (project)

– Configuring incomplete, errors occurred!
(fenicsx) poisson %
’ ’ ’

Additional information. Here what I get:

’ ’ ’
(fenicsx) % conda env export
name: fenicsx
channels:

  • conda-forge
  • defaults
  • main
  • https://repo.anaconda.com/pkgs/r
    dependencies:
  • aiohappyeyeballs=2.4.4=pyhd8ed1ab_1
  • aiohttp=3.11.10=py313ha9b7d5b_0
  • aiosignal=1.3.2=pyhd8ed1ab_0
  • aom=3.9.1=h7bae524_0
  • attrs=24.3.0=pyh71513ae_0
  • blosc=1.21.6=h5499902_0
  • brotli=1.1.0=hd74edd7_2
  • brotli-bin=1.1.0=hd74edd7_2
  • brotli-python=1.1.0=py313h3579c5c_2
  • bzip2=1.0.8=h99b78c6_7
  • c-ares=1.34.4=h5505292_0
  • c-blosc2=2.15.2=h069cb6c_0
  • ca-certificates=2024.12.14=hf0a4a13_0
  • cairo=1.18.2=h6a3b0d2_1
  • cctools_osx-arm64=1010.6=h908b477_2
  • certifi=2024.12.14=pyhd8ed1ab_0
  • cffi=1.17.1=py313hc845a76_0
  • charset-normalizer=3.4.0=pyhd8ed1ab_1
  • clang=18.1.8=default_h675cc0c_5
  • clang-18=18.1.8=default_h5c12605_5
  • clang_impl_osx-arm64=18.1.8=h2ae9ea5_23
  • clang_osx-arm64=18.1.8=h07b0088_23
  • clangxx=18.1.8=default_h675cc0c_5
  • cmake=3.31.2=ha25475f_1
  • compiler-rt=18.1.8=h856b3c1_1
  • compiler-rt_osx-arm64=18.1.8=h832e737_1
  • contourpy=1.3.1=py313h0ebd0e5_0
  • cycler=0.12.1=pyhd8ed1ab_1
  • cyrus-sasl=2.1.27=h60b93bd_7
  • dav1d=1.2.1=hb547adb_0
  • double-conversion=3.3.0=h13dd4ca_0
  • eigen=3.4.0=h1995070_0
  • expat=2.6.4=h286801f_0
  • fenics-basix=0.9.0=py313hd7981f8_2
  • fenics-basix-nanobind-abi=0.2.1.18=h9b63b7c_2
  • fenics-dolfinx=0.9.0=py313hb8db8a6_106
  • fenics-ffcx=0.9.0=pyh2e48890_0
  • fenics-libbasix=0.9.0=hf7ae0cd_2
  • fenics-libdolfinx=0.9.0=ha5ec493_106
  • fenics-ufcx=0.9.0=hb7f7608_0
  • fenics-ufl=2024.2.0=pyhd8ed1ab_0
  • ffmpeg=7.1.0=gpl_h7253ecb_107
  • fftw=3.3.10=mpi_mpich_hd148bab_10
  • fmt=11.0.2=h420ef59_0
  • font-ttf-dejavu-sans-mono=2.37=hab24e00_0
  • font-ttf-inconsolata=3.000=h77eed37_0
  • font-ttf-source-code-pro=2.038=h77eed37_0
  • font-ttf-ubuntu=0.83=h77eed37_3
  • fontconfig=2.15.0=h1383a14_1
  • fonts-conda-ecosystem=1=0
  • fonts-conda-forge=1=0
  • fonttools=4.55.3=py313ha9b7d5b_0
  • freetype=2.12.1=hadb7bae_2
  • fribidi=1.0.10=h27ca646_0
  • frozenlist=1.5.0=py313h63a2874_0
  • gdk-pixbuf=2.42.12=h7ddc832_0
  • gl2ps=1.4.2=hc97c1ff_1
  • glew=2.1.0=h9f76cd9_2
  • gmp=6.3.0=h7bae524_2
  • graphite2=1.3.13=hebf3989_1003
  • h2=4.1.0=pyhd8ed1ab_1
  • harfbuzz=9.0.0=h997cde5_1
  • hdf4=4.2.15=h2ee6834_7
  • hdf5=1.14.4=mpi_mpich_h13a04de_5
  • hpack=4.0.0=pyhd8ed1ab_1
  • hyperframe=6.0.1=pyhd8ed1ab_1
  • hypre=2.32.0=mpi_mpich_h189fe77_1
  • icu=75.1=hfee45f7_0
  • idna=3.10=pyhd8ed1ab_1
  • jsoncpp=1.9.6=h726d253_1
  • kahip=3.16=py313hb16cd43_4
  • kiwisolver=1.4.7=py313hf9c7212_0
  • krb5=1.21.3=h237132a_0
  • lame=3.100=h1a8c8d9_1003
  • lcms2=2.16=ha0e7c42_0
  • ld64_osx-arm64=951.9=hfc0fa09_2
  • lerc=4.0.0=h9a09cb3_0
  • libabseil=20240722.0=cxx17_hf9b8971_1
  • libadios2=2.10.2=mpi_mpich_h9892836_2
  • libaec=1.1.3=hebf3989_0
  • libamd=3.3.3=ss783_h6dbf161
  • libass=0.17.3=hf20b609_0
  • libblas=3.9.0=26_osxarm64_openblas
  • libboost=1.86.0=hc9fb7c5_3
  • libboost-devel=1.86.0=hf450f58_3
  • libboost-headers=1.86.0=hce30654_3
  • libbrotlicommon=1.1.0=hd74edd7_2
  • libbrotlidec=1.1.0=hd74edd7_2
  • libbrotlienc=1.1.0=hd74edd7_2
  • libbtf=2.3.2=ss783_h6c9afe8
  • libcamd=3.3.3=ss783_h6c9afe8
  • libcblas=3.9.0=26_osxarm64_openblas
  • libccolamd=3.3.4=ss783_h6c9afe8
  • libcholmod=5.3.0=ss783_h87d6651
  • libclang-cpp17=17.0.6=default_h146c034_7
  • libclang-cpp18.1=18.1.8=default_h5c12605_5
  • libclang13=19.1.6=default_h81d93ff_0
  • libcolamd=3.3.4=ss783_h6c9afe8
  • libcurl=8.11.1=h73640d1_0
  • libcxsparse=4.4.1=ss783_hbf61d5d
  • libcxx=19.1.6=ha82da77_1
  • libcxx-devel=18.1.8=h6dc3340_7
  • libdeflate=1.23=hec38601_0
  • libedit=3.1.20191231=hc8eb9b7_2
  • libev=4.33=h93a5062_2
  • libexpat=2.6.4=h286801f_0
  • libfabric=1.22.0=hce30654_3
  • libfabric1=1.22.0=h5505292_3
  • libffi=3.4.2=h3422bc3_5
  • libgfortran=5.0.0=13_2_0_hd922786_3
  • libgfortran5=13.2.0=hf226fd6_3
  • libglib=2.82.2=h07bd6cf_0
  • libhwloc=2.11.2=default_hbce5d74_1001
  • libiconv=1.17=h0d3ecfb_2
  • libintl=0.22.5=h8414b35_3
  • libjpeg-turbo=3.0.0=hb547adb_1
  • libklu=2.3.5=ss783_h4a7adf4
  • liblapack=3.9.0=26_osxarm64_openblas
  • libldl=3.3.2=ss783_h6c9afe8
  • libllvm17=17.0.6=h5090b49_2
  • libllvm18=18.1.8=h5090b49_2
  • libllvm19=19.1.6=hc4b4ae8_0
  • liblzma=5.6.3=h39f12f2_1
  • libmpdec=4.0.0=h99b78c6_0
  • libnetcdf=4.9.2=nompi_h6569565_116
  • libnghttp2=1.64.0=h6d7220d_0
  • libntlm=1.4=h3422bc3_1002
  • libogg=1.3.5=h99b78c6_0
  • libopenblas=0.3.28=openmp_hf332438_1
  • libopenvino=2024.5.0=h97facdf_0
  • libopenvino-arm-cpu-plugin=2024.5.0=h97facdf_0
  • libopenvino-auto-batch-plugin=2024.5.0=h7f72211_0
  • libopenvino-auto-plugin=2024.5.0=h7f72211_0
  • libopenvino-hetero-plugin=2024.5.0=hd3d436d_0
  • libopenvino-ir-frontend=2024.5.0=hd3d436d_0
  • libopenvino-onnx-frontend=2024.5.0=h3192354_0
  • libopenvino-paddle-frontend=2024.5.0=h3192354_0
  • libopenvino-pytorch-frontend=2024.5.0=h286801f_0
  • libopenvino-tensorflow-frontend=2024.5.0=hafbd6be_0
  • libopenvino-tensorflow-lite-frontend=2024.5.0=h286801f_0
  • libopus=1.3.1=h27ca646_1
  • libparu=1.0.0=ss783_hf1d7083
  • libpng=1.6.44=hc14010f_0
  • libpq=17.2=ha9b7db8_1
  • libprotobuf=5.28.2=h8f0b736_0
  • libptscotch=7.0.5=ha7c25b6_4
  • librbio=4.3.4=ss783_h6c9afe8
  • librsvg=2.58.4=h40956f1_0
  • libscotch=7.0.5=hc2b2845_4
  • libsodium=1.0.20=h99b78c6_0
  • libspex=3.2.1=ss783_h30f3287
  • libspqr=4.3.4=ss783_h93d26d6
  • libsqlite=3.47.2=h3f77e49_0
  • libssh2=1.11.1=h9cc3647_0
  • libsuitesparseconfig=7.8.3=ss783_h714a54a
  • libtheora=1.1.1=h99b78c6_1006
  • libtiff=4.7.0=h551f018_3
  • libumfpack=6.3.5=ss783_h852ec90
  • libuv=1.49.2=h7ab814d_0
  • libvorbis=1.3.7=h9f76cd9_0
  • libvpx=1.14.1=h7bae524_0
  • libwebp-base=1.4.0=h93a5062_0
  • libxcb=1.17.0=hdb1d25a_0
  • libxml2=2.13.5=h178c5d8_1
  • libzip=1.11.2=h1336266_0
  • libzlib=1.3.1=h8359307_2
  • llvm-openmp=19.1.6=hdb05f8b_0
  • llvm-tools=18.1.8=h5090b49_2
  • llvm-tools-18=18.1.8=h5090b49_2
  • loguru=0.7.2=py313h8f79df9_2
  • lz4-c=1.9.4=hb7217d7_0
  • matplotlib-base=3.10.0=py313haaf02c0_0
  • metis=5.1.0=h15f6cfe_1007
  • mpfr=4.2.1=hb693164_3
  • mpi=1.0.1=mpich
  • mpi4py=4.0.1=py313h41ff552_0
  • mpich=4.2.3=h6b0954e_102
  • msgpack-python=1.1.0=py313hf9c7212_0
  • multidict=6.1.0=py313h6347b5a_1
  • mumps-include=5.7.3=hce30654_5
  • mumps-mpi=5.7.3=h83d4000_5
  • munkres=1.1.4=pyh9f0ad1d_0
  • mysql-common=9.0.1=hd7719f6_3
  • mysql-libs=9.0.1=ha8be5b7_3
  • ncurses=6.5=h7bae524_1
  • nlohmann_json=3.11.3=h00cdb27_1
  • numpy=2.2.0=py313ha4a2180_0
  • openh264=2.5.0=h774163f_0
  • openjpeg=2.5.3=h8a3d83b_0
  • openldap=2.6.9=hbe55e7a_0
  • openssl=3.4.0=h39f12f2_0
  • packaging=24.2=pyhd8ed1ab_2
  • pango=1.54.0=h3e3e505_3
  • parmetis=4.0.3=ha4b917a_1007
  • pcre2=10.44=h297a79d_2
  • petsc=3.22.2=real_h2301197_100
  • petsc4py=3.22.1=py313h712231a_0
  • pillow=11.0.0=py313h97432e1_0
  • pip=24.3.1=pyh145f28c_2
  • pixman=0.44.2=h2f9eb0b_0
  • pkg-config=0.29.2=hde07d2e_1009
  • platformdirs=4.3.6=pyhd8ed1ab_1
  • pooch=1.8.2=pyhd8ed1ab_1
  • proj=9.5.1=h1318a7e_0
  • propcache=0.2.1=py313h90d716c_0
  • pthread-stubs=0.4=hd74edd7_1002
  • pugixml=1.14=h13dd4ca_0
  • pycparser=2.22=pyh29332c3_1
  • pyparsing=3.2.0=pyhd8ed1ab_2
  • pysocks=1.7.1=pyha55dd90_7
  • python=3.13.1=h4f43103_102_cp313
  • python-dateutil=2.9.0.post0=pyhff2d567_1
  • python_abi=3.13=5_cp313
  • pyvista=0.44.2=pyhd8ed1ab_1
  • qhull=2020.2=h420ef59_5
  • qt6-main=6.7.3=h2fbab7f_1
  • readline=8.2=h92ec313_1
  • requests=2.32.3=pyhd8ed1ab_1
  • rhash=1.4.5=h7ab814d_0
  • scalapack=2.2.0=h71a4f75_4
  • scooby=0.10.0=pyhd8ed1ab_1
  • setuptools=75.6.0=pyhff2d567_1
  • sigtool=0.1.3=h44b9a77_0
  • six=1.17.0=pyhd8ed1ab_0
  • slepc=3.22.2=real_hf0b33f3_300
  • slepc4py=3.22.1=py313h3bb7f59_1
  • snappy=1.2.1=h98b9ce2_1
  • spdlog=1.14.1=h6d8af72_1
  • sqlite=3.47.2=hd7222ec_0
  • suitesparse=7.8.3=ss783_h3b2878a
  • superlu=5.2.2=hc615359_0
  • superlu_dist=9.1.0=h89afcdd_0
  • svt-av1=2.3.0=hf24288c_0
  • tapi=1300.6.5=h03f4b80_0
  • tbb=2022.0.0=h0cbf7ec_0
  • tbb-devel=2022.0.0=h6e261d1_0
  • tk=8.6.13=h5083fa2_1
  • typing-extensions=4.12.2=hd8ed1ab_1
  • typing_extensions=4.12.2=pyha770c72_1
  • tzdata=2024b=hc8b5060_0
  • urllib3=2.2.3=pyhd8ed1ab_1
  • utfcpp=4.0.6=h54c0426_0
  • vtk=9.3.1=qt_py313h8d5bf7a_209
  • vtk-base=9.3.1=qt_py313hc8fffa2_209
  • vtk-io-ffmpeg=9.3.1=qt_py313hf99a90b_209
  • wslink=2.2.1=pyhd8ed1ab_1
  • x264=1!164.3095=h57fd34a_2
  • x265=3.5=hbc6ce65_3
  • xorg-libxau=1.0.12=h5505292_0
  • xorg-libxdmcp=1.1.5=hd74edd7_0
  • yaml=0.2.5=h3422bc3_2
  • yarl=1.18.3=py313h90d716c_0
  • zeromq=4.3.5=hc1bb282_7
  • zfp=1.0.1=h1c5d8ea_2
  • zlib=1.3.1=h8359307_2
  • zlib-ng=2.2.2=hf9b8971_0
  • zstandard=0.23.0=py313hf2da073_1
  • zstd=1.5.6=hb46c0d2_0
    prefix: /opt/miniconda3/envs/fenicsx
    ’ ’ ’

Any help is appreciated.

Is the environment activated? I see that you have cmake in the env, but /opt/homebrew/bin/cmake is being used. This suggests to me that there might be a PATH and/or activation issue.

What is the output of:

  • which -a cmake
  • cmake --version
  • echo $LDFLAGS

I created an env from your conda env export and building the poisson demo worked fine:

> conda activate exported
(exported) > cmake -B build . && cmake --build build
-- The C compiler identification is Clang 18.1.8
-- The CXX compiler identification is Clang 18.1.8
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/minrk/conda/envs/exported/bin/arm64-apple-darwin20.0.0-clang - 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: /Users/minrk/conda/envs/exported/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found MPI_C: /Users/minrk/conda/envs/exported/lib/libmpi.dylib (found version "4.1")
-- Found MPI_CXX: /Users/minrk/conda/envs/exported/lib/libmpicxx.dylib (found version "4.1")
-- Found MPI: TRUE (found version "4.1")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found Boost 1.86.0 at /Users/minrk/conda/envs/exported/lib/cmake/Boost-1.86.0
--   Requested configuration: REQUIRED COMPONENTS timer
-- Found boost_headers 1.86.0 at /Users/minrk/conda/envs/exported/lib/cmake/boost_headers-1.86.0
-- Found boost_timer 1.86.0 at /Users/minrk/conda/envs/exported/lib/cmake/boost_timer-1.86.0
--   [x] libboost_timer.dylib
-- Adding boost_timer dependencies: headers
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- Found HDF5: /Users/minrk/conda/envs/exported/lib/libhdf5.dylib;/Users/minrk/conda/envs/exported/lib/libcrypto.dylib;/Users/minrk/conda/envs/exported/lib/libcurl.dylib;/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libpthread.tbd;/Users/minrk/conda/envs/exported/lib/libsz.dylib;/Users/minrk/conda/envs/exported/lib/libz.dylib;/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libdl.tbd;/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libm.tbd (found version "1.14.4-3") found components: C
-- HDF5_DIR: HDF5_DIR-NOTFOUND
-- HDF5_DEFINITIONS: -D_FORTIFY_SOURCE=2
-- HDF5_INCLUDE_DIRS: /Users/minrk/conda/envs/exported/include
-- HDF5_LIBRARIES: /Users/minrk/conda/envs/exported/lib/libhdf5.dylib;/Users/minrk/conda/envs/exported/lib/libcrypto.dylib;/Users/minrk/conda/envs/exported/lib/libcurl.dylib;/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libpthread.tbd;/Users/minrk/conda/envs/exported/lib/libsz.dylib;/Users/minrk/conda/envs/exported/lib/libz.dylib;/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libdl.tbd;/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libm.tbd
-- HDF5_HL_LIBRARIES:
-- HDF5_C_DEFINITIONS: -D_FORTIFY_SOURCE=2
-- HDF5_C_INCLUDE_DIR:
-- HDF5_C_INCLUDE_DIRS: /Users/minrk/conda/envs/exported/include
-- HDF5_C_LIBRARY:
-- HDF5_C_LIBRARIES: /Users/minrk/conda/envs/exported/lib/libhdf5.dylib;/Users/minrk/conda/envs/exported/lib/libcrypto.dylib;/Users/minrk/conda/envs/exported/lib/libcurl.dylib;/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libpthread.tbd;/Users/minrk/conda/envs/exported/lib/libsz.dylib;/Users/minrk/conda/envs/exported/lib/libz.dylib;/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libdl.tbd;/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libm.tbd
-- HDF5_C_HL_LIBRARY:
-- HDF5_C_HL_LIBRARIES:
-- Defined targets (if any):
-- ... hdf5::hdf5
-- Found PkgConfig: /Users/minrk/conda/envs/exported/bin/pkg-config (found version "0.29.2")
-- Checking for one of the modules 'PETSc;petsc'
-- Checking for one of the modules 'SLEPc;slepc'
-- Found ADIOS2: /Users/minrk/conda/envs/exported/lib/cmake/adios2/adios2-config.cmake (found suitable version "2.10.2", minimum required is "2.8.1") found components: C CXX MPI
-- Looking for PETSC_USE_COMPLEX
-- Looking for PETSC_USE_COMPLEX - not found
-- Looking for PETSC_USE_REAL_DOUBLE
-- Looking for PETSC_USE_REAL_DOUBLE - found
-- Performing Test HAVE_NO_MULTLINE
-- Performing Test HAVE_NO_MULTLINE - Success
-- Configuring done (8.3s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/minrk/dev/simula/fenics/dolfinx/cpp/demo/poisson/build
[ 25%] Compile poisson.py using FFCx
[ 50%] Building CXX object CMakeFiles/demo_poisson.dir/main.cpp.o
[ 75%] Building C object CMakeFiles/demo_poisson.dir/poisson.c.o
[100%] Linking CXX executable demo_poisson
[100%] Built target demo_poisson

Note the output of ‘skipped’ in the compiler check. I believe this is the expected behavior of recent cmake for ‘known good’ compilers.

clang++: error: unable to execute command: Abort trap: 6

This seems like something’s really wrong, but I don’t know what it is. What variables are defined in env | grep PATH?

I removed cmake from /opt/homebrew.

Now here I have:

  • which -a cmake
    /opt/miniconda3/envs/fenicsx/bin/cmake

  • cmake --version
    cmake version 3.31.2
    CMake suite maintained and supported by Kitware (kitware.com/cmake).

  • echo $LDFLAGS
    -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/opt/miniconda3/envs/fenicsx/lib -L/opt/miniconda3/envs/fenicsx/lib

  • env | grep PATH
    CMAKE_PREFIX_PATH=:/opt/miniconda3/envs/fenicsx
    PATH=/opt/miniconda3/envs/fenicsx/bin:/opt/miniconda3/condabin:.:/opt/homebrew/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Library/TeX/texbin