DOLFINx Install on MacOS

Hello all,

I have been attempting to install the DOLFINx, basix, ffcx, and ufl packages from source without the use of docker. I saw on old discourse threads that it is theoretically possible by git cloning each of these and then using cmake or python to install.

I followed the general format below for cmake files

git clone https://github.com/FEniCS/basix.git
mkdir build && cd build
cmake .. -DCMAKE_C_COMPILER=gcc-11 
-DCMAKE_CXX_COMPILER=g++-11
make install

I have been able to get various dependencies such as hdf5-mpi, mpi4py, scotch, and adios2 through similar means. Some were brew installed and others were downloaded using cmake. I know that I have ffcx, basix, and ufl working, but the only one left is DOLFINx which manages to make it to 100% before the following error is encountered

Undefined symbols for architecture x86_64:
  "__ZNK5basix13FiniteElement8tabulateEiRKN2xt16xarray_containerINS1_7uvectorIdSaIdEEELNS1_11layout_typeE1ENS1_7svectorImLm4ESaImELb1EEENS1_22xtensor_expression_tagEEE", referenced from:
      __ZNK7dolfinx3fem17CoordinateElement8tabulateEiRKN2xt17xtensor_containerINS2_7uvectorIdSaIdEEELm2ELNS2_11layout_typeE1ENS2_22xtensor_expression_tagEEE in CoordinateElement.cpp.o
      __ZNK7dolfinx3fem13FiniteElement8tabulateERN2xt17xtensor_containerINS2_7uvectorIdSaIdEEELm4ELNS2_11layout_typeE1ENS2_22xtensor_expression_tagEEERKNS3_IS6_Lm2ELS7_1ES8_EEi in FiniteElement.cpp.o
  "__ZNK5basix13FiniteElement8tabulateEiRKN2xt16xarray_containerINS1_7uvectorIdSaIdEEELNS1_11layout_typeE1ENS1_7svectorImLm4ESaImELb1EEENS1_22xtensor_expression_tagEEERNS1_17xtensor_containerIS5_Lm4ELS6_1ESA_EE", referenced from:
      __ZNK7dolfinx3fem17CoordinateElement8tabulateEiRKN2xt17xtensor_containerINS2_7uvectorIdSaIdEEELm2ELNS2_11layout_typeE1ENS2_22xtensor_expression_tagEEERNS3_IS6_Lm4ELS7_1ES8_EE in CoordinateElement.cpp.o
      __ZNK7dolfinx3fem17CoordinateElement19pull_back_nonaffineERN2xt17xtensor_containerINS2_7uvectorIdSaIdEEELm2ELNS2_11layout_typeE1ENS2_22xtensor_expression_tagEEERKS9_SC_di in CoordinateElement.cpp.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]: *** [dolfinx/libdolfinx.0.3.1.0.dylib] Error 1
make[1]: *** [dolfinx/CMakeFiles/dolfinx.dir/all] Error 2
make: *** [all] Error 2

Has anyone else encountered a similar problem?

Hi ia267

Would please tell me how did you install c++ core on an environment and then Dolfinx on it?
I got stuck.